Repository navigation
Migrate retained Entity digest baselines to schema v2 - #2875
benhook1013 merged 6 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Composed #2873 exact-head CI run 36216715980 executes the #2875 Game Design integration suite and reports four EntityDigestBaselineMigrationIntegrationTest NPEs (lines 131, 229, and 333). All occur while using the baseline seeded by RecordedParticipantDigestRepository.save, before the intended migration assertions. That insert uses |
bc50b31
into
codex/entity-digest-v2-catchup
Topology and scope
Draft child of #2872 (
codex/entity-digest-v2-catchup) at exact parent1e3f4d8cca15dd4f293898510330f251d70e103c. Current child head:af5e197dfd8b62701afd82fb612c7ad6a8d20303. Unique diff: 32 files. #2873 is a separate sibling and must reconcile behind this published child before review intake; it was not edited here.Implements the historical Entity full-version digest baseline schema-v1→schema-v2 migration as a protected, disabled-by-default one-shot Game Design Job. It enumerates bounded retained v1 rows, preflights an exact tenant/version scope, binds a stable operation and complete expected-old tuple, obtains exact Entity v2 digest evidence, and performs a compare-and-swap baseline update plus immutable before/after audit in one Game Design transaction. Success and uncertain-write recovery require exact persisted audit and baseline readback. The live row retains original and last real publish-workflow provenance; the audit separately records migration actor, workload, operation, and time. No public operator route or cross-service database mutation is introduced.
The Job uses a dedicated service account with zero Kubernetes API verbs, no shared JWT key, an immutable image digest, narrow egress, and a client certificate admitted only for the internal Entity digest RPC. The opt-in certificate writer issues a URI-only clientAuth leaf under the internal CA; admission allows exactly this ephemeral runtime identity without adding a permanent hosted-controller consumer. Secret-read verification is separate from the certificate writer and checks the namespace trust bundle. Missing identity/projection or wrong scope fails closed.
Rollout and live gate
Maintain an explicit fail-closed publication window for affected v1 scopes. Deploy the Game Design reader/reconciler first, then Entity v2 writer, then issue/verify the dedicated migrator identity and run exact scoped enumeration, preflight, migration, and database readback. Reopen publication only after all affected scopes have verified v2 evidence or a recorded scoped no-data boundary. Retire the Job, Certificate, and Secret afterward. Never compare v1 and v2 digests as the same schema. The synthetic
version:<id>applied-commit remediation remains separate.No retained live v1 row inventory or no-data query has yet been executed. No live issuance/bootstrap, served Entity mTLS acceptance, retained-row PostgreSQL readback, publication-window, or identity-retirement proof is claimed. Synthetic PostgreSQL migration/readback is proven in CI. The five PostgreSQL Testcontainers integration cases compiled but all skipped locally because Docker is unavailable. The new case asserts that a seeded baseline returns a generated ID and is exactly readable from PostgreSQL.
Validation and review
:common-platform-core:check,:common-security:check,:entity-management-service:check, and corrected:game-design-service:checkpassed with-PfullCheck; Game Design boot JAR builds with runner and V29 migration included.af5e197df: explicitly return generated IDs, require database readback, and normalize PostgreSQL timestamp fields. CI 36221110601 removed the original null but exposed baseline timestamps; CI 36221633455 passed baseline seeding and exposed audit timestamps. Current-head CI 36221988201 passed the Game Design full-check/integration job, including all five PostgreSQL baseline cases. The overall run is red on unrelated Python import lint, a preview/dev-tool contract, and seven Friends cross-service cases owned by Constrain gameplay presence roles and redact legacy friend views #2858; Validation Gate reflects those failures. Local:game-design-service:check -PfullCheckpasses.submit-gradle, andvalidate-overlayspass. These are not a live DB/certificate migration proof or a full develop-target Validation campaign.5a68415d7with production/readback/unit/integration changes. The final updated-head whole-boundary pass found zero actionable defects. No Hosted or CLI CodeRabbit was requested.FireMUD LOC impact
Compared
1e3f4d8cca15→af5e197dfd8b(PR merge-base → head).PR scope: 32 changed files · 3,808 added textual lines / 26 deleted textual lines.
Rows are hierarchical and overlapping views; do not add them together.
LOC means cloc code lines; blank and comment-only lines are excluded.