check:private fails closed on the forge: visibility from the origin's forge, never a pass when no source answers #9

Open
opened 2026-11-22 04:55:27 +00:00 by jupiter · 0 comments
Member

Purpose (bug): check:private never passes because GitHub didn't answer. On the forge it reads visibility from the forge, where the origin is, and with no source answering it fails closed and says why.

What happens now

src/check_nothing_private_gets_in/scan_rules_and_visibility.ts resolveOnGitHub asks https://api.github.com/repos/<owner>/<repo> for every repository a scan resolves. A 404 counts as not_public, and any other non-200 throws. On the forge port, the "nothing private" job is red: GitHub answers an anonymous 403 (the shared account is suspended, and GitHub traffic is stopped). The branch jupiter/check-private-stop (81d21d62) only adds a MARTHA_GITHUB_STOPPED switch, which is not enough under the condition below.

The condition (the Supervisor's, via Mars, 2026-11-22)

check:private is a leak check that Raf kept as a refusal, so it must NEVER pass because GitHub didn't answer. It reads the repository's visibility from where its origin is: here the forge API at https://<origin host>/api/v1. With no source answering (no token, a 403, any non-200) it fails closed and names why.

DECIDED 2026-11-22 "Yes, file path only (Recommended)" (Raf, via the Supervisor): forge tokens never sit in a session's environment. The token is read at the point of use from the file FORGE_TOKEN_FILE names (the member's 0600 token file), never from a FORGE_TOKEN variable.

Done when

  • With an origin on the forge, visibility comes from https://<host>/api/v1/repos/<owner>/<repo> (private: false → public, anything else → not public), with the token read from FORGE_TOKEN_FILE.
  • Each of these fails the check, with a reason naming it: FORGE_TOKEN_FILE unset, the file missing or empty, a 401/403, any other non-200, a body that is not the expected shape. No path passes.
  • A 404 stays not_public, as today.
  • The GitHub path is unchanged for an origin on github.com.
  • Tests cover each case, with and without FORGE_TOKEN_FILE, and the whole suite is green on the forge runner.

Refs macula-io/martha#601 (the forge port). Builder: Jupiter. An Opus member reviews. It lands after the port.

Purpose (bug): check:private never passes because GitHub didn't answer. On the forge it reads visibility from the forge, where the origin is, and with no source answering it fails closed and says why. ## What happens now `src/check_nothing_private_gets_in/scan_rules_and_visibility.ts` `resolveOnGitHub` asks `https://api.github.com/repos/<owner>/<repo>` for every repository a scan resolves. A 404 counts as `not_public`, and any other non-200 throws. On the forge port, the "nothing private" job is red: GitHub answers an anonymous 403 (the shared account is suspended, and GitHub traffic is stopped). The branch `jupiter/check-private-stop` (81d21d62) only adds a `MARTHA_GITHUB_STOPPED` switch, which is not enough under the condition below. ## The condition (the Supervisor's, via Mars, 2026-11-22) check:private is a leak check that Raf kept as a refusal, so it must NEVER pass because GitHub didn't answer. It reads the repository's visibility from where its origin is: here the forge API at `https://<origin host>/api/v1`. With no source answering (no token, a 403, any non-200) it fails closed and names why. DECIDED 2026-11-22 "Yes, file path only (Recommended)" (Raf, via the Supervisor): forge tokens never sit in a session's environment. The token is read at the point of use from the file `FORGE_TOKEN_FILE` names (the member's 0600 token file), never from a `FORGE_TOKEN` variable. ## Done when - [ ] With an origin on the forge, visibility comes from `https://<host>/api/v1/repos/<owner>/<repo>` (`private: false` → public, anything else → not public), with the token read from `FORGE_TOKEN_FILE`. - [ ] Each of these fails the check, with a reason naming it: `FORGE_TOKEN_FILE` unset, the file missing or empty, a 401/403, any other non-200, a body that is not the expected shape. No path passes. - [ ] A 404 stays `not_public`, as today. - [ ] The GitHub path is unchanged for an origin on github.com. - [ ] Tests cover each case, with and without `FORGE_TOKEN_FILE`, and the whole suite is green on the forge runner. Refs macula-io/martha#601 (the forge port). Builder: Jupiter. An Opus member reviews. It lands after the port.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
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#9
No description provided.