Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
{
"schemaVersion": 1,
"documentType": "YANCE_DELEGATED_GOVERNANCE_BRANCH_AUTHORIZATION",
"requestedByUserAt": "2026-08-14T21:07:00+07:00",
"repository": "laiqian0239-glitch/yance",
"workPackage": "ACV2-SCHEMA23-CANONICAL-MIGRATION-COMBINED-CLOSURE-V2",
"proposalRevision": 2,
"status": "AUTHORIZED_AFTER_TRUSTED_MAIN_MERGE",
"reason": "Resolve the base-owned Schema 23 migration/test-contract dependency cycle without bypassing CI or weakening schema governance. PR #374 proved and implemented the canonical domain_event_projection_jobs migration, while #375 separately authorized correction of two stale current-total-schema tests. Neither side can ordinary-merge first on its own: the migration branch is RED against stale Schema 22 expectations, while a test-only branch expecting Schema 23 is RED on trusted main before the migration exists. This fresh combined successor authorizes exactly the three causal tests first, followed by exactly the two already-reviewed production migration paths, preserving historical Schema 22 contracts and all prior RED/GREEN evidence without rebase or cherry-pick authority.",
"base": {
"branch": "main",
"commit": "bccd3145a4e885026414d50d61ad31121bdea709",
"requiredFreshAtAuthorizationMerge": true
},
"effectiveness": {
"effectiveBeforeMerge": false,
"requiresOrdinaryTwoParentMainMerge": true,
"implementationMayStartOnlyFromAuthorizationMergeCommit": true,
"authorizationProposalTransportIsNotImplementationAuthority": true,
"invalidIfTrustedMainMovesBeforeAuthorizationMerge": true
},
"supersession": {
"migrationPullRequest": 374,
"migrationHead": "ca72110604296a1a9ca3952757fc2ff24b779616",
"migrationAuthorizationMerge": "6db3e1d03b95ba270929b83d730b2291e9a90642",
"migrationCausalRedHead": "ec003b8ae66ae70bf9e22b6269466ab2ff2307f5",
"migrationCausalRedRun": 31806086346,
"testContractAuthorizationPullRequest": 375,
"testContractAuthorizationMerge": "bccd3145a4e885026414d50d61ad31121bdea709",
"migrationPullRequestMustNotMergeAfterCombinedSuccessorBecomesEffective": true,
"historyRewriteAllowed": false,
"cherryPickAsAuthorityAllowed": false
},
"causalDefect": {
"legacyMigrationPath": "backend/migrations/batch24StateTransactionConsistency.js",
"legacyMigrationId": "016_batch24_state_transaction_consistency",
"legacyProjectionJobForeignKey": "domain_event_projection_jobs.event_id -> domain_events(event_id)",
"canonicalForeignKeyRequired": "domain_event_projection_jobs.event_id -> canonical_event_headers(event_id)",
"historicalAcv2IntegrityTargetSchemaVersion": 22,
"requiredCurrentR32SchemaVersion": 23,
"staleCurrentSchemaTestPaths": [
"backend/tests/architectureClosureV2/wpA/authorityWriteHost.test.js",
"backend/tests/batch27DeveloperHandoffV2Closure.test.js"
],
"historicalSchema22TestPath": "backend/tests/architectureClosureV2/wpA/schema22PostMergeIntegrityMigration.test.js",
"historicalSchema22TestModificationAllowed": false,
"historicalMigrationRewriteAllowed": false,
"runtimeProjectionWorkerChangeAllowed": false
},
"authorizationBranch": {
"name": "governance/acv2-schema23-canonical-migration-combined-v2-authorization",
"allowedChangedPaths": [
"governance/layered-ci/acv2-schema23-canonical-migration-combined-v2-authorization.json"
],
"approvedChangedFileCount": 1,
"approvedChangedFileSetSha256": "8f00ab0a443dc7b573483530647226dd8f6d927462177e13ec2bdd951fd4160a",
"mustRemainSingleFile": true,
"mustRemainCleanFromTrustedMain": true
},
"digestCanonicalization": {
"algorithm": "SHA-256",
"encoding": "UTF-8",
"pathNormalization": "Apply the repository normalizeChangedFiles contract: exact repository-relative normalized paths, unique, JavaScript default Array.prototype.sort().",
"separator": "LF (\\n)",
"trailingNewline": true,
"canonicalText": "Join normalized sorted unique paths with LF and append exactly one trailing LF before hashing."
},
"implementation": {
"branch": "fix/acv2-schema23-canonical-migration-combined-v2",
"requiredParent": "AUTHORIZATION_ORDINARY_MERGE_COMMIT",
"allowedChangedPaths": [
"backend/lib/r32SqliteStore.js",
"backend/migrations/architectureClosureV2DomainEventProjectionJobsCanonical.js",
"backend/tests/architectureClosureV2/wpA/authorityWriteHost.test.js",
"backend/tests/architectureClosureV2/wpA/domainEventProjectionJobsCanonicalMigration.test.js",
"backend/tests/batch27DeveloperHandoffV2Closure.test.js"
],
"approvedChangedFileCount": 5,
"approvedChangedFileSetSha256": "787a88f19855e80d316d03622857d53f2fd654c4b50cd1641bc845b6d6a9edd8",
"failureFirstCommit": {
"freshCausalRedRequired": true,
"mustBeFirstImplementationCommit": true,
"allowedChangedPaths": [
"backend/tests/architectureClosureV2/wpA/authorityWriteHost.test.js",
"backend/tests/architectureClosureV2/wpA/domainEventProjectionJobsCanonicalMigration.test.js",
"backend/tests/batch27DeveloperHandoffV2Closure.test.js"
],
"approvedChangedFileCount": 3,
"approvedChangedFileSetSha256": "fbda331336c0f09da7579f29a443b0de85fb573f3ccecd7983c09b11dde4725c",
"productionCodeChanged": false,
"expectedMissingCapabilities": [
"Current total R32 SCHEMA_VERSION has not yet advanced from 22 to 23.",
"Fresh stores have not yet persisted current schema metadata 23.",
"Schema 23 domain_event_projection_jobs canonical migration module is absent.",
"domain_event_projection_jobs.event_id remains foreign-keyed to legacy domain_events rather than canonical_event_headers."
]
},
"greenProductionPaths": [
"backend/lib/r32SqliteStore.js",
"backend/migrations/architectureClosureV2DomainEventProjectionJobsCanonical.js"
],
"targetSchemaVersion": 23,
"newDependencyAllowed": false,
"workflowModificationAllowed": false,
"packageManifestModificationAllowed": false,
"lockfileModificationAllowed": false,
"rootNpmManifestModificationAllowed": false,
"rootNpmLockfileModificationAllowed": false,
"productRuntimeModificationAllowed": false,
"projectionWorkerModificationAllowed": false,
"historicalMigrationModificationAllowed": false,
"newGeneralPurposeYanceInfrastructureAllowed": false
},
"testContract": {
"currentTotalSchemaVersion": 23,
"authorityWriteHostCurrentSchemaAssertionMustBe": 23,
"batch27CurrentSchemaAssertionMustBe": 23,
"freshStoreSchemaMetadataMustEqualCurrentSchemaVersion": true,
"schema22MigrationReceiptTargetMustRemain": 22,
"schema22HistoricalContractMustRemainFrozen": true,
"schema23MigrationReceiptMustBeAsserted": true,
"authorityWriteHostFencingAssertionsMayChange": false,
"batch27CapabilityAssertionsMayChange": false
},
"migrationContract": {
"forwardOnly": true,
"idempotent": true,
"checksumPinned": true,
"registeredInR32SqliteStore": true,
"targetSchemaVersion": 23,
"table": "domain_event_projection_jobs",
"canonicalForeignKey": "event_id -> canonical_event_headers(event_id)",
"legacyForeignKeyMustBeAbsent": "event_id -> domain_events(event_id)",
"preserveColumns": [
"job_id",
"event_id",
"projector_name",
"state",
"attempts",
"claim_token",
"lease_expires_at",
"next_attempt_at",
"last_error",
"created_at",
"updated_at"
],
"preserveClaimIndex": "idx_domain_event_projection_jobs_claim(state,next_attempt_at,created_at)",
"orphanPolicy": "FAIL_CLOSED_BEFORE_TABLE_REBUILD",
"dataLossAllowed": false,
"syntheticCanonicalEventAllowed": false,
"legacyDomainEventMutationAllowed": false
},
"learnedPolicyIsolation": {
"pullRequest": 372,
"branch": "product/v21-learning-policy-p1-decision-outcome-closed-loop-v1",
"frozenHead": "fb1beeb0e39ad4d6263f71b4c995eb5ec663e6e2",
"frozenHeadMustRemainUnmodifiedUntilCombinedClosureMerge": true,
"closureCherryPickIntoLearnedPolicy": false,
"closureRebaseIntoLearnedPolicy": false
},
"ossFit": {
"decision": "REUSE_SQLITE_NODE_TEST_AND_EXISTING_ACV2_R32_MIGRATION_SEAMS",
"matureOssAvailable": true,
"newGeneralPurposeInfrastructure": false,
"selectedAdoptionMode": "existing-repository-seam",
"reviewedCandidates": [
{
"name": "SQLite transactional table rebuild",
"source": "SQLite through Node.js built-in node:sqlite",
"license": "public-domain SQLite / Node.js existing runtime",
"adoptionMode": "official-sdk-cli-native-prebuild-runtime",
"fit": "FIT",
"reason": "SQLite native savepoints, foreign keys and table rebuilds are sufficient; no Yance migration framework is required."
},
{
"name": "Node.js built-in test runner",
"source": "node:test",
"license": "Node.js existing runtime",
"adoptionMode": "official-sdk-cli-native-prebuild-runtime",
"fit": "FIT",
"reason": "Existing base-owned ACV2 and Batch27 tests already use node:test; only exact stale current-schema assertions are corrected."
},
{
"name": "Existing R32 forward migration registry and ACV2 canonical ledger",
"source": "backend/lib/r32SqliteStore.js, r32_schema_migrations, canonical_event_headers",
"license": "repository-existing",
"adoptionMode": "existing-repository-seam",
"fit": "FIT",
"reason": "These existing authorities already own schema progression and canonical event identity."
}
],
"retireOrAvoid": [
"Do not lower current SCHEMA_VERSION to 22 to satisfy stale tests.",
"Do not edit historical Schema 16, 21 or 22 migration identities/checksums.",
"Do not edit schema22PostMergeIntegrityMigration.test.js; its historical target remains 22.",
"Do not delete domain_event_projection_jobs or reset durable retry metadata.",
"Do not synthesize canonical events for orphaned jobs.",
"Do not patch projection workers or repositories to mask the schema defect.",
"Do not introduce another migration engine, queue, event store or schema-version authority.",
"Do not rebase or cherry-pick PR #374 as executable authority."
],
"thinYanceAdapterOnly": true
},
"mandatoryContracts": [
"Authorization ordinary-merges from exact trusted main bccd3145a4e885026414d50d61ad31121bdea709 before implementation starts.",
"First implementation commit changes exactly three authorized test paths and zero production code, and must produce fresh causal RED on the combined missing Schema 23 capability.",
"GREEN descendant changes only the two authorized production migration paths in addition to the preserved three-test RED commit.",
"Historical Schema 22 target/receipt assertions remain exactly 22 while current total R32 schema becomes 23.",
"Schema 23 migration must preserve every valid durable job field and fail closed on canonical orphans before rebuild.",
"PR #372 remains frozen until this combined closure ordinary-merges to trusted main."
],
"prohibitions": {
"temporaryBypass": true,
"continueOnError": true,
"testWeakening": true,
"historicalMigrationRewrite": true,
"jobDeletionAsMigration": true,
"syntheticCanonicalEventRepair": true,
"runtimeProjectionWorkerPatch": true,
"secondMigrationFramework": true,
"secondProjectionQueue": true,
"newDependency": true,
"workflowChange": true,
"packageManifestChange": true,
"lockfileChange": true,
"cherryPick": true,
"rebase": true,
"forcePush": true,
"amendPublishedHistory": true,
"squashMerge": true,
"formalRelease": true,
"publish": true
},
"governance": {
"authorizationPredatesImplementation": true,
"exactPathScopeOnly": true,
"independentBranchAndPullRequestRequired": true,
"baseOwnedCombinedClosureRequiredBeforeLearnedPolicySuccessor": true,
"productionUseAuthorized": false,
"formalReleaseAuthorized": false,
"publishAuthorized": false,
"readyForPromotionAuthorized": false,
"automaticNextWorkPackageAuthorizationAuthorized": false
}
}
Loading