feat: support governed same-stream return activation - #24
Merged
Conversation
rblake2320
force-pushed
the
feat/ha-return-failback
branch
from
July 21, 2026 05:18
fb28a37 to
cade9dd
Compare
rblake2320
force-pushed
the
feat/ha-return-failback
branch
from
July 21, 2026 05:19
cade9dd to
57d0293
Compare
rblake2320
marked this pull request as ready for review
July 21, 2026 05:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Bounded protocol amendment for governed same-stream return activation (A -> B -> A). This does not expand the existing HA/uptime claim and does not update any downstream pin.
Change
tsk_ha_source_activationrecord with a signed current head plus append-only activation historyABORTEDcutover with no source activationactivateFinalizedReceiverAsSource, an owned SERIALIZABLE target authority that rebuilds persisted finalized staging, re-verifies both export signatures and the complete 1..N ledger, then atomically installs ledger rows, fence, checkpoint, and activation leaseEvidence
npm run build- greennpm run typecheck- greennpm test- greennpm run test:ha-control-migration- 2/2 real PostgreSQL 16 (success + invalid-legacy rollback)npm run test:ha-control-continuity -w packages/server- 6/6npm run test:ha-fencing- 20/20 real PostgreSQL 16 + Redisnpm run test:control-cutover- 10/10 real A/B/control PostgreSQL 16 + Redisnpm run test:b-activation- 5/5 real A/B/control PostgreSQL 16 + Redis, including an intervening consumedABORTEDepoch, atomic A -> B and B -> A import, returned A originates N+2, old B denied, strict-chain rejection, activation rollback/tamper rejection, and byte-identical retrynpm run test:pack- 4/4 package boundary plus dry packsnpm audit --audit-level=high- 0 vulnerabilitiesThe local drill used three independently initialized PostgreSQL 16 clusters. Hosted CI's digest-pinned PostgreSQL 16 Alpine + Redis matrix is authoritative. PR stays draft and no downstream pin moves until independent review is CLEAN.