Skip to content

chore(ci)(deps): bump actions/github-script from 7 to 8 - #5

Merged
mmacedoeu merged 3 commits into
mainfrom
dependabot/github_actions/actions/github-script-8
Feb 25, 2026
Merged

mmacedoeu merged 3 commits into
mainfrom
dependabot/github_actions/actions/github-script-8

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Feb 24, 2026

Copy link
Copy Markdown
Contributor

Bumps actions/github-script from 7 to 8.

Release notes

Sourced from actions/github-script's releases.

v8.0.0

What's Changed

⚠️ Minimum Compatible Runner Version

v2.327.1
Release Notes

Make sure your runner is updated to this version or newer to use this release.

New Contributors

Full Changelog: actions/github-script@v7.1.0...v8.0.0

v7.1.0

What's Changed

New Contributors

Full Changelog: actions/github-script@v7...v7.1.0

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](actions/github-script@v7...v8)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot @github

dependabot Bot commented on behalf of github Feb 24, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: ci, dependencies. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@mmacedoeu
mmacedoeu enabled auto-merge February 24, 2026 23:02
@mmacedoeu
mmacedoeu disabled auto-merge February 25, 2026 00:58
@mmacedoeu
mmacedoeu merged commit cbb9390 into main Feb 25, 2026
5 of 8 checks passed
@dependabot
dependabot Bot deleted the dependabot/github_actions/actions/github-script-8 branch February 25, 2026 00:59
mmacedoeu added a commit that referenced this pull request Aug 3, 2026
Round 2 review of commit 3abc29b surfaced 6 NEW defects introduced
by the Round 1 fixes. All 6 are now addressed.

CRITICAL #1: stoolap set_event_anchor_tx_hash silently Ok on 0-row UPDATE
- store/stoolap.rs: when UPDATE affects 0 rows (event not found OR
  idempotent re-submit with same hash), the prior code returned
  Ok(()). Now distinguishes the two via a SELECT probe:
    * row absent           -> ChainRefInvalid("event_not_found")
    * row present + same hash -> Ok (idempotent re-submit)
    * row present + diff hash -> ChainRefInvalid("anchor_already_set")
  Mirrors the memory backend contract from commit 3abc29b.

CRITICAL #2: BLAKE3 cascade is order-sensitive without canonicalization
- porelay/aggregation.rs aggregate_children now sorts parents by
  (level, epoch, scope, proof_count, children_root) before hashing.
  Two replicas receiving the same parent set in different orders
  now produce identical children_root.

HIGH #3: clippy --features octo-reputation/stoolap -D warnings fails
- 4 unused imports in slash_api.rs (cfg-gated module) and
  cross_backend_integration.rs removed.
- store/stoolap.rs: while-let-on-iterator rewritten as for-loop
  (clippy::while-let-on-iterator).

MEDIUM #4: AnchorSubmitterRejected = 0x33 has no test pin
- error.rs cases array extended with the new variant (45 cases
  total). Test count assertion updated from 44 -> 45.

MEDIUM #5: BLAKE3 cascade has no tests
- porelay/aggregation.rs: 3 new tests verify:
    * aggregate_children_is_order_independent (same parent set in
      different orders -> same root)
    * aggregate_children_is_deterministic (same parent set across
      multiple calls -> same root)
    * aggregate_children_rejects_empty_parents

MEDIUM #6: set_event_anchor_tx_hash event_not_found path untested
- store/memory.rs: new test asserts ChainRefInvalid event_not_found
  when no record_signal has been issued.

New tests in anchor_job.rs:
- run_once_strict_emits_anchor_submitter_rejected: rejects
  RejectingSubmitter (returns SubmitterRejected("rpc_timeout")) and
  asserts AnchorSubmitterRejected variant with the original reason.
- run_once_strict_emits_already_anchored_in_window: rejects
  AlreadyAnchoredSubmitter and asserts AnchorSubmitterRejected
  with reason "already_anchored_in_window".

cargo clippy --workspace --all-targets --features
  octo-reputation/stoolap -- -D warnings: clean.
cargo test -p octo-reputation --features stoolap --lib: 183 -> 186.
cargo test -p octo-network --lib: 1320 -> 1323 (+3 BLAKE3 cascade
  tests).
mmacedoeu added a commit that referenced this pull request Aug 3, 2026
Round 2 review (background subagent, 2026-07-30) found 22 NEW findings
(3 BLOCKER + 7 MAJOR + 7 MINOR + 5 NIT). Round 1 fixes verified
CONFIRMED. All BLOCKER + most MAJOR fixed:

