check:private asks api.github.com on a hand run in a forge clone: the GitHub stop is read from an env var, not from the origin #39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (bug): a hand run of check:private in a forge clone never asks api.github.com. Whether GitHub is stopped is read from the clone's origin (a forge origin means stopped), not from an env var a person has to remember to set.
DECIDED 2026-11-22 "WTF?? our crew can no longer depend on github!" (Raf, relayed by the Supervisor; crew_standing crew-no-github-dependence).
What happens now
The stop is read only from the environment. A member who types
npm run check:privatein a forge clone, withoutMARTHA_GITHUB_STOPPED=1, sends a request to api.github.com that carries the session'sGITHUB_TOKEN.7ab86751:src/check_nothing_private_gets_in/main.ts:47buildsresolveOnGitHub(process.env['GITHUB_TOKEN']).scan_rules_and_visibility.ts:13-20fetcheshttps://api.github.com/repos/<owner>/<repo>, with no stop and no timeout of its own.559256b2, passed, in the batch):main.ts:48passesprocess.env, andscan_rules_and_visibility.ts:25-30stops only whenMARTHA_GITHUB_STOPPED=1. OtherwiselookupOnGitHub(:42-52) fetches api.github.com with the token. #9's first Done-when line (visibility from the origin's forge) is not built there. The comment at :37-38 says why: the forge holds every crew repository private.Observed: one real hand run per case
Run 2026-11-22 ~12:20Z from the forge clone (origin
ssh://git@git.macula.io/macula-io/martha.git) as a member types it:node src/check_nothing_private_gets_in/main.ts. It ran underunshare -rn(no network), so nothing reached GitHub. A preload logged each URL handed tofetchand then called the real fetch. The member session's environment carriesGITHUB_TOKENand noMARTHA_GITHUB_STOPPED.7ab86751https://api.github.com/repos/macula-io/marthaauth=yes7ab86751559256b2559256b2559256b2The first lookup comes from
.github/ISSUE_TEMPLATE/config.yml:4, so every run of this tree resolves at least one repository. With a network, rows 1 and 3 reach GitHub with the member's token. While the stop holds, that is a GitHub dependency and a credential sent to a service we stopped using. Offline it fails in 1.2 s. On a network where GitHub accepts the connection but does not answer, the run waits on undici's defaults: the code sets no timeout of its own. I did not test that case, because it would reach GitHub.Done when
MARTHA_GITHUB_STOPPEDandGITHUB_TOKENsay. It exits 2 and names the origin as the reason (or resolves on the forge, if a later ruling builds #9's first line).MARTHA_GITHUB_STOPPED=1.No new check (Supervisor). Mars places it in the queue. Refs #9, #16 (row 5.3), #36 (the same defect in check:posted-text).
Threat model: check:private and check:posted-text offline by default (B19 of #55, Mercurius)
Basis: DECIDED 2026-11-22 "All 18 as proposed (Recommended)" (Raf). B19 is a keep row: the scans stay, made to work offline by default. Base: saturnus/39-private-origin-stop at
1512f453.The design. By default no scan asks GitHub anything. A repository a line names is read as public only when it is the repository's own, or is on a declared list of public repositories (
DECLARED.knownPublic, beside the owners indeclared.ts). Every other repository is a hit, never a pass and never exit 2. GitHub is asked only when the command line says--ask-github. Then the origin gate (#39) andMARTHA_GITHUB_STOPPEDhold as they do at1512f453, and the list is not used: every repository is asked. The GitHub workflows pass the flag. The forge's workflows do not pass it, and the switch is no longer needed there.--ask-githubthe list is not read: every entry is asked, so a GitHub run turns red on a wrong entry.--ask-github, whatever the origin,GITHUB_TOKENand the switch say.--self-testworks offline and must bite: the own repository resolves public, while a synthetic one and an unlisted real-shaped one resolve not public.--ask-github, only--text <draft>runs (offline). The posted-text workflow, on GitHub, passes the flag.Out of scope: which repositories go on the list beyond the obvious upstream projects. A crew repository goes on it only after someone has seen it public on GitHub. While the stop holds, that is not something the crew can check.
Closing: Purpose met. A hand run of check:private in a forge clone never asks api.github.com, and the clone's origin decides that, not an env var.
Checked on forge main
a1dab83e. The fix landed through PR 14 (Jupiter,559256b2), PR 20 (Mercurius,59f95fd6), Saturnus's origin gate (saturnus/39-private-origin-stop1512f453) and PR 59 (Mercurius, merge4078bfa5, B19: offline by default, GitHub asked only with--ask-github).Done-when, line by line, in
src/check_nothing_private_gets_in/scan_rules_and_visibility.node-test.ts:MARTHA_GITHUB_STOPPEDandGITHUB_TOKENsay, exits 2 and names the origin's host: tests at :88 and :131 (main.ts run in a forge clone, token set, no switch, hands fetch nothing).Run:
nice -n 10 prove_the_relay_loads/run_the_tests_of_one_file.sh src/check_nothing_private_gets_in/scan_rules_and_visibility.node-test.tsona1dab83e: 27 tests, 27 pass, 0 fail.Without
--ask-github(B19), nothing is sent from any clone. The same defect in check:posted-text is #36, which is being built now (Venus).