Menu

#331 Prove parity cell: approvals are single-use and action-bound on Codex

closed
nobody
2026-08-16
2026-08-11
Anonymous
No

Originally created by: fu351

Proven on Claude Code, ◻ on Codex. The guarantee: an approval for one action id must never authorize a different action, even if a buggy or compromised auth provider returns "approved."

What to do

  1. Read the sibling: tests/unit/test_hosthook_auth_challenge.py::test_approval_is_bound_to_the_action_id. It monkeypatches doberman.auth.challenge.run_auth_challenge to return AuthResult(approved=True, action_id="some-other-action") (approved, but for the WRONG action) and asserts the hook still denies.
  2. Write the Codex equivalent in tests/unit/test_hosthook_codex.py. Reuse the AUTH-tier action from test_auth_runs_dobermans_own_challenge in the same file (a Write to .github/workflows/ci.yml is DEFAULT_SENSITIVE → AUTH): set codex.AUTH_PROMPTER to an approving fake, monkeypatch doberman.auth.challenge.run_auth_challenge to the same mismatched-action_id stub, call codex.evaluate_pre(payload), and assert permissionDecision == "deny".
  3. Mark it: @pytest.mark.guarantee("auth-action-bound", host="codex")
  4. Mutation-check it: temporarily drop the action-id comparison in the challenge-binding path (doberman.auth.challenge / hookio.resolve_auth), confirm the test goes red, revert. Note "mutation-checked" in the PR.
  5. Regenerate: python -m tools.parity.generate_parity.

Same shared challenge mechanism Claude Code already proves. This closes the Codex column on it.

Related

Tickets: #347
Tickets: #384
Tickets: #390
Tickets: #391

Discussion

  • Anonymous

    Anonymous - 2026-08-16

    Originally posted by: blackcoderx

    Working on this — adding the Codex sibling of test_approval_is_bound_to_the_action_id in tests/unit/test_hosthook_codex.py.

     
  • Anonymous

    Anonymous - 2026-08-16

    Ticket changed by: fu351

    • status: open --> closed
     

Log in to post a comment.