WIP: scrub NODE_OPTIONS in the node version probe (pre-existing env-dependent red)

An inherited NODE_OPTIONS carrying test-mode flags made `node --version`
exit 9, so a healthy runtime read as PREFLIGHT_NODE_MISSING and
test_node_options_cannot_green_a_red_suite failed on hosts with a poisoned
shell env; the probe now scrubs the variable exactly as the suite run does.
Also: vcs-target-binding pin repinned to the advertised preflight_review name.
This commit is contained in:
Anton Razzhigaev 2026-08-30 04:02:01 +00:00
parent b3c9860e00
commit a2c2f15c8a
2 changed files with 7 additions and 1 deletions

View file

@ -970,6 +970,11 @@ def node_distribution_platform() -> str:
def probe_node_version(node_path: str) -> str:
"""Return a normalized bundled-Node version, or ``""`` on probe failure."""
# An inherited NODE_OPTIONS carrying test-mode flags (--test-name-pattern,
# --test-only) makes `node --version` itself exit non-zero, so a healthy
# runtime read as missing. The probe scrubs it exactly as the suite run does.
probe_env = dict(os.environ)
probe_env.pop("NODE_OPTIONS", None)
try:
result = _hidden_run(
[str(node_path), "--version"],
@ -978,6 +983,7 @@ def probe_node_version(node_path: str) -> str:
encoding="utf-8",
timeout=10,
check=False,
env=probe_env,
)
except (OSError, subprocess.SubprocessError):
return ""

View file

@ -232,7 +232,7 @@ def test_workspace_focus_exposes_but_does_not_retarget_system_review_lifecycle(t
from ouroboros.tools import claude_advisory_review, git as git_tools
registry, _ctx, _system, _project = _registry(tmp_path)
assert registry.get_schema_by_name("advisory_review") is not None
assert registry.get_schema_by_name("preflight_review") is not None
assert registry.get_schema_by_name("commit_reviewed") is not None
assert "repo_dir = pathlib.Path(ctx.repo_dir)" in inspect.getsource(
claude_advisory_review._handle_advisory_pre_review