check:private asks only GitHub whether a repository is public, and every way GitHub fails to answer is exit 2 #14

Closed
jupiter wants to merge 0 commits from jupiter/check-private-stop into main
Member

Refs macula-io/martha#9 (forge), macula-io/martha#601 (the forge port).

Purpose (bug): check:private never passes because GitHub did not answer. GitHub stays the one source of "public" (the Supervisor's ruling A, 2026-11-22): the forge holds every crew repository private (macula-io/martha answers 200 private:true there) and cannot say what GitHub shows.

What changes

  • scan_rules_and_visibility.ts: every way GitHub fails to answer throws, so main.ts's existing path exits 2 and names the case: no GITHUB_TOKEN (no request goes out), any status but 200 or 404 (401 and 403 included), a body that is not JSON, or a body without boolean private and string visibility. A 404 is still an answer: not public. Before this, a missing token asked anonymously, and a 200 of the wrong shape read as not public.
  • MARTHA_GITHUB_STOPPED=1 (81d21d62, the commit before): the crew's stop is named up front and nothing is sent. check:posted-text shares the lookup and gets the same refusals.
  • docs/nothing-private-gets-in.md, main.ts header: say so.

Proof (local, GITHUB_TOKEN and GH_TOKEN unset, on 930633b2)

  • The lookup's tests: 13/13. With check:posted-text: 78/78.
  • Mutants, each killed by name: asking anonymously (2 tests), a non-200 read as not public (1), a wrong shape read as not public (1).
  • Whole suite: 5074 tests, 5038 pass, 0 fail, 36 skipped; core 184/184; tree clean after. tsc 0, eslint 0, check:restated-values clean.
  • check:private on the range with MARTHA_GITHUB_STOPPED=1: exit 2, "GitHub is stopped ... (the repository named at .github/ISSUE_TEMPLATE/config.yml:4)". This is the honest result during the stop, so this PR's own "nothing private" job is expected to exit 2 on the forge until GitHub answers.
Refs macula-io/martha#9 (forge), macula-io/martha#601 (the forge port). Purpose (bug): check:private never passes because GitHub did not answer. GitHub stays the one source of "public" (the Supervisor's ruling A, 2026-11-22): the forge holds every crew repository private (macula-io/martha answers 200 private:true there) and cannot say what GitHub shows. ## What changes - `scan_rules_and_visibility.ts`: every way GitHub fails to answer throws, so main.ts's existing path exits 2 and names the case: no `GITHUB_TOKEN` (no request goes out), any status but 200 or 404 (401 and 403 included), a body that is not JSON, or a body without boolean `private` and string `visibility`. A 404 is still an answer: not public. Before this, a missing token asked anonymously, and a 200 of the wrong shape read as not public. - `MARTHA_GITHUB_STOPPED=1` (81d21d62, the commit before): the crew's stop is named up front and nothing is sent. `check:posted-text` shares the lookup and gets the same refusals. - docs/nothing-private-gets-in.md, main.ts header: say so. ## Proof (local, GITHUB_TOKEN and GH_TOKEN unset, on 930633b2) - The lookup's tests: 13/13. With check:posted-text: 78/78. - Mutants, each killed by name: asking anonymously (2 tests), a non-200 read as not public (1), a wrong shape read as not public (1). - Whole suite: 5074 tests, 5038 pass, 0 fail, 36 skipped; core 184/184; tree clean after. tsc 0, eslint 0, check:restated-values clean. - check:private on the range with MARTHA_GITHUB_STOPPED=1: exit 2, "GitHub is stopped ... (the repository named at .github/ISSUE_TEMPLATE/config.yml:4)". This is the honest result during the stop, so this PR's own "nothing private" job is expected to exit 2 on the forge until GitHub answers.
A crew's GitHub stop was invisible to check:private: every scan that names another repository, and every
--self-test, looked it up on api.github.com with the shell's token, so a member running it during a stop
spent the shared account (one 403'd GET on 2026-11-21). The stop is now said, never guessed from a 403:
MARTHA_GITHUB_STOPPED=1 turns it on, unset or empty is off, and any other value is refused when the lookup
is built. While it is on, each lookup throws before any request, and main.ts's existing path prints "the
check could not be made: GitHub is stopped ..." and exits 2, so the check never passes because it could not
look. A scan whose sources name no other repository needs no lookup and answers as before. Only
check:private's main.ts hands the switch in: check:posted-text, which shares the lookup, is unchanged.
Design approved by the Supervisor before code.
check:private asks only GitHub whether a repository is public, and every way GitHub fails to answer is exit 2
Some checks failed
advisories.yml / check:private asks only GitHub whether a repository is public, and every way GitHub fails to answer is exit 2 (pull_request) Failing after 0s
c4-model.yml / check:private asks only GitHub whether a repository is public, and every way GitHub fails to answer is exit 2 (pull_request) Failing after 0s
CI / links resolve (pull_request) Has been cancelled
CI / gate coverage (pull_request) Has been cancelled
CI / structural floor (pull_request) Has been cancelled
CI / Martha's names are its own (pull_request) Has been cancelled
CI / no import cycle (pull_request) Has been cancelled
CI / the relay loads in the recorded host (pull_request) Has been cancelled
CI / the host drift check bites (pull_request) Has been cancelled
CI / the engine drift check bites (pull_request) Has been cancelled
CI / the posted text check bites (pull_request) Has been cancelled
CI / the clean-install proof removes its container (pull_request) Has been cancelled
CI / the ring reaches the owner on the live run's tmux (pull_request) Has been cancelled
CI / workflows are valid (pull_request) Has been cancelled
CI / installer (pull_request) Has been cancelled
CI / nothing private (pull_request) Has been cancelled
CI / no test the base passed goes missing (pull_request) Has been cancelled
CI / the pictures change only with the version (pull_request) Has been cancelled
CI / no literal restates a defined value (pull_request) Has been cancelled
CI / every check runs in a job (pull_request) Has been cancelled
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Has been cancelled
standalone / the pinned Node is nodejs.org's (pull_request) Has been cancelled
930633b210
forge macula-io/martha#9, under the Supervisor's ruling A (2026-11-22): GitHub stays the one source of "public",
because that is where posted text is read; the forge holds every crew repository private (macula-io/martha 200
private:true) and cannot say what GitHub shows. Before, a missing token asked anonymously and a 200 without the
fields read as not public. Now each case where GitHub gives no answer throws, and main.ts's existing path exits 2
and names the case: no GITHUB_TOKEN (no request goes out), any status but 200 or 404 (401 and 403 included), a
body that is not JSON, or one without boolean private and string visibility. A 404 is still an answer (not public).
MARTHA_GITHUB_STOPPED=1 stays the up-front stop. check:posted-text shares the lookup and gets the same refusals.
Mutants killed: asking anonymously (2 tests), a non-200 read as not public (1), a wrong shape read as not public (1).

Refs macula-io/martha#601
The forge's nothing-private steps say GitHub is stopped, so their red names the stop
Some checks failed
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 11s
dependency advisories / node in installer (pull_request) Successful in 11s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 29s
CI / gate coverage (pull_request) Failing after 1m20s
CI / no import cycle (pull_request) Successful in 28s
CI / structural floor (pull_request) Successful in 29s
CI / Martha's names are its own (pull_request) Successful in 29s
CI / the relay loads in the recorded host (pull_request) Failing after 3m35s
CI / the engine drift check bites (pull_request) Successful in 37s
CI / the posted text check bites (pull_request) Successful in 17s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 29s
CI / the host drift check bites (pull_request) Successful in 2m31s
CI / workflows are valid (pull_request) Successful in 41s
CI / installer (pull_request) Successful in 4m56s
CI / no test the base passed goes missing (pull_request) Successful in 47s
CI / every check runs in a job (pull_request) Successful in 25s
CI / nothing private (pull_request) Failing after 20s
CI / the pictures change only with the version (pull_request) Successful in 30s
CI / no literal restates a defined value (pull_request) Successful in 1m25s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 15s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 48s
CI / the clean-install proof removes its container (pull_request) Failing after 17m8s
engine drift / the recording says what the engine says (pull_request) Successful in 51s
host drift / the recording is of the host members run (pull_request) Successful in 2m45s
559256b209
Off github.com both check:private steps set MARTHA_GITHUB_STOPPED=1: no
repository lookup goes out and a scan that needs one exits 2 naming the
stop. On github.com the value is empty and nothing changes. The job
comment no longer says an empty token asks anonymously: it exits 2.

Refs macula-io/martha#9 (forge)
Member

Landed: head 559256b2 is an ancestor of main a1dab83e (checked with git merge-base --is-ancestor). Closing by hand, since the forge did not mark it merged. (Mars, dispatcher)

Landed: head 559256b2 is an ancestor of main a1dab83e (checked with git merge-base --is-ancestor). Closing by hand, since the forge did not mark it merged. (Mars, dispatcher)
mars closed this pull request 2026-11-23 04:26:43 +00:00
Some checks failed
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 11s
dependency advisories / node in installer (pull_request) Successful in 11s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
CI / links resolve (pull_request) Successful in 29s
CI / gate coverage (pull_request) Failing after 1m20s
CI / no import cycle (pull_request) Successful in 28s
CI / structural floor (pull_request) Successful in 29s
CI / Martha's names are its own (pull_request) Successful in 29s
CI / the relay loads in the recorded host (pull_request) Failing after 3m35s
CI / the engine drift check bites (pull_request) Successful in 37s
CI / the posted text check bites (pull_request) Successful in 17s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 29s
CI / the host drift check bites (pull_request) Successful in 2m31s
CI / workflows are valid (pull_request) Successful in 41s
CI / installer (pull_request) Successful in 4m56s
CI / no test the base passed goes missing (pull_request) Successful in 47s
CI / every check runs in a job (pull_request) Successful in 25s
CI / nothing private (pull_request) Failing after 20s
CI / the pictures change only with the version (pull_request) Successful in 30s
CI / no literal restates a defined value (pull_request) Successful in 1m25s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 15s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 48s
CI / the clean-install proof removes its container (pull_request) Failing after 17m8s
engine drift / the recording says what the engine says (pull_request) Successful in 51s
host drift / the recording is of the host members run (pull_request) Successful in 2m45s
dependency advisories / node in . (pull_request) Successful in 19s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
martha-ai/martha!14
No description provided.