Repository navigation
test(api): prove acceptance row 15 over HTTP - #360
Conversation
Regression-For: c60f267 Co-Authored-By: Codex (GPT-5) <noreply@openai.com>
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ac2f9e479
ℹ️ 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".
| assert_eq!(status, 200, "{context}"); | ||
| assert_eq!(context["run"]["policyJson"], frozen); |
There was a problem hiding this comment.
Exercise policy binding through the evidence routes
When this test is used as the runtime proof for acceptance-matrix row 15, these assertions only show that GET /context returns the run’s stored policy and that dispatch notices live-policy drift. The test never submits or reads Candidate/Evidence with a policy identity, so a regression where those interfaces omit the frozen policy or accept evidence associated with another policy would still pass; exercise that binding through the Candidate/Evidence routes or leave the documented policy gap open.
AGENTS.md reference: AGENTS.md:L40-L42
Useful? React with 👍 / 👎.
| assert_eq!(fx.candidate(COMMIT_A, 6).0, 200); | ||
| let (status, first) = fx.evidence(); |
There was a problem hiding this comment.
Reject a mismatched commit in the binding test
This purported commit-binding test only submits the matching COMMIT_A and verifies that the response echoes it. If POST /evidence stopped checking the currently bound candidate and simply stored the caller-supplied commit, every assertion here would still pass; add an unbound or COMMIT_B submission that must return 409 so the required Candidate/Evidence binding is actually observed.
AGENTS.md reference: AGENTS.md:L40-L42
Useful? React with 👍 / 👎.
| let (status, replay) = fx.evidence(); | ||
| assert_eq!(status, 200, "{replay}"); | ||
| assert_eq!(replay, first); |
There was a problem hiding this comment.
Reject conflicting evidence idempotency replays
The replay check sends the exact same body twice, so it cannot distinguish strict idempotency from an implementation that keys only on idempotencyKey and silently accepts changed evidence. Row 15’s idempotency guarantee also requires the conflict case: reuse evidence-key with a changed measurement, payload, or candidate and assert 409 plus an unchanged stored record.
AGENTS.md reference: AGENTS.md:L40-L42
Useful? React with 👍 / 👎.
| let (status, reply) = fx.call(&fx.peer, "worker-b", 8, "GET", &path, ""); | ||
| assert_eq!(status, 404, "{reply}"); | ||
| assert_eq!(reply["error"], "unknown evidence in this run"); |
There was a problem hiding this comment.
Prove the owning run can read its evidence
This test only performs the forbidden cross-run read. If GET /api/hq/v1/agent/evidence/{id} regressed to return 404 for every credential, the test would still pass even though the acceptance requirement calls for read authorization rather than universal denial; first fetch the evidence successfully with the implementer credential, then retain the peer-run 404 assertion.
AGENTS.md reference: AGENTS.md:L40-L42
Useful? React with 👍 / 👎.
|
Queued — the merge queue status continues in this comment ↓. |
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 24 minutes 40 seconds in the queue, including 11 minutes 59 seconds running CI. Required conditions to merge
|
Diese Tests belegen Matrixzeile 15 über die echten lokalen HTTP-Routen.
Sie prüfen Kandidat- und Evidenzbindung, Laufisolation sowie das geschlossene Scheitern bei Policy-Abweichungen.
Produktionscode und Abnahmematrix bleiben unverändert.
Report
What changed
src-tauri/src/api/agent_access.rsusing the real loopback HTTP server, scoped run credentials, and a real SQLite store.policyJsonand leaves dispatch unresolved with afrozen root policyreason..pa/continuous_acceptance_matrix.mdwere not changed.Evidence
4f69f3a0d5f9839e07e189c713bad6824b4f55c6.6ac2f9e4790a8695f318340d7b1626c97f3f14b9; remote branch verified at the same SHA withgit ls-remote(exit 0).cargo test --manifest-path src-tauri/Cargo.toml --bin projecta -- --list— exit 0; all four exact test names listed.cargo test --manifest-path src-tauri/Cargo.toml --bin projecta api::agent_access::tests::— exit 0; 11 passed, 0 failed.bash scripts/ci/red-first.sh --plan— exit 0;Regression-For: c60f267accepted against the package base.bash scripts/ci/gates.sh lane precommit— exit 0, including secret scan and architecture drift.bash scripts/ci/gates.sh lane prepush— exit 0 at final committed HEAD; log:/tmp/m4-row15-http-proof-prepush.log; 1755 Rust tests passed and 7 were skipped.Architecture drift
architecture-driftreported no new occurrences; no allowlist entry was added.NICHT ABGEDECKT
#[cfg(windows)]tests or the Windows clippy arms; the Windows verdict remains for the merge queue.Review disposition
Review: pending (coordinator), Tier B / ausstehend (Stufe B). No worker self-review was performed.
Open points