Repository navigation
fix(id): refuse non-player signers in sign_genesis/sign_claim (#6424) - #6559
Conversation
sign_genesis returns SignError::NotAPlayer for a key that is neither seat. sign_claim now takes the agreement and refuses non-player signers (NotAPlayer) and claims answering another agreement (AgreementMismatch); the bare path is crate-private sign_claim_unchecked. Also fixes two str/String comparisons in world_net.rs that stop the id lib compiling on current main.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🤖 Agent note · handed off\n- Agent: queue worker (repo-worker-code), lane code-i\n- Session / ID: task 13315\n- Found via: queue claim\n- Task: task 13315 (pr_shepherd) for issue #7297, PR #6559 — assigned to opencode execution lane; handed off to laptop opencode claimant, left claimed for it.\n- Expectation: claimant launches bound opencode session and drives to terminal disposition, re-checking hard-stop labels first. Fresh verification this shift: see task 13315 checkpoint; no hard-stop labels on target at 2026-11-08T18:29:33Z.\n- Links: issue #7297, PR #6559\n |
|
🤖 Agent note · handed off
|
|
🤖 Agent note · handed off
|
|
🤖 Agent note · claimed
|
|
🤖 Agent note · parked
|
|
agent-note:v1
|
|
🤖 Agent note · handed off
|
|
🤖 Agent note · handed off
|
|
agent-note:v1 |
|
🤖 Agent note · handed off
|
…station-signer-player # Conflicts: # pkgs/id/src/world_net.rs
|
state: in_progress Resumed PR #6559 (opened by the earlier attempt at task 10870) instead of starting over. Merged current main (ed96e87) into the branch: the merge conflict in Verified locally on the laptop at the merged head: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 728c947536
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| #[test] | ||
| fn sign_genesis_refuses_non_player() { | ||
| let (_x, _o, agreement, _claim) = setup(); | ||
| let stranger = key(200); | ||
| let result = sign_genesis(&stranger, 0, None, &agreement, vec![]); |
There was a problem hiding this comment.
Add property tests for the signer-membership invariants
The new signer-membership and agreement-matching checks are covered only by fixed examples using three predetermined keys. The root testing doctrine requires property coverage for meaningful ID/crypto invariants and explicitly says example tests do not replace it. Add proptest coverage generating distinct seat keys, outsider keys, and matching/mismatching agreements, asserting that either seated signer is accepted while outsiders and claims answering another agreement are refused.
AGENTS.md reference: AGENTS.md:L42-L46
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Added the property coverage: new pkgs/id/tests/attestation_signer_properties.rs (proptest, following the chain_properties.rs conventions — oracle stated in the file header, failure_persistence: None).
Three properties over generated distinct seat/outsider key triples and agreement variants (game id, logic hash, objection window):
genesis_signer_membership— either seated signer is accepted by sign_genesis; an outsider is refusedSignError::NotAPlayer.claim_signer_membership— either seated signer is accepted by sign_claim for a claim answering the agreement; an outsider is refusedNotAPlayer.claim_must_answer_the_given_agreement— a claim answering a different agreement (same seats, different hash) is refusedAgreementMismatchfrom either seated signer, and signs fine against its own agreement as the control.
Verified on the laptop against this head: cargo test --test attestation_signer_properties 3 passed; the sibling attestation suites stay green — attestation_signer_player 3, attestation_poc 13, attestation_outcome_sign 4.
…station-signer-player
|
state: in_progress Correction to my earlier note on this PR (comment 6796415491): the local test counts quoted there (24 + 4 + 6) came from an unreliable interim tool delivery and were wrong. Verified results, from full cargo output captured to a file with cargo's own exit code:
Also correcting the record on |
Done (already_done) — task 13315, PR #6559 mergedFresh verification by lane any-d (2026-11-12): PR #6559 is MERGED. It merged at 2026-11-11T16:17:05Z with merge commit f998d27. Title: fix(id): refuse non-player signers in sign_genesis/sign_claim (#6424). The PR carries no labels, so no held / user/owned / do-not-merge / do-not-auto-edit restriction applies. The earlier hard-stop note based on authorship was superseded by the 2026-11-11 #7297 ruling recorded on task 13315 (authorship by the fleet working account is not a hold). No further work is needed on PR #6559. Issue #7297 remains open for the other PRs in its batch; this note records only the disposition of PR #6559. Completing task 13315 as already_done. |
Closes #6424. Phase 2 of design #6487.
sign_genesisreturnsSignError::NotAPlayerwhen the signing key is neither seat.sign_claimnow takes theGenesisAgreement; refuses non-player signers (NotAPlayer) and claims answering another agreement (AgreementMismatch). The bare path is crate-privatesign_claim_unchecked(artifactsign_uncheckedpattern).compute_stateunchanged.tests/attestation_signer_player.rs(4); existing attestation tests updated for the new signature. 20 attestation tests pass locally.strvsStringcomparisons inworld_net.rs(lines 658, 1621) that stopped theidlib compiling on main9c06d0c8a4(rustc 1.99.0). Unrelated to the issue; included so tests can build.Queue task 10870.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.