Repository navigation
test(nova-shell): use a full-size RSA key so the tamper check is not flaky - #43
Conversation
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
🟢 Approval recommended
The change is limited to test fixtures, with arithmetic checks supporting correct signing and tamper rejection.
0 open findings
What changed in this PR
Stabilizes the signed-gossip tamper test by replacing its tiny RSA modulus with a 512-bit test-only key. Production code is unchanged.
Changes:
- Updates matching private and public RSA fixtures.
- Adds a comment explaining the previous intermittent failures.
| File | Description |
|---|---|
nova-shell/tests/test_node_federation.py |
Replaces the test key to prevent digest-reduction collisions. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
main's windows-latest job failed after #37 on test_signed_gossip_verifies_and_records_trust (a tampered signature was accepted). #37 changed only docs, and the code matched #42, which passed.
Cause: the test key's modulus is 221, and the signature check compares the digest reduced mod n. Over 3000 runs, 105 tampered payloads were falsely accepted. This is a test-key problem, not platform-specific: it showed on Windows by chance.
Fix: a 512-bit test-only key. Over 3000 runs, 3000 of 3000 valid payloads accepted and 0 of 3000 tampered ones. The production code is unchanged.
🤖 Generated with Claude Code