You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Five real findings from Codex round-5 on PR #595, plus two findings
held as Hold-the-Line (backwards-compat we explicitly don't owe) and
one stale finding already fixed in 6a58ae2.
Findings 5 + 6 — Adapter-level fail-open removed
- chain/src/chain-adapter.ts: make `accessPolicy` and `publishPolicy`
required fields on CreateOnChainContextGraphParams so `{}` can no
longer silently create a public + open CG (privilege widening).
- chain/src/evm-adapter.ts + mock-adapter.ts: enforce the required
fields at runtime; refuse with an actionable error when omitted.
- chain/src/evm-adapter.ts: getMinimumRequiredSignatures() now throws
when ParametersStorage isn't resolvable instead of returning a
hardcoded 3. The agent+publisher fail-closed guards already throw
on "missing probe" / "garbage value", but the adapter was silently
returning the wrong quorum from a null contract ref. Closed.
- Added parity-test coverage for both behaviours.
Finding 8 — Proposer-eligibility math in VerifyCollector
- VerifyCollector.collect() previously hardcoded
`remoteRequired = requiredSignatures - 1`, assuming the proposer
always self-counts. After the round-4 sharding-table filter, an
edge node proposer with identityId=0 gets dropped, leaving 0 sigs
on a `minimumRequiredSignatures=1` chain → spurious no_quorum.
- New `proposerCountsTowardQuorum?: boolean` (default true) lets the
agent flag ineligible proposers so the collector demands the FULL
quorum from remote peers.
- DKGAgent.verify() now computes `proposerEligible` BEFORE calling
collect() and passes it through.
- Tests pin all three branches (proposer counts, proposer doesn't
count, mixed) and the still-passing self-sign 1-of-1 path.
Finding 7 — Verify-proposal metadata leak
- The collector was fanning verify proposals (payload includes
contextGraphId / verifiedMemoryId / batchId / root entities) to
EVERY connected peer — for curated CGs that leaked CG metadata to
unrelated peers before the downstream signer filter ran.
- DKGAgent now resolves `getParticipantPeers` via the existing
CGMemberEnumerator (allowlist for curated CGs, topic-subscribers
for public, empty for legacy unknown). VerifyCollector accepts an
async getParticipantPeers signature for this.
Finding 2 — Drop legacy DKG_PARTICIPANT_IDENTITY_ID verify filter
- `getVerifyParticipantIdentityIds` read pre-LU2 `_meta` triples and
enforced them as a HARD allowlist in verify, which could strand
already-registered CGs after upgrade when the current sharding
table doesn't match the old roster (and `registerContextGraph`
early-returns when onChainId is set, so it can't be re-fixed).
- Deleted the method entirely; sharding-table membership is now the
only authoritative ACK gate. Trust-degradation now keys off
"any remote sharding-table-eligible ACK" instead of the legacy
participant distinction.
- Simplified `resolveVerifyApprovalIdentityId` to drop the legacy
candidate-set probe; modern responders stamp identityId in the
approval payload.
Stale / held-the-line
- Finding 3 (sharding-table fail-open) was on commit 269e8a2 and
was already fixed by `6a58ae2d` (no-method branch throws).
- Findings 1 + 4 (hard-400 on deprecated request fields breaks
legacy callers) — user explicitly declined backwards compat for
internal rc.x clients; we're keeping the explicit deprecation
error so old callers fail loudly rather than silently writing
CGs with broken assumptions.
Test-callsite ripple
- 19 test call sites updated to pass `accessPolicy`+`publishPolicy`
explicitly. Existing semantics preserved (public+open where the
test used to publish openly, curated+curators-only where it used
the strict path). No new functional behaviour, just explicit args.
Suites green locally:
- packages/chain mock-adapter-parity 15/15
- packages/publisher verify-collector 14/14
- packages/publisher workspace + sigcoll 93/93
- packages/agent e2e-publish-protocol 13/13
- packages/agent agent.test 115/115
- packages/agent swm-ack-quorum 31/31
- packages/cli daemon-http-behavior-extra 50/50
- swm-snapshot-sync flake (pre-existing) unrelated.
Co-authored-by: Cursor <cursoragent@cursor.com>
0 commit comments