Skip to content

feat(core)!: port to v2 line on fiber v3 stack#42

Merged
fredcamaral merged 2 commits into
developfrom
feat/v2-fiber-v3
Jul 21, 2026
Merged

feat(core)!: port to v2 line on fiber v3 stack#42
fredcamaral merged 2 commits into
developfrom
feat/v2-fiber-v3

Conversation

@fredcamaral

Copy link
Copy Markdown
Member

What

Opens the /v2 major line: module github.com/LerianStudio/lib-systemplane/v2 on the Fiber v3 stack.

  • gofiber/fiber/v2v3 (v3.4.0): Ctx is now an interface — UserContext()Context(), BodyParserBind().Body, app.Test takes fiber.TestConfig
  • lib-commons/v5 v5.8.0 → /v6 v6.0.0 (import-path churn only; RespondError composes with the new fiber.Ctx)
  • lib-observability v1.1.0 → /v2 v2.0.0 (import-path churn only)
  • All self-imports, docs snippets, and examples moved to /v2

Why

Consumers migrating to lib-commons v6 / Fiber v3 (matcher first) mount the admin surface via admin.Mount over a Fiber app — impossible from the v1 line, which pins Fiber v2. This unblocks the v6-stack migration chain.

Breaking changes

  • Module path is now github.com/LerianStudio/lib-systemplane/v2
  • admin.WithAuthorizer: func(*fiber.Ctx, string) errorfunc(fiber.Ctx, string) error
  • admin.WithActorExtractor: func(*fiber.Ctx) stringfunc(fiber.Ctx) string

Everything else — routes, response DTOs, sentinel-error mapping, redaction, Client/Register/catalog/DDL/systemplanetest — byte-identical. No feature behavior changed; ddl/ and LISTEN/NOTIFY logic untouched.

Verification

Gate Result
go build ./... + go vet ./... PASS
go test -tags=unit -race -count=1 ./... 211 tests PASS
go test -tags=integration -count=1 ./... (testcontainers) 64 tests PASS
golangci-lint run ./... (v2.12.2, repo config) 0 issues

https://claude.ai/code/session_019CPR8BaUFL4TuPVos9DGds

Major line bump: module github.com/LerianStudio/lib-systemplane/v2.

- gofiber/fiber/v2 -> v3 (Ctx is now an interface; UserContext ->
  Context, BodyParser -> Bind().Body, app.Test TestConfig)
- lib-commons/v5 v5.8.0 -> /v6 v6.0.0 (import-path churn only)
- lib-observability v1.1.0 -> /v2 v2.0.0 (import-path churn only)
- All self-imports moved to /v2; docs and examples updated

No feature behavior changed; ddl/ and LISTEN/NOTIFY untouched.

BREAKING CHANGE: module path is now
github.com/LerianStudio/lib-systemplane/v2. admin.WithAuthorizer and
admin.WithActorExtractor now take fiber.Ctx (v3 interface) instead of
*fiber.Ctx.

X-Lerian-Ref: 0x1
Claude-Session: https://claude.ai/code/session_019CPR8BaUFL4TuPVos9DGds
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 051458d4-9440-4dda-854b-31102325511d

📥 Commits

Reviewing files that changed from the base of the PR and between 54c2e18 and a2feb59.

📒 Files selected for processing (1)
  • CLAUDE.md

📝 Walkthrough

Walkthrough

The project adopts the lib-systemplane/v2 module and updated lib-commons, lib-observability, and Fiber dependencies. Admin handlers and tests migrate to Fiber v3 context APIs, while internal backends, examples, and documentation use the new versioned import paths.

Changes

Systemplane v2 migration

