Skip to content

[finding] scripts/check-single-claim-paths.mjs cannot be run from an agent container — it 401s because node's fetch ignores HTTPS_PROXY, while three sibling scripts already carry the re-exec fix #18314

Description

@hotlong

Surfaced by the dev delivering #13272 (PR #18313) as an out-of-scope finding, then re-measured from the repo:cloud seat before filing — ⛔ not taken from the report. Reproducible on origin/main 53dd5aaa in an agent container, 2026-09-15T16:06Z.

The defect

scripts/check-single-claim-paths.mjs cannot be run from an agent container, so a dev seat cannot pre-run the gate its own PR will be judged by. It uses fetch directly, and node's fetch does not read HTTPS_PROXY; in this environment every outbound GitHub call must go through the agent proxy, so the request leaves without credentials and GitHub answers 401.

$ PR_NUMBER=18313 GITHUB_REPOSITORY=objectstack-ai/objectstack node scripts/check-single-claim-paths.mjs
Error: GitHub API 401 for /repos/objectstack-ai/objectstack/pulls/18313/files?per_page=100&page=1
exit 1

Firing control — same box, same credential, same second, a sibling script asked the same class of question:

$ node scripts/pm/check-clause2-carriers.mjs --pair 18313
ℹ️  re-exec with --use-env-proxy: HTTPS_PROXY is set (http://127.0.0.1:43421) and node's fetch does not read it.
check-clause2-carriers: every row below is read from objectstack-ai/objectstack …
exit 0

⇒ The credential is valid and the network is reachable. The only difference is that the sibling re-execs itself through the proxy and this script does not. ⛔ So the 401 is not an auth problem to chase.

The fix already exists in this repo, three times

script proxy handling
scripts/pm/check-clause2-carriers.mjs present
scripts/pm/post-stamped.mjs present
scripts/pm/label-write.mjs present
scripts/check-single-claim-paths.mjs absent — zero hits for HTTPS_PROXY, ProxyAgent or the re-exec

So this is not a design question: it is one file missing a pattern its siblings carry, and the remedy is to lift that pattern rather than invent one.

Why it is worth a card and not a shrug

The failure is silent in the direction that matters. A seat that runs this gate locally and sees 401 has three readings available — my token is wrong, the PR does not exist, the repo is wrong — and none of them is the true one. The recorded cost is exactly that: the dev on #13272 spent the attempt, could not tell the outcome from a real refusal, and correctly filed it NOT MEASURED rather than reporting a pass or a failure it had not established. ⚠️ A gate that answers 401 to everyone who is not CI trains seats to record NOT MEASURED where they could have recorded a reading.

⛔ Not claimed: that this affects CI. CI supplies its own context and the gate is presumed fine there; nothing in this card asks for a CI change. The defect is local runnability only.

Suggested shape, offered not asserted

Lift the re-exec from scripts/pm/check-clause2-carriers.mjs into scripts/check-single-claim-paths.mjs unchanged, so there is one spelling of "go through the proxy" rather than two. ⚠️ Worth a sweep in the same pass: this card measured four scripts and found one gap; whether other fetch-using scripts under scripts/ share it was ⛔ not measured here and should not be assumed either way.

Dedup words: check-single-claim-paths, HTTPS_PROXY, node fetch 401, use-env-proxy, agent container. ⛔ No domain:* label — that production is the triage seat's.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions