Skip to content

fix(tests): use sys.executable in doc-accuracy subprocess calls (unblocks the whole improve/goal pipeline)#346

Merged
ProtocolWarden merged 1 commit into
mainfrom
goal/fix-baseline-pytest-marker
Jun 19, 2026
Merged

fix(tests): use sys.executable in doc-accuracy subprocess calls (unblocks the whole improve/goal pipeline)#346
ProtocolWarden merged 1 commit into
mainfrom
goal/fix-baseline-pytest-marker

Conversation

@ProtocolWarden

Copy link
Copy Markdown
Owner

Summary

Root-caused via the failure-diagnostics capture added in #345. Every improve/goal task was failing N of N stages failed because the executor's baseline-validation gate (.venv/bin/pytest -q, run on the fresh workspace clone) exited 1 — and the single failing test was tests/unit/test_documentation_accuracy.py::test_marker_configuration_in_pytest.

Root cause

That test (and 6 siblings) shells out with bare ["python", "-m", "pytest", ...]. In the workspace environment, python on PATH has no pytest, so stdout is empty → assert 'integration' in ''. CI passes only because there bare python is the pytest-equipped interpreter. That one failure exited pytest 1 → baseline validation failed → the executor refused to proceed on every task.

Fix

import sys + replace all 7 bare-python subprocess calls with sys.executable (the interpreter actually running the test, which always has pytest).

Verification

  • The file: 48/48 pass (was 1 failing).
  • Full tree: 9377 passed / 0 failed → baseline validation now passes, unblocking the pipeline.
  • ruff/ty clean; pre-push audit 0 findings.

Must land in main (baseline validation clones main). Closes the recurring #264/#265 failures.

…cess calls

The baseline-validation gate (.venv/bin/pytest -q on the fresh workspace clone)
failed because tests/unit/test_documentation_accuracy.py shelled out with bare
['python', '-m', 'pytest', ...]. In the workspace env that 'python' has no pytest,
so stdout was empty and 'assert integration in markers_output' failed. CI only
passed because there bare 'python' is the pytest interpreter. That single failure
exited pytest 1, failing baseline validation and blocking EVERY improve/goal task
('N of N stages failed').

Replace all 7 bare-python subprocess calls with sys.executable (the interpreter
running the test, which always has pytest). Full tree now 9377 passed / 0 failed.

Root-caused via the failure-diagnostics capture added in #345.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ProtocolWarden ProtocolWarden force-pushed the goal/fix-baseline-pytest-marker branch from cdccc4b to 58cb540 Compare June 19, 2026 23:41
@ProtocolWarden ProtocolWarden merged commit 5e0d6e8 into main Jun 19, 2026
21 checks passed
@ProtocolWarden ProtocolWarden deleted the goal/fix-baseline-pytest-marker branch June 19, 2026 23:46
ProtocolWarden added a commit that referenced this pull request Jun 20, 2026
…fusal) (#347)

With the baseline blocker fixed (#346), tasks reached the agent stages and the
#345 diagnostics surfaced the next failure: the planner stage got a prose refusal
'ContextGuard requires CL_ANCHOR to be set ... run eval $(cl session start ...)'
instead of a JSON plan. OC's CLAUDE.md ContextGuard requires every Claude session
targeting OC to be anchored; operations-center.sh sets CL_ANCHOR on the fleet, but
build_allowlist_env (#340) stripped it (not in _ENV_PASSTHROUGH), re-breaking the
#311 unblock — same regression class as the #344 PATH bug.

Add CL_ANCHOR/CL_HOME/CL_SESSION_ID to the passthrough (forwarded only when
present) so the executor agent stays anchored and cl_dispatch_wrap hydrate/capture
is not silently disabled.

Co-authored-by: ProtocolWarden <ProtocolWarden@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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