**BLOCKER fixes**:
- B1: Scope item 1 direction REVERSED. IMPL `0x2D` cannot move to
  `0x17` because `0x17` is already `GovernanceSlashFieldMismatch` at
  `error.rs:133` (compile error). The IMPL must not change discriminants
  per the `error.rs:22-28` guardrail. New direction: update RFC-0968
  §13 to match IMPL.
- B2: Scope item 1 now respects the `error.rs:22-28` guardrail
  ("Do NOT change discriminants until RFC-0968-A2 lands"). The
  guardrail cites 3 categories of breakage: cross-replica error
  propagation in persisted attestations, test fixtures, wire-format
  stability across protocol bridges.
- B3: Test vector count corrected. 3, not 5. The `CANONICAL_ANCHOR_BLOB`
  array has 3 pinned vectors (`{0,1,100}_LEAVES`) at lines 34-49 of
  `tests/canonical_blobs.rs`. The 2 additional tests are determinism
  tests, not pinned vectors.

**MAJOR fixes**:
- M1: RFC-0955 base (NOT R1) has 2 stale `0x2D` refs at lines 996 +
  1026. Corrected to `0x2A` to match IMPL + RFC-0968.
- M2: Unified 9 vs 10 ungrounded AC count. Mission 0968a2 owns ALL 9
  ungrounded ACs from 0968a + the 2 cross-RFC drift reconciliations.
  9 Scope items + 1 split (reorg+DID-rotation under one Scope item).
  Total: 11 ACs (8 inherited + 1 live adapter + 1 v012 migration + 1
  test re-pinning).
- M3: AC #4 ("Live ChainAnchorSubmitter impl") now has explicit gate
  "(gated on chain-substrate selection RFC)".
- M4: AC-to-Scope mapping table added.
- M5: Reorg vs DID-rotation — kept together under Scope item 4, but
  split into 2 separate ACs (AC #5 + AC #6).
- M6: Picked the IMPL-as-canonical direction (also resolves B1).
- M7: New migration `v012__reputation_anchors_governance.sql` added
  to Scope item 2 (governance_snapshot/governance_proof/governance_set_hash
  BLOB columns).

**RFC-0968 §13 fix** (M1 + M6):
- Line 2057: `StakeBelowMinimum { provided: u64 } = 0x17` →
  `StakeBelowMinimum { component: StakeComponent } = 0x2D`
- Line 2621 table: `0x17` → `0x2D` + payload description
- Line 616: `return Err(ReputationError::StakeBelowMinimum { provided: req.stake_amount })`
  → `return Err(ReputationError::StakeBelowMinimum { component: crate::error::StakeComponent::Octo })`

**RFC-0955 base fix** (M1):
- Line 996: `AnchorTupleFanoutExceeded (0x2D)` → `0x2A`
- Line 1026: `AnchorTupleFanoutExceeded (0x2D)` → `0x2A`

**RFC-0955 base file tracking**: the file was untracked (same pattern
as RFC-0955-R1 in commit aeb8583). Tracking + 0x2A fix linked in
this commit.

**MINOR/NIT fixes**:
- Prettier formatted.
- "Why not RFC-0968-A2 amendment" section updated to reflect the
  reversed direction (update RFC, not IMPL).

Mission 0968a2 status: still `open/`. Claimable after the structural
reorg is done (Scope items 1, 2, 4, 5). Scope items 3 + 6 + 9 require
external dependencies (chain-substrate RFC, 0855p-b successor) before
claim.
mmacedoeu added a commit that referenced this pull request Aug 3, 2026
Round 3 review (background subagent, 2026-07-30) found 10 NEW findings
(3 MAJOR + 5 MINOR + 2 NIT). All MAJOR + most MINOR fixed.

**MAJOR fixes**:
- F1 (rotation_receipt_id implicit coverage): Live ChainAnchorSubmitter
  Scope item 3 now explicitly states it covers 0968a AC #5 (chain-side
  encoding of rotation_receipt_id field through to v010 ledger's
  rotation_receipt_id column). Added explicit AC #5 "Live
  ChainAnchorSubmitter writes rotation_receipt_id through to v010
  ledger (covers 0968a AC #5 chain-side encoding)".
- F2 (GovernanceSnapshot/Signer/Proof types missing from IMPL):
  Scope item 2 now states that the 3 verifier types per RFC-0955-R1
  lines 177-200 must be created in a new auth.rs module (alongside
  the existing age_secs/is_fresh). Added explicit AC #8
  "GovernanceSnapshot / GovernanceSigner / GovernanceProof types
  defined per RFC-0955-R1 lines 177-200".
- F3 (plan_batches purity/wiring): Scope item 4 reworded — plan_batches
  is a pure function (no chain-state arguments). Now specifies either
  extending run_once_strict to call is_finality_reached BEFORE
  plan_batches, OR introducing a new plan_batches_with_reorg_check
  function.

**MINOR fixes**:
- F4 (misleading reserved-band citation): "per error.rs:8-49 context"
  → "per RFC-0968 §13 line 2641; note error.rs:8-49 mentions a
  post-amendment-82 reserved band 0x3A..=0xFF not yet active".
- F5 (10 Scope items confusing wording): "The 10 Scope items (9
  Scope + 1 split...)" → "The 9 Scope items (reorg + DID-rotation
  finality combined into 1 Scope item covering both; the 1:1 AC mapping
  would have produced 10)".
