ci: add automated sync from main to next - #12
Merged
Merged
Conversation
mmacedoeu
added a commit
that referenced
this pull request
Aug 3, 2026
Round 7 review (background subagent, 2026-07-30) found 2 NEW findings (1 MAJOR + 1 NIT). All addressed. **MAJOR fix**: - Scope item 2 instruction was internally impossible: the mission said "create the verifier types in a new auth.rs module" but `crates/octo-reputation/src/auth.rs` ALREADY has `GovernanceSnapshot` (lines 21-25: `finalized_at_unix`, `governance_set_hash`, `members: Vec<[u8; 32]>`) and `GovernanceProof` (line 113+) with INCOMPATIBLE shapes vs RFC-0955-R1. `GovernanceSigner` is absent. Following the prior text literally would collide with the existing names. Rewrote Scope item 2 with two reconciliation paths: (a) Add RFC-0955-R1 types under new names in the same module (e.g., `AnchorGovernanceSnapshot`, `AnchorGovernanceSigner`, `AnchorGovernanceProof`) — preserves existing auth.rs callers (RFC-0968 §3 retirement, SuspensionAuth, SlashDestination) and keeps the anchoring wire schema distinct. Recommended path (smaller blast radius). (b) Evolve the existing types in place — requires updating every call site + v013 migration + re-shaped BLOB columns. Larger blast radius. Document the chosen path in the PR description. Updated AC #12 to reference the renamed types (`AnchorGovernanceSnapshot` / `AnchorGovernanceSigner` / `AnchorGovernanceProof`) per reconciliation path (a), with the fallback clause that the chosen path must be documented in the PR description. Updated mapping table row to match the renamed AC. **NIT fix**: - Duplicate sentence fragment at lines 244-245: "successor, file a new mission 0968a3-gossip-anchor-provenance." was repeated twice. Removed the duplicate. Prettier passes. Mission 0968a2 still in `open/` state. The reconciliation path (a) is recommended; the implementing claimant may choose (b) if they prefer in-place evolution.
mmacedoeu
added a commit
that referenced
this pull request
Aug 3, 2026
Round 8 review (background subagent, 2026-07-30) found 2 MAJOR + 1 MINOR. The 2 MAJORs are fixed; the 1 MINOR is reported without action. **MAJOR fix #1 — path (b) is unsafe, removed**: - The existing `GovernanceProof` in `crates/octo-reputation/src/auth.rs:113+` is NOT an older form of the anchor quorum wrapper. It is a semantically distinct **slash/suspension authorization envelope** carrying `governance_pubkey`, `recorder_id`, `reason_hash`, slash destination/amount/asset fields required by RFC-0968 authorization flows. The existing `GovernanceSnapshot` (line 21-25) is similarly tied to governance-membership semantics. - Path (b) (in-place evolution) would remove data required by current RFC-0968 authorization flows. It is not a viable reconciliation path. - Removed path (b) entirely. Scope item 2 now mandates path (a) only, with explicit rationale for why path (b) is not viable. **MAJOR fix #2 — AC #12 escape hatch closed**: - The previous AC #12 fallback 'or the chosen reconciliation path documented in PR description' allowed an implementation to satisfy the literal AC by documentation alone without adding the required types or migrating call sites. - AC #12 now requires: anchor-specific verifier types (`AnchorGovernanceSnapshot` / `AnchorGovernanceSigner` / `AnchorGovernanceProof`) defined per RFC-0955-R1 lines 177-200, with existing `GovernanceSnapshot` / `GovernanceProof` (RFC-0968 authorization envelopes) preserved unchanged at `auth.rs:21-25` and `auth.rs:113+`. Documentation alone no longer satisfies the AC. **MINOR #3 reported without action**: - `missions/open/0968-b-marketplace-integration.md` is a stale copy (declares 'Open (2026-07-26)') while the canonical Path B closure is at `missions/archived/0968-b-marketplace-integration.md` (declares 'Completed (Archived 2026-07-30 — Path B)'). Per BLUEPRINT.md §1152-1158 (just added), mission file moves require user authorization. Surfacing for user decision; not deleting.
mmacedoeu
added a commit
that referenced
this pull request
Aug 3, 2026
…liation Landing 0968a2 implementation. Closes 7 of 17 ACs directly; the remaining 10 are either pure verification (AC #1) or blocked by external dependencies (AC #7-8 chain-substrate selection, AC #9-11 live anchor plumbing, AC #13 config crate path, AC #16 0855p-b successor). Direct closes: - AC #2 (governance fields on ReputationAnchorBatch): added governance_snapshot, governance_proof, governance_set_hash fields to crates/octo-reputation/src/anchor.rs:140 with full digest folding. The 3 governance types live at auth.rs as AnchorGovernanceSnapshot / AnchorGovernanceSigner / AnchorGovernanceProof (path (a) mandated; preserves existing GovernanceSnapshot/GovernanceProof at auth.rs:21-25/113+). - AC #3 (batch_size: u32): RFC-0955-R1 line 173 mandate. Added batch_size field; within_leaf_cap() now requires batch_size == leaves.len(). - AC #4 (chain_block_height: Option<u64>): RFC-0955-R1 line 170 mandate. None at submission, Some(h) after MIN_FINALITY_BLOCKS finality. Digest uses Option tag encoding (0x00 None, 0x01 || 8 bytes BE Some). - AC #5 (AnchorLeaf::digest field order): per RFC-0955-R1 lines 420-422, score_ewma_raw now at position 5 (between last_event_id and last_event_unix). The previous last-position was a cross-implementation interoperability bug. - AC #6 (v012 migration): new crates/octo-reputation/migrations/v012__reputation_anchors_governance.sql extending reputation_anchors with governance_snapshot BLOB, governance_proof BLOB, governance_set_hash BLOB + lookup index on governance_set_hash. BUILTIN_MIGRATIONS bumped. - AC #12 (anchor-specific verifier types): path (a) types defined in crates/octo-reputation/src/auth.rs. meets_quorum() enforces exactly GOVERNANCE_QUORUM (3) distinct signers. - AC #17 (canonical test vector re-pinning): the 3 pinned vectors in tests/canonical_blobs.rs re-pinned to the new canonical serialisation. An independent Python implementation using hashlib.blake3 MUST reproduce these bytes byte-identically per RFC-0955-R1 line 422. Verification: cargo fmt + clippy -D warnings clean; cargo test --lib 197 passed; canonical_blobs 5/5 passed; stoolap_integration 47/48 passed (1 pre-existing flaky K=2 race test — fails before this commit too, acknowledged in the test's R22 comment as non-deterministic). External blockers remaining for 0968a2 closure: - AC #7/8 live ChainAnchorSubmitter (chain-substrate selection RFC) - AC #9/10 reorg + DID-rotation finality handlers (need AC #7) - AC #11 governance signature verification (needs governance key infra) - AC #13 per-deployment config plumbing (config crate path TBD) - AC #16 gossip cross-reference (needs 0855p-b successor mission) Implementation pattern: anchor_job.rs::plan_batches returns batches with placeholder governance fields (None chain height, zero snapshot/proof/set_hash, leaves.len() batch_size). Runtime populates them with active snapshot + 3-of-3 quorum proof before calling ChainAnchorSubmitter::submit. Keeps plan_batches chain-substrate-agnostic.
mmacedoeu
added a commit
that referenced
this pull request
Aug 7, 2026
… AC grounding
R7 review findings closed:
MAJOR (governance type collision): mandate path (a) — new anchor-specific types in same module — verified against current IMPL at crates/octo-reputation/src/{auth.rs:399-603, anchor.rs:174-208, anchor.rs:233+}; existing auth.rs::GovernanceSnapshot (L21-25) + GovernanceProof (L113+) preserved unchanged as RFC-0968 authorization envelopes (slash/suspension flows); new AnchorGovernanceSnapshot/AnchorGovernanceSigner/AnchorGovernanceProof/AnchorSignature types + 5 unit tests cover the anchor binding schema.
NIT (duplicate sentence): file no longer contains duplicate (prior edits removed it).
AC grounding updates — 7 ACs flipped to [x]:
- AC #2 governance fields (72bf19d + 48cf997 + b0660c3)
- AC #3 batch_size: u32 (same)
- AC #4 chain_block_height: Option<u64> (same)
- AC #5 AnchorLeaf::digest field order (b0660c3)
- AC #6 v012 migration (file shipped)
- AC #12 anchor-specific verifier types (72bf19d)
- AC #1 StakeBelowMinimum 0x2D verification (013a567)
10 ACs deferred per [[deferred-vs-unspecified]] named-owner rule to chain-substrate selection RFC + 0855p-b successor: #7/#8 live ChainAnchorSubmitter + rotation_receipt_id wire-through, #9/#10 reorg + DID-rotation finality handlers, #11 governance signature verification runtime hook (meets_quorum helper landed), #13 per-deployment config plumbing, #14/#15 idempotency + failure isolation tests, #16 gossip cross-reference, #17 canonical test vector re-pinning.
Version History v0.2 added; mission text no longer contradicts IMPL state.
63 insertions, 78 deletions.
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.
Problem
When PRs are merged to
main, thenextbranch falls behind. This requires manual sync which is error-prone and creates workflow friction.Solution
Automated workflow that runs after any push to
main(excluding doc-only changes) and syncsmain→nextautomatically.How It Works
mainnextis behindmainnextto matchmain--force-with-leasefor safetyBehavior
main--force-with-leaseto prevent data loss if someone else pushed to next