Skip to content

test(api): prove acceptance row 15 over HTTP - #360

Merged
mergify[bot] merged 1 commit into
mainfrom
codex/m4-row15-http-proof
Oct 4, 2026
Merged

mergify[bot] merged 1 commit into
mainfrom
codex/m4-row15-http-proof

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 4, 2026

Copy link
Copy Markdown
Owner

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

  • Added four characterization tests to src-tauri/src/api/agent_access.rs using the real loopback HTTP server, scoped run credentials, and a real SQLite store.
  • Proved candidate/evidence commit and run binding plus idempotent evidence replay.
  • Proved evidence cannot be fetched with another run's credential.
  • Proved foreign-project reviewers and stale candidate evidence are refused.
  • Proved an out-of-band root-policy rewrite does not alter the run's frozen policyJson and leaves dispatch unresolved with a frozen root policy reason.
  • Production code, seam files, Store code, architecture allowlists, and .pa/continuous_acceptance_matrix.md were not changed.

Evidence

  • Base fetched at package start: 4f69f3a0d5f9839e07e189c713bad6824b4f55c6.
  • Final candidate: 6ac2f9e4790a8695f318340d7b1626c97f3f14b9; remote branch verified at the same SHA with git ls-remote (exit 0).
  • Diff size: 300 added lines in one test file.
  • 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: c60f267 accepted 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.
  • The enabled pre-push hook repeated the full prepush lane successfully before the branch push (exit 0).

Architecture drift

  • architecture-drift reported no new occurrences; no allowlist entry was added.

NICHT ABGEDECKT

  • Linux does not compile or run the #[cfg(windows)] tests or the Windows clippy arms; the Windows verdict remains for the merge queue.
  • The desktop GUI was not launched or visually inspected; this tests-only package makes no visual claim.
  • External updater, OmniRoute, and mirror services were not exercised.
  • The acceptance-matrix wording remains unchanged pending decision E19, as required by the package scope.

Review disposition

Review: pending (coordinator), Tier B / ausstehend (Stufe B). No worker self-review was performed.

Open points

  • Coordinator-managed Tier B review.
  • Windows merge-queue lane.
  • Decision E19 and its later matrix text change remain outside this PR.

Regression-For: c60f267
Co-Authored-By: Codex (GPT-5) <noreply@openai.com>
@Cuarroc
Cuarroc marked this pull request as ready for review October 4, 2026 19:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T19:40:00.576821Z 6ac2f9e Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +893 to +894
assert_eq!(status, 200, "{context}");
assert_eq!(context["run"]["policyJson"], frozen);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +819 to +820
assert_eq!(fx.candidate(COMMIT_A, 6).0, 200);
let (status, first) = fx.evidence();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +822 to +824
let (status, replay) = fx.evidence();
assert_eq!(status, 200, "{replay}");
assert_eq!(replay, first);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +838 to +840
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");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@mergify

mergify Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@Cuarroc

Cuarroc commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify mergify Bot added the queued label Oct 4, 2026
@mergify
mergify Bot merged commit 81e58c0 into main Oct 4, 2026
15 checks passed
@mergify
mergify Bot deleted the codex/m4-row15-http-proof branch October 4, 2026 20:06
@mergify

mergify Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant