Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical model and harness issues remain, along with a moderate invariant concern.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds a Quint model of the Zeronym divert protocol and runs its checks in CI.
Changes:
- Models queueing, lookup, publication, and unreliable network behavior.
- Checks known fixes and documented protocol gaps.
- Adds a dedicated Quint specification CI job.
| File | Summary | Review findings |
|---|---|---|
zeronym/spec/divert.qnt |
Protocol model and invariants | Critical (3 votes): A lying hub can expose queued or absent data as tx, allowing noEarlyBytes to pass despite early bytes. Moderate (1 vote): The L4 invariant is tautological and cannot detect a guard violation. |
zeronym/spec/check.sh |
Simulation and expected-outcome checks | Critical (3 votes): Every non-zero Quint exit is treated as an expected counterexample, allowing execution failures to pass silently. |
.github/workflows/zeronym-guards.yml |
CI job for the model | No specific findings. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…are check.sh From review on #82. Lying replies were tagged hubSaw "lie", which exempted them from noQueuedBytes and noEarlyBytes, so a lying hub releasing a queued migration's bytes passed as safe. Replies now carry the hub's real state plus an `honest` ghost flag. The shim's claims (guardHolds, pendingVisible) are checked against a lying hub as shimSafety; the hub's claims (noQueuedBytes, noEarlyBytes) are checked against an honest hub, and current.noEarlyBytes is a new expected failure recording that attestation is what stands between a queued migration and early release. check.sh read every nonzero exit as a counterexample, so a crash, a download failure or a misspelt invariant passed each "fails" row. It now classifies runs by Quint's [ok] / [violation] line and fails the gate on anything else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The model currently masks an unresolved #80 regression, and the verification count is inaccurate.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
Resolved since last review (2)
zeronym/spec/divert.qnt models the wallet, shim and hub over a mixnet that loses, duplicates and reorders messages, with a hub that can be set to lie. It mirrors the get_transaction reply arms in intercept.rs, the queue-first lookup in server.rs, admission in queue.rs and the epoch flush in batcher.rs. check.sh simulates eight module/invariant pairs and asserts each outcome: - the four safety claims hold for the current code (L4 guard, queued bytes stay in the hub, a queue hit reads as pending, bytes only after publish); - ecb4641 and 45e408f reappear with their fixes switched off; - three known gaps stay visible: silent refusal over Nym, a lying hub faking pending, and the flush-window pending -> NOT_FOUND flip. It runs as a cheap-tier job in zeronym-guards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…are check.sh From review on #82. Lying replies were tagged hubSaw "lie", which exempted them from noQueuedBytes and noEarlyBytes, so a lying hub releasing a queued migration's bytes passed as safe. Replies now carry the hub's real state plus an `honest` ghost flag. The shim's claims (guardHolds, pendingVisible) are checked against a lying hub as shimSafety; the hub's claims (noQueuedBytes, noEarlyBytes) are checked against an honest hub, and current.noEarlyBytes is a new expected failure recording that attestation is what stands between a queued migration and early release. check.sh read every nonzero exit as a counterexample, so a crash, a download failure or a misspelt invariant passed each "fails" row. It now classifies runs by Quint's [ok] / [violation] line and fails the gate on anything else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
768e476 to
4a456c9
Compare
From review on #82: the job runs code fetched at run time (npx, Quint's evaluator), so it should run with a SHA-pinned checkout, no persisted credentials, and contents: read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The CI matrix omits the documented lying-hub noQueuedBytes counterexample, allowing an expected failure to disappear without failing the gate.
Review effort: Lite
Findings: None
Resolved since last review (2)
From review on #82: divert.qnt documents that a lying hub breaks both hub claims, but check.sh asserted only noEarlyBytes, so the noQueuedBytes gap could disappear without failing the gate. Ten rows now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Adds a Quint model of the shim <-> hub divert protocol, plus a cheap CI job that checks it.
zeronym/spec/divert.qntmodels the wallet, shim and hub over a mixnet that loses, duplicates and reorders messages, with a hub that can be set to lie. It mirrors theget_transactionreply arms inintercept.rs, the queue-first lookup inserver.rs, admission inqueue.rsand the epoch flush inbatcher.rs.zeronym/spec/check.shsimulates ten module/invariant pairs and asserts each outcome, classified by Quint's verdict line so a crash or misspelt invariant fails the gate. It runs as a newspecjob inzeronym-guards(ubuntu-latest, Quint pinned at 0.32.0).Rebased onto #80, so
currentmatches main. Simulation samples random traces; a boundedquint verify(Apalache) pass is a possible follow-up.Verification
sh zeronym/spec/check.sh: 10/10 outcomes as expected (TypeScript backend locally)sh zeronym/guards.shgreen🤖 Generated with Claude Code