Repository navigation
Description
What's wrong
disclosure answers the question "what can a stranger see of this run?" with exit 0 and "Only the SHAPE of the run is public" when the run it was asked about does not exist, because the arguments named nothing. Measured on main at 9a47439, anonymous, against this repository:
$ node research-kit/bin/disclosure.mjs --repository StepenkoAnatoli/Research-Kit --run abc
anonymous probe of StepenkoAnatoli/Research-Kit run NaN
404 run metadata refused 404
404 jobs and step names refused 404
404 run timing refused 404
404 artifact listing refused 404
403 repository secrets refused 403
- artifact DOWNLOAD not tried (nothing to try)
- job LOGS not tried (nothing to try)
names and metadata exposed : false
content exposed : false
the subject itself : not checked - pass --topic to search for it
Only the SHAPE of the run is public: names, sizes, timings, step titles.
...
exit=0
--repository Research-Kit --run 12345 (no owner) gives the same verdict with 403 on every line, exit 0. With --json the first case carries "runId": null.
Three things combine:
bin/disclosure.mjsline 65 passesNumber(flags.run)without checking it:abcbecomesNaN, and the probes ask GitHub for/actions/runs/NaN.--repositoryis passed as any string (line 64); there is no OWNER/REPO check. Every other CLI that takes a number goes throughcheckFlagValues(artifact.mjsrefuses a bare or non-integer--run-idby name since fix(artifact): a bare value flag is refused by name, not written as "true" or 1 #283).summariseinlib/disclosure.mjs(line 120) counts a refusal as an answer, which is right for a real run, so every-probe-refused is "conclusive" andexitCodereturns 0. The same function's comment records the neighbouring case as a found defect ("with no network, every probe was unreachable and the verdict still read as clean, exit 0", 2026-09-27). Every probe refused because the question named nothing is that defect one step over.renderprints "Only the SHAPE of the run is public: names, sizes, timings, step titles" from theelsebranch (line 180) whenever nothing leaked and the report is conclusive, without readingexposedNames. HereexposedNamesisfalseon the line above it: the run metadata was refused, so the shape was not public, and the closing text contradicts the report's own numbers.
The command is the one the ADR-0031 argument rests on ("that is why the collector keeps the topic out of the run name"). A typo in the run id turns it into a clean bill for a run nobody looked at.
A real private repository also answers 404 to a stranger, so a 404 on the run alone cannot tell "private" from "mistyped". The arguments can be checked before any request, and the verdict text can stop claiming a shape it did not see.
The fix
--runthroughcheckFlagValuesas{ int: true, min: 1 }and--repositoryas a value matching^[^/\s]+/[^/\s]+$, exit 3 ("could not measure") by flag name, beforehonourEnvProxy()and before any request. Same{ exit: 3 }shapeartifact.mjsuses.- In
render, whenexposedNamesisfalseand the report is conclusive, say what was measured: "Nothing of this run was readable anonymously - not even its shape. Either the repository is private to a stranger, or no run with this id exists there; GitHub answers 404 to both, and this probe cannot tell them apart." and not "Only the SHAPE of the run is public". - Optionally, in
probeRun, one more unauthenticated GET on/repos/OWNER/REPOwhen the run metadata answers 404: 200 means the repository is public and the run does not exist (then the report is not conclusive, exit 3); 404 means the repository itself is not visible to a stranger, which is the private case. That adds a probe toPROBES, so it is a freeze question (ADR-0117) and can wait; the two parts above are a bug fix.
Test
In disclosure.test.mjs, with the fake fetch the file already uses: every probe answering 404 renders no line claiming the shape is public, and names the two causes. In cli.test.mjs (or the CLI test in disclosure.test.mjs): --run abc, --run 0 and --repository Research-Kit exit 3 naming the flag, and the fake fetch is never called.
Checking your change
node research-kit/bin/selftest.mjs disclosure cli
Generated by Claude Code
Activity