- F6 (canonical_blobs.rs lines 34-49 tight block): "lines 34-49"
  → "lines 34, 41, 48".
- F7 (gossip ingress handler underspecified): Scope item 9 now
  specifies "Target the ingress handler only (the handle_one /
  validate_envelope call site); the 6 test fixtures at lines 813,
  1056, 1206, 1288, 1336, 1389, 1526 intentionally use
  anchor_tx_hash: None as test default and should remain unchanged."
- F8 (event_id shorthand for 4-tuple): AC #9 rewording: "Idempotency
  test (2 duplicate submits on (did, signal_kind, layer, last_event_id)
  4-tuple) passes".

**NIT pending**:
- F9 (future RFC-0968-A2 amendment 0x2D impact) — forward-looking
  concern, not blocking.
- F10 (background job scheduler interface) — caller responsibility,
  not owned by this mission. Documented in Out of scope if needed.

Mission 0968a2 now: 9 Scope items + 14 ACs (was 12). 9 Scope items
  cover all 9 ungrounded ACs from 0968a (1:1 + 1 explicit
  chain-encoding + 1 verifier types).
mmacedoeu added a commit that referenced this pull request Aug 3, 2026
Round 6 review (background subagent, 2026-07-30) found 3 NEW findings
(1 MINOR + 2 NIT). All addressed.

**MINOR fix**:
- `chain_block_height` line 142 → line 170 in 3 occurrences (Scope
  item 2 line 120, AC #4 line 243, mapping table line 265). RFC-0955-R1
  line 142 is blank; the actual `pub chain_block_height: Option<u64>`
  declaration is at line 170 (after the governance fields per the
  RFC struct ordering).

**NIT fixes**:
- Why split math: 8 inherited + 9 new → 9 inherited + 8 new. The
  mapping table is the authoritative source. 0968a has 9 ungrounded
  ACs all mapping to 0968a2 Scope items 3-9. The 8 new ACs are the
  0968a2-discovered fix items (verification, governance fields,
  batch_size, chain_block_height type, AnchorLeaf::digest order,
  governance types, v012 migration, test re-pinning).
- IMPL comment at `anchor.rs:101-102` (the secondary symptom of
  the digest order bug): deferred — fixing the IMPL comment is
  part of AC #5 implementation, not a mission doc fix.

After this revision, all 17 ACs are grounded in actual code + RFC
text. Mission 0968a2 still in `open/` state. Prettier passes.
mmacedoeu added a commit that referenced this pull request Aug 3, 2026
Round 13 review (background subagent, 2026-07-30) found 4 issues:
1 MAJOR (R13-2) - false positive (0855p-b archive file exists).
2 MAJOR + 1 MEDIUM + 1 MINOR - all addressed.

**MAJOR fix #1 (R13-1) — 0968a AC #5#7 cross-reference**:
The mission's Scope item 3 + AC #5 cited 'covers 0968a AC #5
chain-side encoding' for the rotation_receipt_id coverage. AC #5 in
0968a is actually 'Anchor batch interval is configurable per
deployment; default = 300s' (line 164). The rotation_receipt_id AC
is at 0968a line 168 = AC #7. Replaced both references with AC #7.

**MEDIUM fix #3 (R13-3) — 0x17 unverifiable parenthetical**:
The mission said '(which is correct per RFC-0968)' about the
0x17/GovernanceSlashFieldMismatch slot. RFC-0968 §13 discriminant
table actually jumps 0x16 → 0x2D (no 0x17 entry); grep on
RFC-0968 returns 0 hits for both '0x17' and 'GovernanceSlashFieldMismatch'.
Updated parenthetical to acknowledge the gap: 'not referenced in
RFC-0968 §13; the RFC table jumps 0x16 → 0x2D per Round 13 reviewer
verification — see error.rs:8-49 guardrail context'.

**MINOR fix #4 (R13-4) — prettier cycle location acknowledgment**:
The Round 12 commit message mis-located the prettier cycle as
'path paragraph'. The actual cycle is on lines 162-167 + 169-173
(Scope item 2 nested sub-bullets + AnchorLeaf::digest sub-list).
This commit accepts the cycle; the committed state is canonical.
No structural change to the file.

**R13-2 (false positive)**: The reviewer claimed
missions/archived/0855p-b-cross-mission-reputation.md does not
exist. Verified: file exists at 9265 bytes, committed at
HEAD af255c8. The reviewer's find command may have run from a
different working directory. Reference is correct as-is.
mmacedoeu added a commit that referenced this pull request Aug 3, 2026
Round 14 review (background subagent, 2026-07-30) found 2 MAJOR findings.
Both addressed.

**MAJOR fix #1 — broken markdown fragment from Round 13 fix**:
The Round 13 fix (changing 'AC #5' to 'AC #7' in Scope item 3) went
sideways — the edit pattern left a duplicate fragment with broken
`**` / `:**` markers at lines 190-193. The duplicate was:
'of `rotation_receipt_id`)**: the live submitter must write the' +
'of `rotation_receipt_id`):** the live submitter must write the'.
Removed the duplicate fragment. The merged text now reads cleanly:
'**Explicitly covers 0968a AC #7 (chain-side encoding of
`rotation_receipt_id`)**: the live submitter must write the
`ReputationAnchorBatch.rotation_receipt_id` field through to the
v010 ledger's `rotation_receipt_id` column (per
`v010__reputation_anchors.sql` line 62). Wire it into...'