Layer / File(s) Summary
Module and public contracts
go.mod, api_*.go, manager*.go, ddl_test.go
The module and exported type dependencies now resolve through systemplane v2, observability v2, and tenant-manager v6.
Admin Fiber v3 handlers
admin/*, .env.reference
Admin callbacks and handlers accept fiber.Ctx, tenant-aware operations use c.Context(), and request body parsing uses c.Bind().Body.
Internal dependency alignment
internal/client/*, internal/manager/*, internal/mongodb/*, internal/postgres/*, systemplanetest/*
Internal production and test packages use the versioned systemplane, tenant-manager, and observability imports.
Documentation and integration guidance
README.md, CLAUDE.md, docs/PROJECT_RULES.md, examples/manager/main.go
Quickstarts, project guidance, dependency references, and examples describe the v2/v6/Fiber v3 stack and tenant middleware context handling.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/v2-fiber-v3

Comment @coderabbitai help to get the list of available commands.

@lerian-studio lerian-studio added size/M PR changes 200–499 lines docs Documentation and markdown content admin Admin HTTP surface (Fiber handlers) client Client implementation (lifecycle, cache, telemetry) core Top-level public API surface (api_*.go, doc.go) tests Unit, integration and end-to-end tests mongodb MongoDB backend (change streams, polling fallback) postgres Postgres backend (pgx, LISTEN/NOTIFY) deps Go module dependencies (usually opened by Dependabot) debounce Trailing-edge changefeed debouncer systemplanetest Backend-agnostic contract test suite labels Jul 21, 2026
@lerian-studio

lerian-studio commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🔍 PR Validation Summary

✅ PR Mergeable — no blocking failures

Check Status Blocking
Source Branch ✅ success yes
PR Title ✅ success yes
PR Description ✅ success yes
PR Size ✅ success no
Auto Labels ✅ success no
PR Metadata ✅ success no

🔍 View workflow run

@lerian-studio

lerian-studio commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

🔒 Security Scan Results — lib-systemplane

✅ PR Mergeable — no blocking findings

Stage Status Blocking?
Filesystem Scan ✅ Clean
Docker Image Scan ➖ Skipped
Docker Hub Health Score ➖ Skipped
Pre-release Version Check ✅ Clean

Trivy

Filesystem Scan

✅ No vulnerabilities or secrets found.


Pre-release Version Check

✅ No unstable version pins found.


🔍 View full scan logs

@lerian-studio

Copy link
Copy Markdown
Contributor

📊 Unit Test Coverage Report: app

Metric Value
Overall Coverage 80.5% ✅ PASS
Threshold 80%

Coverage by Package

Package Coverage
github.com/LerianStudio/lib-systemplane/v2/admin 88.4%
github.com/LerianStudio/lib-systemplane/v2/internal/client 80.7%
github.com/LerianStudio/lib-systemplane/v2/internal/debounce 73.1%
github.com/LerianStudio/lib-systemplane/v2/internal/manager 87.9%
github.com/LerianStudio/lib-systemplane/v2/internal/mongodb 97.5%
github.com/LerianStudio/lib-systemplane/v2/internal/postgres 100.0%
github.com/LerianStudio/lib-systemplane/v2 94.8%

Generated by Go PR Analysis workflow

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CLAUDE.md`:
- Line 61: Update the multi-tenant PostgreSQL guidance in CLAUDE.md to remove
the runtime role’s LISTEN requirement, leaving only DML privileges. Keep the
existing statement that LISTEN/NOTIFY is disabled in multi-tenant mode.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 66820fe3-f45e-499b-9a14-4942ad0cf62d

📥 Commits

Reviewing files that changed from the base of the PR and between f061b8c and 54c2e18.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (73)
  • .env.reference
  • CLAUDE.md
  • README.md
  • admin/admin.go
  • admin/admin_responses.go
  • admin/admin_test.go
  • api_client.go
  • api_constants.go
  • api_constructors.go
  • api_errors.go
  • api_testing.go
  • api_types.go
  • ddl_test.go
  • docs/PROJECT_RULES.md
  • examples/manager/main.go
  • go.mod
  • internal/client/catalog_test.go
  • internal/client/client.go
  • internal/client/client_telemetry.go
  • internal/client/client_test.go
  • internal/client/client_testing.go
  • internal/client/errors.go
  • internal/client/get.go
  • internal/client/manager_binding.go
  • internal/client/manager_binding_test.go
  • internal/client/onchange.go
  • internal/client/options.go
  • internal/client/redact.go
  • internal/client/set.go
  • internal/client/testing_facade_test.go
  • internal/debounce/debounce.go
  • internal/manager/connector.go
  • internal/manager/connector_pgmgr_integration_test.go
  • internal/manager/connector_pgmgr_test.go
  • internal/manager/events.go
  • internal/manager/get.go
  • internal/manager/goleak_integration_test.go
  • internal/manager/handle_lifecycle.go
  • internal/manager/handle_lifecycle_test.go
  • internal/manager/internal_test.go
  • internal/manager/lifecycle.go
  • internal/manager/listen.go
  • internal/manager/listen_integration_test.go
  • internal/manager/logging.go
  • internal/manager/manager.go
  • internal/manager/manager_integration_test.go
  • internal/manager/manager_test.go
  • internal/manager/metrics.go
  • internal/manager/metrics_helper_test.go
  • internal/manager/metrics_test.go
  • internal/manager/warmload.go
  • internal/mongodb/mongodb.go
  • internal/mongodb/mongodb_changestream.go
  • internal/mongodb/mongodb_changestream_test.go
  • internal/mongodb/mongodb_config.go
  • internal/mongodb/mongodb_crud.go
  • internal/mongodb/mongodb_events.go
  • internal/mongodb/mongodb_goleak_integration_test.go
  • internal/mongodb/mongodb_integration_test.go
  • internal/mongodb/mongodb_polling_integration_test.go
  • internal/mongodb/mongodb_unit_test.go
  • internal/postgres/postgres.go
  • internal/postgres/postgres_config.go
  • internal/postgres/postgres_goleak_integration_test.go
  • internal/postgres/postgres_integration_test.go
  • internal/postgres/postgres_listen.go
  • internal/postgres/postgres_listen_test.go
  • internal/postgres/postgres_notify.go
  • internal/postgres/postgres_unit_test.go
  • manager.go
  • manager_methods.go
  • manager_methods_test.go
  • systemplanetest/contract.go

Comment thread CLAUDE.md Outdated
Multi-tenant mode disables LISTEN/NOTIFY; the runtime role needs
DML only. Removes a contradictory privilege from the guidance
(CodeRabbit review).

X-Lerian-Ref: 0x1
Claude-Session: https://claude.ai/code/session_019CPR8BaUFL4TuPVos9DGds
@fredcamaral
fredcamaral merged commit 79cfb41 into develop Jul 21, 2026
22 checks passed
@github-actions
github-actions Bot deleted the feat/v2-fiber-v3 branch July 21, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

admin Admin HTTP surface (Fiber handlers) client Client implementation (lifecycle, cache, telemetry) core Top-level public API surface (api_*.go, doc.go) debounce Trailing-edge changefeed debouncer deps Go module dependencies (usually opened by Dependabot) docs Documentation and markdown content mongodb MongoDB backend (change streams, polling fallback) postgres Postgres backend (pgx, LISTEN/NOTIFY) size/M PR changes 200–499 lines systemplanetest Backend-agnostic contract test suite tests Unit, integration and end-to-end tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants