GeezerVison is showing github.com — Prove authenticated writes across two UserService replicas · Issue #773 · OpenResilienceInitiative/ORISO-UserService
Prove authenticated writes across two UserService replicas #773DescriptionWhy
The existing replica work proved bounded public reads and individual Redis/MariaDB coordination modules, but not a valid JWT-authenticated write routed between replicas. Tutorial progress also implemented upsert as read-then-insert, so concurrent replicas could race on the unique scope key. Concurrent creation of different scopes could separately exceed the per-user row cap.
Parent: #733
Delivered in #830
- deterministic local JWK/JWT adapter for the real resource-server authentication path
- two packaged UserService JVMs against shared isolated MariaDB and Redis
- native MariaDB atomic upsert for one tutorial-progress scope
- hashed, user-scoped advisory serialization for first writes so the row cap remains atomic across replicas
- existing-scope lock-free update path
- portable H2 HTTP/JPA E2E plus separate real-MariaDB concurrency contracts
- alternating authenticated PUT/GET traffic across both replicas plus one-replica restart
Acceptance
- A real MariaDB concurrency test covers concurrent first writes and leaves one canonical scope.
- A real MariaDB concurrency test proves different new scopes cannot exceed the per-user row cap.
- The rejected-write path releases the advisory lock for the next first write.
- Two real JVMs accept a valid consultant JWT without sticky sessions or a real Keycloak dependency.
- Concurrent same-scope writes return no 5xx and leave exactly one canonical progress row.
- Writes are immediately readable from the other replica.
- Stopping and restarting one replica does not lose authentication or persisted progress.
- The report enforces per-operation and per-replica volume, error-rate and p95 thresholds.
- The runner removes every temporary JVM, listener and container.
- Exact-head GitHub Unit, Required Integration, MariaDB, Redis and OpenAPI gates are terminal green.
Current evidence
PR: #830, exact local head 73c60742
- focused tutorial unit suite: 9 tests, 0 failures
- tutorial controller E2E: 5 tests, 0 failures
- complete required integration suite: 79 reports / 844 tests, 0 failures, 0 errors, 7 environment-gated skips
- real tutorial MariaDB contract: 4 tests, 0 failures
- initial two-JVM phase: 82 authenticated operations, 0 failures, 41.76 ms p95
- restart phase after isolated-scope initialization: 14 measured operations, 0 failures, 19.22 ms p95
- one canonical measured-scope MariaDB row and no duplicate-key warning
- per-operation and per-replica 1,000 ms p95 threshold remained enforced
This is bounded local branch evidence for the tutorial-progress state transition. It is not a claim that #830 is merged, deployed to PreDev, proven through deployed SigNoz, or sufficient to raise the whole-service replica limit. Activitycoderabbitai commented on Jul 27, 2026
🔗 Related PRs
#389 - fix: finalize persisted consultant agency relation [merged]
#448 - fix: harden anonymous live-chat redemption and acceptance [merged]
#489 - fix(db): include orphaned 0067_consultant_public_slug changeset in master changelog [merged]
#501 - feat(tour): aggregate tutorial statistics for authorized admins (TOUR-06) [merged]
#508 - Fix own-email rejection during consultant 2FA setup [merged]
📝 Issue Planner
Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord! Storypapst commented on Jul 27, 2026 CollaboratorAuthor More actions Current-baseline replay published as draft PR #830. Local proof is green: focused tutorial 9; full unit 3,370/0 failures/4 pre-existing skips (removed independently by #829); required integration 843/0 failures/0 errors; fresh MariaDB 5/0; Python CI plus OpenAPI 21. The real two-replica run completed 82 initial requests at 38.55 ms p95 and 14 post-restart requests at 373.39 ms p95, with zero failures, one canonical row, no duplicate-key warning, and no Rocket.Chat/Jitsi configuration or dependency. Storypapst commented on Jul 28, 2026 CollaboratorAuthor More actions PR #830 is now review-ready at exact head 73c607428a9e6dd1cefd81002dc65a209ac09494. All 12 configured checks are terminal green after the Required-E2E H2 compatibility repair and restart warm-up stabilization. Local proof remains 844/0/0 Required Integration tests plus the real MariaDB row-cap race and two-JVM authenticated restart run. No merge or deployment has occurred. Storypapst commented on Jul 28, 2026 CollaboratorAuthor More actions Current-base replay evidence for PR #830:
- exact head:
391d3ef2ff6cc2f269b60457a8ca728e90396f94
- current
pre-dev: 947cd1baa142cc4ac9360a96f4694be5e932c657 (contained in head)
- combined MariaDB CI retains the tutorial contract plus the already-merged schema, statistics, Organizer, and group-chat-deactivation contracts
- focused service tests: 9 passed; controller E2E: 5 passed
- full unit suite: 3,411 tests, 0 failures/errors, 4 existing
pre-dev quarantine skips
- full integration suite: 849 tests, 0 failures/errors, 9 environment-gated skips
- real MariaDB tutorial replica contract: 4 passed with no skips
- complete Python CI guards: 35 passed
- two real UserService processes against shared disposable MariaDB/Redis: initial 82 operations at 48.80 ms p95; post-restart 14 operations at 22.51 ms p95; zero failures; one canonical row; no duplicate-key warning
- Spotless, shell/Python syntax and diff checks passed
- all disposable services were removed; no persistent database was reset
The branch is published and exact-head GitHub checks are running. The PR remains open, unmerged and undeployed.
Architecture boundary: Matrix is the sole chat system through the ORISO-owned frontend, with an ORISO-controlled Element Call / MatrixRTC fork and LiveKit. Rocket.Chat and Jitsi are full removal targets and are not fallbacks. Storypapst commented on Jul 28, 2026 CollaboratorAuthor More actions Terminal exact-head CI evidence for PR #830:
All 12 checks for 391d3ef2ff6cc2f269b60457a8ca728e90396f94 are successful: branch and PR builds, Docker validation, both required-integration jobs, both combined MariaDB schema/statistics/replica contracts, Redis shared-state contracts, both OpenAPI checks, API contract diff, and Required PreDev CI. The successful CodeRabbit status is the configured pre-dev skip, not a human review.
The PR remains open, unmerged and undeployed. Its two-replica source/test proof does not authorize a production replica-count change; the broader replica-safety ceiling remains governed separately. Storypapst commented on Aug 24, 2026 CollaboratorAuthor More actions Verified as delivered: PR #830 (merged to pre-dev) replaces the tutorial-progress read-then-insert race with an atomic MariaDB upsert plus a hashed per-user advisory lock for first writes, and proves it with a real two-JVM run (deterministic JWT/JWK, no live Keycloak dependency as scoped by the issue) covering 82 authenticated PUT/GET operations plus a replica restart, zero failures, one canonical row, no duplicate-key warning, and all 12 exact-head CI gates (unit, required integration, MariaDB, Redis, OpenAPI) terminal green.
Moving to QA external Dev for external review. cc @BjoernLudwig
MetadataMetadataStatusShow more project fields
DevelopmentNo branches or pull requestsIssue actions
|