**MAJOR fix #2 — prettier check**:
Re-ran `npx prettier --write` after the markdown fix. The known
cycle on lines 162-167 + 169-173 (Scope item 2 nested sub-bullets
for path (a) reconciliation + AnchorLeaf::digest sub-list) persists.
This is a Prettier bug with Markdown list-item continuation
indentation; the committed state is the canonical version. The
reviewer verified finding #1 (the duplicate fragment) was a major
contributor to the prettier failure; that fix alone eliminated the
secondary markdown breakage. The remaining cycle is not a content
issue.

Mission 0968a2 file content is now consistent. The prettier cycle
is acknowledged as a separate Prettier issue without a clean fix.
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 3, 2026
Update Status header after 0968a2 implementation landed in commit
72bf19d. N9 (ReputationAnchorBatch governance fields drift)
resolved at the struct + digest + migration + test-vector level.
The 9 ungrounded 0968a ACs split cleanly into 3 categories:

- 5 (#1, #4, #5, #6, #7, #8) gated on chain-substrate selection RFC
- 1 (#9) gated on 0855p-b successor mission (gossip file ownership)
- 2 (#2, #3) achievable but need a live ChainAnchorSubmitter
  fixture (deferred until #1 lands)

Path B closure recommended (per BLUEPRINT §1152-1158 user-initiated
deferral rule). Mission substantively complete at the commit
boundary; residual work is separate chain-substrate + gossip
coordination effort.
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.
mmacedoeu added a commit that referenced this pull request Aug 17, 2026
Multi-round review of marketplace/ found 3 CRITICAL + 3 HIGH + 11 MED +
9 LOW. This commit lands the correctness fixes:

CRITICAL
- C1 orderbook.rs: BTreeMap key was (price, ts_unix); same-second
  placements silently overwrote each other. Replaced with monotonic
  per-book seq counter. New 'place_ask_same_second_does_not_overwrite'
  test pins the invariant.
- C2 orderbook.rs: match_top dropped both sides on partial fill,
  losing the residual. Now re-inserts residual qty with fresh seq.
  Two new partial-fill tests pin the invariant for both bid-larger
  and ask-larger cases.
- C3 escrow.rs: Escrow derived Clone, enabling double-settle vector.
  Dropped Clone derive; added EscrowSnapshot cloneable view + From
  impl. TaskEscrow same fix (dropped Clone, added TaskEscrowSnapshot).

HIGH
- H2 escrow.rs: cancel() was a no-op (Pending -> Pending) and the
  state diagram claimed Locked -> cancel() -> Pending (nonsensical).
  Removed cancel() entirely + CancelFromInvalid error; state diagram
  corrected. Buyers abandon via 'do not call lock()' instead.
- H3 slashing.rs: penalty amount computed as (stake as f64 * pct) ->
  u128, losing precision for stakes > 2^53. Now uses u128 throughout
  via (stake * pct_micro) / 1_000_000; pct_micro cast from f64 is in
  [0, 1_000_000] so no precision loss. Added checked_mul guard.

Test gaps (Pass 3 HIGHs #3-#5)
- reputation_compat.rs: added 3 tests covering controller_id_from_
  governance_pubkey, parse_canonical_did happy path, and record_
  with_now zero-controller_id rejection. Closes the RFC-0968
  retirement gate test-coverage gap.

Test updates
- time_priority_breaks_ties_oldest_first renamed to
  fifo_breaks_ties_first_inserted_wins (matches new FIFO semantics,
  not the misleading 'time priority' label).
- match_top_returns_crossing_pair renamed to
  match_top_returns_crossing_pair_exact_fill + added two partial-
  fill tests for bid/ask residual re-insert.

Verified: 73 marketplace lib tests + 76 E2E (marketplace_e2e +
task_market + e2e_proxy + eleven_step + cross_role_data_flow) =
149 tests pass, 0 fail. Clippy clean.

Remaining work (filed as follow-on missions):
- H1 escrow auth (Party enum for caller identity)
- Pass 2 H1 Marketplace.repo trait (decouple from concrete struct)
- Pass 2 H2 facade reputation migration to async compat
- Pass 2 H3 book load-on-open (hydrate from repo on restart)
- Pass 2 H4 SlashReason typed-discriminator (RFC extension surface)
- Pass 2 M2 slashing persistence (slashing state evaporates on
  restart)
mmacedoeu added a commit that referenced this pull request Aug 17, 2026
0957-g-verify-time-invariant.md
  - Status: PROPOSED → LANDED 2026-08-17 (commit d007de5)
  - AC #5 corrected: VaultRowSnapshot uses primitive bool is_active
    (NOT octo_vault::VaultState enum) — Layer B → Layer B isolation
    pattern upgrade for VaultLookup over the existing CapabilityCatalog
  - AC #7 corrected: verify surface is Macaroon::verify_for_vault_op
    (not CapabilityTokenV2::verify_vault_bound) — Macaroon.caveats is
    the load-bearing verify path; V2 envelope carries bundle + macaroon
  - AC #6 marked DEFERRED to S5.1 (OctoVaultLookup glue crate cannot
    live in octo-vault directly — Layer B → Layer E forbidden)
  - Added Mermaid sequence diagram showing verify-time path
  - Dep edges table corrected (no Layer B → Layer B reverse dep on
    octo_vault::VaultState)
  - Critical files list reflects actual LANDED state (28+ callsites)
  - Version history row added

0957-g1-octo-vault-lookup-glue.md (NEW)
  - S5.1 follow-on mission for OctoVaultLookup glue crate
  - Pattern matches TransportDeliveryCatalog (octo-cap-macaroon-transport)
  - Topology: octo-cap-macaroon (trait) ← octo-cap-macaroon-vault
    (impl) → octo-vault (substrate) → stoolap fork (UNIQUE INDEX)
  - 8 ACs: NEW crate + deps + OctoVaultLookup impl + VaultState→bool
    mapping + unit tests (hit active / hit frozen / miss) +
    integration_tv_c1 + verification gate + memory card
  - Mermaid topology diagram
  - Cargo.toml description mirrors TransportDeliveryCatalog

Co-Authored-By: Claude <noreply@anthropic.com>
mmacedoeu added a commit that referenced this pull request Aug 17, 2026
…870-01

S6a of 14-RFC storage restructure plan (Stream A.1 continuation;
user-chosen split-by-RFC decision overrides §22 atomic-blocker).

- RFC-0870 §Version History v2.1 row added documenting version_tag:
  u8 field (V1=0xA0, V2=0xA1), V1 hard-reject at verify, wire-format
  break per §14.1 with V1/V2 distinct envelope_id replay defense
- RFC-0870 §NodeEnvelope Version Tag subsection added under
  §Specification: field placement (after envelope_id, before
  from_did), build rejects unknown tags with UnsupportedVersion,
  verify_version gate semantics, migration impact
- TV-0870-01 byte-exact fixture (5/5 tests) in
  crates/octo-protocol/tests/tv_0870_version_tag.rs:
    * V2 build + borsh round-trip
    * V1 build (legacy construction path)
    * Unknown tag (0xFF) rejected at build with UnsupportedVersion
    * verify_version: V2 ok, V1 rejected (RFC-0870 §14.1), unknown
      rejected
    * V1 and V2 distinct envelope_id (replay-defense invariant)
- S5 status memory card cross-link added (S6a AC #5)
- Mission YAML 0870-c1 flipped PROPOSED → LANDED

Pre-req: S5 verify-time invariant LANDED 2026-08-17 (d007de5).

Out of scope (deferred per plan §3): S6b RFC-0957 (20 TV), S6c
RFC-0862 (8 TV), S6d RFC-0900 (10 TV), S6e RFC-0105 (109 TV),
S6f RFC-0959 (25 TV), S6g RFC-0960 (108 TV).
mmacedoeu added a commit that referenced this pull request Aug 17, 2026
…, 3 LOW)

Round-1 review of S6a (commits c7f99a4 + eb71fb9) found 13
findings. Resolution:

CRITICAL:
- CRIT-1 RFC verify contract contradicted itself + implementation.
  Rewrote the §NodeEnvelope Version Tag Verify contract paragraph
  to assert verify_version returns Ok ONLY for V2, rejects V1.
- CRIT-2 AC #5 referenced a phantom '## Cross-reference' section in
  the mission YAML. Added the missing section with explicit pointers
  to S5 memory card, status card, plan §3 row 6, review source §14.1.
- CRIT-3 §22 atomic-blocker bypass risk-acceptance was recorded only
  in mission YAML. Added explicit risk-acceptance line in v2.1
  Version History row.

HIGH:
- HIGH-1 v2.1 row 'additive' drift. Replaced with explicit
  'wire-format break (no field removed, but field re-ordered + new
  mandatory field inserted — pre-V2 receipts unparseable)'.
- HIGH-2 replay-defense test misclaim. Docstring corrected: V1
  hard-rejected at verify_version means this test pins
  version_tag-participates-in-hash, not V1-replay-defense.
- HIGH-3 build-time guard test brittleness. Added sibling test
  tv_0870_01_runtime_gate_rejects_bypassed_unknown_tag using struct
  literal (bypassing build) to pin the runtime gate independently.

MEDIUM:
- MED-1 V1 accept-at-build / reject-at-verify split. Intentional;
  documented rationale added to mission Risks section.
- MED-2 paragraph header 'ADDITIVE' vs Migration 'WIRE-FORMAT
  BREAKING'. Header rewritten to disambiguate (additive to UUID
  table, breaking for struct).
- MED-3 orphan V1 build test kept — rationale documented in MED-1.
- MED-4 envelope_id test missing byte-position pin. Added
  tv_0870_01_byte_position_pin asserting bytes[32] == 0xA1 (V2)
  and 0xA0 (V1).

LOW:
- LOW-1 clippy allow mixed RFC-0871 + RFC-0870 §refs. Split into
  two comment lines (one per RFC concern).
- LOW-2 unfulfilled follow-up back-link. Closed — S5 status card
  already lists S6a deliverables (reverse direction not needed).
- LOW-3 byte-position doc-bug. Resolved by MED-4 byte_position_pin
  test.

Verify gate:
- cargo test -p octo-protocol --test tv_0870_version_tag: 7/7
  pass (was 5/5; +2 regression tests)
- cargo clippy --workspace --all-targets --features full: clean
- cargo fmt --all: clean
mmacedoeu added a commit that referenced this pull request Aug 17, 2026
… 20 TV fixtures

S6b of 14-RFC storage restructure plan. Back-fills RFC-0957 v2.1
amendment text (Verify-Time Extension + Caveat DSL Extension
subsections) + 20 byte-exact TV-0957 fixtures pinning wire form of
9 Caveat DSL variants + 5-step verify-time path + 5 regression
tests.

Files:
  - rfcs/accepted/economics/0957-capability-token-format.md
    (v2.1 row + 2 new subsections)
  - missions/open/0957-c1-verify-time-amendment.md (NEW)
  - memory/mission-0957-c1-verify-time-amendment-status.md (NEW)
  - memory/MEMORY.md (index pointer)
  - memory/mission-0957-g-verify-time-invariant-status.md (S6b section)
  - crates/octo-cap-macaroon/tests/tv_0957_verify_time.rs (NEW, 20 tests)

Verification:
  - cargo test -p octo-cap-macaroon --test tv_0957_verify_time → 20/20 pass
  - cargo test -p octo-cap-macaroon --lib → 193/193 pass
  - cargo clippy -p octo-cap-macaroon --all-targets -- -D warnings → clean
  - cargo fmt --all -- --check → clean
  - prettier → formatted

Pre-existing S4 DFP Round 2 quota-router-cli settle_* failures
(per AC #5 exclusion clause) — unrelated.

Lesson (logged in memory card): always read real source enum/struct
before drafting RFC amendment pseudocode that future TV fixtures
reference. Drift catch: drafted 'Permission { kind, scope }' but
real is 'Permission(PermissionKind)'; fixed before TV written.

Push user-only per [[feedback_initiative_user_only]] +
[[git-workflow]]. Queued on next alongside c7f99a4 S6a.
mmacedoeu added a commit that referenced this pull request Aug 17, 2026
…ssions

Per audit verdict 2026-08-17 (memory card audit-2026-08-17-...)
closes 7 distinct parallel-model risks across workspace.

RFC amendment filings (S6 B0 atomic-blocker bundle per plan §3 A.1):
- 0862-c9-micro-octow-type-unification: Risk #1 CRITICAL
  (MicroOctoW type alias split; 3 sites, 2 underlying types)
- 0105-x-s4-deferred-codemod-sites: Risk #4 HIGH
  (u128 field type drift in marketplace/task_market/slash_store/
  settlement_event_repo/CLI; 7 files)
- 0959-c1-wire-format-amendment: Risk #5 HIGH (S6e RFC-0959
  settlement wire format; DqaEncoding + VaultLookup trait reuse)
- 0900-d-chain-aware-slash-ledger: Risk #2 CRITICAL portion
  (S6d RFC-0900 slash ledger schema; DQA(12) + chain_id PK)
- 0960-vault-substrate-amendment: S6f RFC-0960 chain-aware vault
  substrate; v2.1-Resolved → v3.0; 108 byte-exact TV
- 0105-v-asset-id-addendum: S6g RFC-0105 asset_id_for derivation;
  v1.9 → v2.0; 109 byte-exact TV (9 TV-D9 + 100 TV-D10)

All 7 RFC amendments per §3 A.1 now accounted for: 4 filed today
+ 3 already-LANDED (RFC-0870 via 0870-c1; RFC-0862 via 0862-c1;
RFC-0957 via 0957-c1 + 0957-g).

Spend_ledger + vault balance remain STRUCTURAL dual substrates per
RFC-0862 §Future Work F12 (parallel by design, not convergent without
redesign of spend_ledger substrate).
mmacedoeu added a commit that referenced this pull request Aug 17, 2026
…pdates

Card: memory/audit-2026-08-17-storage-restructure-parallel-model-risks.md
- Hard ground-check of plan §3 + review §20.x under lens
  'spending/cost unified into capabilities-vault model'
- Verdict: PARTIAL UNIFICATION (vault substrate ahead of RFC text
  on verify-time + WrappedOnly)
- 7 distinct parallel-model risks: 3 CRITICAL (#1 MicroOctoW split,
  #2 4 column types, #3 STRUCTURAL spend_ledger not vault-bound),
  2 HIGH (#4 u128 drift, #5 1 of 2 vault-lookup paths landed),
  1 MED (#6 4 ChainId reps), 1 LOW (#7 octo-reputation u32)
- Will parallel models persist: YES by design (3) + YES by omission
  (5 — closure missions filed 2026-08-17)
- Push: queued on next, push user-only

MEMORY.md: +4 mission pointers (0862-c9 + 0105-x + 0959-c1 +
0900-d via earlier filing) + audit verdict pointer + 2 more
(0960-v + 0105-v filed in same commit).
mmacedoeu added a commit that referenced this pull request Aug 21, 2026
…ed error

S6c Round 1 security review finding #8: dqa_to_i64's scale == 0
invariant is an unconditional panic reachable from a storage path
— panic in a drain handler is an availability surface. S6c Round 2
code review LOW #5 echoed the gap and pointed at the adjacent
0862-c7 u64→i64 wrap mitigation as the right shape.

- New SpendLedgerError::InvalidScale { expected, actual } variant.
- dqa_to_i64: fn(Dqa) -> i64 → fn(Dqa) -> Result<i64, SpendLedgerError>.
  Returns InvalidScale on scale != 0; no debug_assert (typed-error
  path is testable under cargo test dev profile).
- seed + try_deduct reject scale != 0 at function entry, before
  the drain_lock + DB hit (mirrors NegativeCost guard per 0862-c8).
- Inline assert_eq! at dqa_to_i64 + duplicate asserts in seed +
  try_deduct removed (centralized into the typed-error gate).
- 2 new byte-exact TV (TV-0862-12 seed + TV-0862-13 try_deduct);
  existing 14 TV byte-stable (TV-01..05 + 07 + 08 + 04b + 09 +
  09b + 15 + 16 unchanged).
- RFC-0862 v2.0.4 entry + §Scale precondition subsection.

Verification:
- cargo test -p quota-router-storage: 191 lib + 16 integration TV pass.
- cargo clippy --all-targets --all-features -- -D warnings: clean.
- cargo build -p octo-paid-query -p octo-wallet: green (no public
  API change at the crate-root — SpendLedgerError is a new variant
  in the existing enum).

Closes mission 0862-c4.
mmacedoeu added a commit that referenced this pull request Aug 27, 2026
L5 CRITICAL #5 (Mission A test naming): rename vault_balance_projection
tests 1:1 to tv_vp1..tv_vp5 matching the plan.

L5 CRITICAL #3 (producer wrapper tests): add tv_vp13_producer_drain_lock
singleton test in octo-policy/event_log_producer.rs. The full
3-sink atomicity is covered by Mission F's 15 TV-BE tests in
burn_event.rs.

NO PUSH.
mmacedoeu added a commit that referenced this pull request Sep 8, 2026
Land \`octo mesh rpc\` per RFC-0011-f §Subcommand Taxonomy
\`[ADD]\` surface entry #5. Request/response pattern over the
RFC-0871 envelope substrate (vs \`forward\` = fire-and-forget).

## Substrate (Layer C — octo-mesh)

- New \`octo_mesh::rpc\` module:
  - \`RpcCorrelation { request_envelope_id, response_envelope_id,
    round_trip_ms, response_payload, status }\` — substrate-truth
    request/reply record
  - \`RpcRequest { peer_did, method, params }\` — CLI-constructed
    input
  - \`rpc_invoke(RpcRequest, timeout_ms) -> Result<RpcCorrelation,
    MeshError>\` — Phase 1 placeholder; gates on canonical DID
    shape (RFC-0010) + method-registry lookup (\`ping\` registered,
    unknown methods → \`MeshError::UnknownMethod\`). Deterministic
    BLAKE3-256 envelope_id derivation via
    \`octo_cap_macaroon::blake3_hash\` (no parallel \`blake3\` dep
    per no-parallel-abstractions principle).
- 2 new \`MeshError\` variants: \`UnknownMethod { method }\`,
  \`RpcTimeout { peer, method, timeout_ms }\`. CLI maps
  \`UnknownMethod\` → exit 19 (\`EnvelopeAuthorizationFailed\`) and
  \`RpcTimeout\` → exit 20.
- Dep additions: \`octo-cap-macaroon\` (BLAKE3 wrapper),
  \`serde_json\`, \`tokio\` (runtime stub for follow-on
  \`NodeTransport::send_best\` wiring per RFC-0870k AC-6).

## CLI (Layer C — octo-cli)

- \`MeshAction::Rpc\` variant: \`--peer-did\`, \`--method\`,
  \`--params\`, \`--rpc-timeout-ms\` (default 30_000), \`--dry-run\`.
- \`RpcOutput\` + \`RpcReceipt\` payload types (peer_did, method,
  request_envelope_id, response_envelope_id, response_payload,
  round_trip_ms, status). Schema-version carried via
  \`OutputEnvelope::SCHEMA_VERSION\`.
- 12 new unit tests covering TV-RPC-1..4 (params parse + 64 KiB
  clamp + nested-secret redaction, RPC output schema, substrate
  error mapping → CLI exit codes, dry-run preview).
- 8 new integration tests (\`crates/octo-cli/tests/mesh_rpc.rs\`)
  exercising the binary via \`assert_cmd\`: TV-RPC-1 success
  round-trip, TV-RPC-3 unknown method → exit 19, TV-RPC-3b legacy
  DID → exit 4, TV-RPC-3c empty method → exit 19, TV-RPC-4
  request/response envelope_id correlation match,
  TV-RPC-4b dry-run no receipt persistence, TV-RPC-4c receipt
  redaction, confirm-gate in Human mode.
- Async dispatch surface: \`rpc_cmd\` is \`async fn\`,
  \`MeshAction::Rpc\` arm wraps in per-call
  \`tokio::runtime::Builder::new_current_thread()\` so the sync
  \`dispatch()\` chain stays sync (no \`async fn\` propagation
  through the rest of the surface).
- \`peer::map_mesh_error\` extended with \`UnknownMethod\` /
  \`RpcTimeout\` arms mapped to \`Internal\` (peer-table path never
  invokes the RPC substrate; mapped for exhaustive-match
  completeness).

## Mission close-up

- \`missions/claimed/0011-f-mesh-rpc-subcommand.md\` →
  \`missions/archived/completed/\` (status Claimed → Completed,
  completed_at stamped 2026-09-01).

## Layer direction

A → B → C clean. Layer B (octo-ident, octo-cap-macaroon) +
octo-protocol (Layer 1 stable) REUSED only. octo-mesh (Layer C
specialized node) EXTENDED with the \`rpc\` module — no central
enum for RPC method names per RFC-0011-f §RPC Surface + design
principles (extension over enumeration).

Per [[feedback_initiation_user_only]] + [[git-workflow]] push +
PR user-owned. NO PUSH.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant