Originally created by: blackcoderx
Adds the Codex sibling of tests/unit/test_hosthook_auth_challenge.py::test_approval_is_bound_to_the_action_id,
proving that an approved auth result is only honored when it's bound to the
same action id — through the Codex host-hook adapter, not just Claude Code.
No production code changes — hookio.resolve_auth's binding check
(result.approved and result.action_id == action.id) is shared by both
adapters already; the gap was test coverage on the Codex host only.
docs/PARITY.md is regenerated (python -m tools.parity.generate_parity) so
the Codex cell for "Approvals are single-use and bound to one action id"
moves from ◻ to ✅, linking to the new test. No other cell changes.
tests/unit/test_hosthook_codex.py::test_approval_is_bound_to_the_action_id@pytest.mark.guarantee("auth-action-bound", host="codex").doberman.auth.challenge.run_auth_challenge to return anAuthResult(approved=True, action_id="some-other-action") — approved, butWrite to.github/workflows/ci.yml, and asserts codex.evaluate_pre(...) stillMutation-checked: temporarily dropped the result.action_id == action.id
comparison in hookio.resolve_auth and confirmed this new test goes red
(the mismatched-action approval wrongly resolves to allow); reverted before
committing.
pytest -n auto --cov=doberman --cov-fail-under=80test_real_plugin_install_discovery.py::test_installed_plugin_is_discovered_and_fires_despite_pip_target)main in this sandbox, unrelated to thisWritten with AI assistance (Claude Code) as a guided contribution walkthrough;
all commands were run and verified locally before pushing.
Originally posted by: fu351
Merged — and this one nearly reviewed itself. You ran the mutation check before I could ask for it: dropped the action_id comparison, watched the test go red, put it back. I re-ran that exact check locally on your branch and it held — only the new test failed, with allow where deny belongs. That is precisely what a parity cell is for. Reusing the CI-config Write from the neighboring test instead of inventing a new fixture kept the diff honest, too.
Nothing changed on your branch — merged as you wrote it.
If you want the next one: [#334] (level-4) — the AUTH-deadline auto-deny and timeout-vs-refusal cells on Codex. Same lattice you've been building, one level up: you've already handled AuthResult, and the new wrinkle is proving the wall-clock deadline denies on its own and that a timeout is logged distinctly from a human refusal. It's yours if you say the word.
Related
Tickets: #334
Ticket changed by: fu351