Skip to content

test(acp): restore the real_adapter markers the codex rewrite dropped - #12079

Closed
helenastafford wants to merge 1 commit into
kirodotdev:mainfrom
helenastafford:fix/real-adapter-markers-restore
Closed

helenastafford wants to merge 1 commit into
kirodotdev:mainfrom
helenastafford:fix/real-adapter-markers-restore

Conversation

@helenastafford

Copy link
Copy Markdown
Contributor

What

Restores the three @pytest.mark.real_adapter markers (and the _require_codex_acp gate behind them) that #11960's rewrite of test/test_codex_session_mcp.py dropped, six minutes after #11946 created the lane that selects on exactly that marker.

Why

The Real Adapter Contract Tests lane (#11946) runs pytest -m real_adapter over the codex and opencode test files and asserts a measured floor of 4 selected tests: three marked codex tests plus one opencode. #11960 replaced those three markers with plain skipif(_ENTRY is None) guards — the exact skip-on-absent shape #11946's own commit message describes as "the one place drift is invisible". The lane now selects 1 test repo-wide and fails its floor on every PR:

AssertionError: selected 1 of at least 4: ['test_real_opencode_acp_accepts_the_crew_stdio_element']

First observed on #9969 (head cda0737); reproduces on pristine main tip 1c7f96370.

How

  • Re-adds the real_adapter_gate import and the _require_codex_acp(*, with_node) helper, byte-identical to the pre-feat(acp): continue a codex subagent from its persisted thread #11960 version.
  • Restores @pytest.mark.real_adapter + the require call on the same three tests that carried them before: test_real_codex_acp_accepts_the_crew_stdio_element, test_real_codex_acp_session_close_evicts, test_the_installed_adapter_still_builds_the_frames_the_refusal_reads.
  • test_real_codex_acp_load_after_close_restores (new in feat(acp): continue a codex subagent from its persisted thread #11960) deliberately stays unmarked: it needs a live codex build (CODEX_PATH) and opts into spending real model tokens (KIROCREW_LIVE_CODEX_PROMPT_TESTS=1), neither of which the lane's runners have.

The gate keeps skipif's local semantics — absent adapter skips on a developer box — but FAILS under KIROCREW_E2E_REQUIRE=1, so the lane cannot report green having measured nothing.

Tested

Ran the lane's exact contract locally: npm ci of the pinned adapters from test/real_adapters/package-lock.json, then KIROCREW_E2E_REQUIRE=1 pytest -v -n0 --no-cov --timeout=1200 -m real_adapter over both files with CODEX_ACP_BIN/OPENCODE_BIN pointing at the installed entries: 4 selected, 4 passed, none skipped (codex-acp 1.11.0, the pinned release). Without the adapters installed, the same selection skips all 4 — unchanged developer-box behavior. black / isort / flake8 / brand gate clean.

Pattern harvest

Same shape as #11876's census collision: a guard's contract (here the marker set + floor) lives in ci.yml while the guarded surface lives in a test file, and two PRs merged 6 minutes apart — same author — were each green alone and red together. Any rewrite of a file carrying pytest.mark selections that a workflow floor counts should re-run that lane's selection before merge.

PR kirodotdev#11946 created the Real Adapter Contract Tests lane, whose selection is
`-m real_adapter` with a measured floor of 4: three marked codex tests plus
one opencode. Six minutes later PR kirodotdev#11960's rewrite of
test_codex_session_mcp.py replaced those three markers (and the
_require_codex_acp gate behind them) with plain skipif guards -- the exact
skip-on-absent shape kirodotdev#11946 existed to end. The lane now selects 1 test
repo-wide and fails its own floor on every PR:

    AssertionError: selected 1 of at least 4:
    ['test_real_opencode_acp_accepts_the_crew_stdio_element']

Restore the marker and the require gate on the same three tests:
test_real_codex_acp_accepts_the_crew_stdio_element,
test_real_codex_acp_session_close_evicts, and
test_the_installed_adapter_still_builds_the_frames_the_refusal_reads.
The gate keeps skipif's local semantics (absent adapter skips) but FAILS
under KIROCREW_E2E_REQUIRE=1, so the lane cannot green by measuring
nothing. test_real_codex_acp_load_after_close_restores stays unmarked:
it needs a live codex build (CODEX_PATH) and spends real model tokens,
which the lane's runners do not have.

Verified with the lane's exact contract: npm ci of the pinned adapters,
then KIROCREW_E2E_REQUIRE=1 pytest -m real_adapter over both files --
4 selected, 4 passed, none skipped.
@helenastafford
helenastafford requested review from a team and smeyffret September 19, 2026 20:05
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Sep 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Opus 4.8 Review (fork) — ⚠️ review incomplete

Reviewed f609e2fac62a55996e8559dd045f29e0cda59a23 via the fork AI-review pipeline; updated in place on each push.

No completed Opus verdict for this commit; see the Fork Opus 4.8 Review job logs.

@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

Reviewed f609e2fac62a55996e8559dd045f29e0cda59a23 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] f609e2f

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — ⚠️ could not complete

The design review did not produce a verdict for f609e2fac62a55996e8559dd045f29e0cda59a23 (the review step failed). See the Fork Design Review job logs. Advisory — does not block merge.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge and removed readiness: checking Automated validation is still running labels Sep 19, 2026
@helenastafford

Copy link
Copy Markdown
Contributor Author

Superseded: the revert of #11960 (PR #12088, merged) restored the original test_codex_session_mcp.py including all real_adapter markers and the _require_codex_acp gate — main now selects the full contract set again (verified: 8 real_adapter references on main tip, Real Adapter lane floor satisfied). This targeted restoration is no longer needed and now conflicts with the reverted file. Closing.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) merge conflict Branch has merge conflicts with its base — author must resolve before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant