Macula Mesh Use Build Macula for… Docs Contact

Macula · Martha · docs from Martha v0.4.1

Nothing private gets in

This exists so that code moved into this public repository from a private one carries nothing that belongs to the private side: no link to a private issue, no internal host name, no private remote. A check in CI fails, by name, the moment one gets in.

Martha's first code is written fresh here, but most of what it becomes is moved in from a private repository where those things were normal to write. A comment that cites a private issue is a dead link once public, and it says where the private work lives. A fallback remote that names a private repository tells every reader where to look. A lab host name is a map of the network.

What could leak, and through which path

What Example of the shape How it arrives
A private issue or PR link synthetic-owner/private-repo#123, https://github.com/synthetic-owner/private-repo/issues/123 a comment or doc moved as written
A shorthand link to another repository synthetic-repo#123 the same; the owner is implied, so nothing outside the author's head says whether it is public
A private remote or repository name git@github.com:synthetic-owner/private-repo.git, a constant holding synthetic-owner/private-repo a fallback, a default, an install script
An internal host name a *.lab name a log line, a comment, a test fixture
A home directory, a private address, a private email, a real node id or key a path under a real user's home, RFC 1918 addresses, a 64-hex id the same classes the crew's note check and release scan already refuse
A GitHub token a classic ghp_, gho_, ghu_, ghs_ or ghr_ token, a fine-grained github_pat_ one a transcript, log or finding a member's gh auth token reached, posted from the live run's kept record (martha#904)
A fact recorded from another checkout a private remote, a *.lab name, a path under a home, held by the engine's own source recorded rather than typed: npm run record:goose-engine reads an engine checkout and writes its facts to src/know_the_goose_engines_facts/recorded_goose_engine.json, so a value can arrive from a tree this repository does not review

Each of those can enter through four paths:

  1. The tree at the head of a pull request — a file as it will be merged, and its path: a file named after a host publishes the name with no text at all. Every tracked path, and every path a commit adds, is read as a line. A symlink is read as its link text, never followed, so a tree that tracks one to a directory is still read. Under --range the tree read is the files the range touches: a range over a data repository does not read every file in it (forge martha#111).
  2. A commit inside the pull request that a later commit removes. GitHub keeps every pushed commit of a pull request reachable, so a leak that the final tree no longer shows is still public. The check reads every commit's added lines. A merge's added lines are the ones the merge wrote itself, read against git's own merge of its parents: a resolved conflict, or a change made in the merge. A line a parent brought is that parent's commit's to answer for, so a merge of main never reads main's lines as the branch's, even one main has since removed (martha#933). Git will not remerge an octopus merge (more than two parents), so one is read against its first parent: it may name a line a parent brought, and it never hides one the merge wrote.
  3. A commit message. It is published with the commit. The check reads it.
  4. The check's own output. A CI log of a public repository is public. No value a hit found is therefore ever printed, whatever its class: a lab hostname, a home directory, a private address, an email address, a 64-hex id, a GitHub token, and the name a repository hit or a shorthand hit read (martha#846, martha#855). A hit names the file, the line and the class, and withholds the value: the log keeps it after the text it came from is edited. The path a hit is found at is printed, with each lab hostname in it replaced by <lab host>. A repository lookup GitHub cannot answer (a rate limit, a 5xx) stops the check, and its error names the line that named the repository, not the repository.

Out of reach of this check, and said here so nobody assumes otherwise:

How each class is decided

The check cannot be made when the API cannot answer, the list is missing outside a fork, or git cannot read the range. It then exits 2 and CI fails: it never passes because it could not look.

Synthetic values

A test of a refusal has to state the value it refuses, and that test lives in this public tree, where the check reads it too. Each class therefore has one synthetic form that the tree scan accepts: a lab name ending -synthetic (ci-synthetic.lab), a machine number in the 90s, /home/synthetic, the 192.168.255.0/24 block, the synthetic.invalid email domain, the listed all-one-digit ids, a GitHub token whose body starts synthetic (ghp_synthetic...), and repository owners starting synthetic-. The unit tests prove each class refuses its own synthetic form when the allowance is off, and a structural test holds every form to a whole-value match, so an allowance cannot swallow a real value that merely contains one.

What this repository declares public

Besides the synthetic forms, four lists in src/check_nothing_private_gets_in/declared.ts say what this repository's own text may carry, each matched exactly and never as a prefix or a suffix:

publicAddresses is the same kind of declaration for an identifier shaped like an address that is not one: a key type OpenSSH names, and a documentation URL's user (token@github.com). Only that exact string passes; any other address at its domain is refused.

The text posted on GitHub

The text a member posts is public the moment it is posted, and it has an edit box. check_posted_text_carries_nothing_private reads all of it: issue titles and bodies, issue comments (a pull request's conversation too), pull-request titles and bodies, review bodies, inline review comments and commit comments, closed issues and merged pull requests included. It builds the same sources and holds the same classes as the tree scan, and the same repository lookup refuses a private repository a comment names.

It reads; it never refuses. GitHub has no hook in its posting forms, so a check before posting could only be a script each member remembered to run, which is what the two 2026-11-11 instances were. The read runs daily (.github/workflows/posted-text.yml) with a read-only token, writes nothing, opens no issue and posts no comment: a red run is the signal, and its author edits the text through the Supervisor. What proves it bites on every pull request is its --self-test, which plants a cited path on each surface in memory and needs no token.

Legitimate text passes by its form, exactly as in the tree, and the forms are the ones the check accepts: a home path as /home/synthetic or as one of the allow_home names, a repository under a synthetic- owner, or a public repository. An invented name is not a form. A home path under a made-up user, or a repository nobody declared, is refused exactly as a real one is, because nothing tells the two apart: angle brackets keep a path out of the class, but the invented name behind them is still not a form the check accepts, and the same name without them is refused. There is no exemption for a document, a fenced block or a table — an evidence citation and a code sample are the same bytes, and both instances leaked inside inline code.

A run that could not look — a surface refused, a page unreadable — exits 2. It never passes because it could not look.

The rewrite rule for moved code

Keep the reasoning, drop the link.

Running it

# The tree as it is:
npm run check:private

# What CI runs on a pull request, and a member runs before a push: the tree,
# then every commit in the range.
npm run check:private -- --range <base>..<head>

# The same, asking GitHub about every repository a line names (CI on github.com):
GITHUB_TOKEN=... npm run check:private -- --range <base>..<head> --ask-github

Exit 0 is clean, 1 lists one hit per line as where: what, and 2 means the check could not be made. Offline by default (B19 of macula-io/martha#55): no request goes anywhere, and a repository a line names is public only when it is on DECLARED.knownPublic (src/check_nothing_private_gets_in/declared.ts); any other is a hit, so a scan that cannot know fails closed. A crew repository goes on that list only once someone has seen it public on GitHub. With --ask-github, the list is not read and GitHub is asked about every repository instead, so a wrong entry turns that run red. Asked, GitHub is the one source of "public": with no GITHUB_TOKEN, a 401 or 403, any other status but 200 or 404, or an answer without private and visibility, a scan that needs a lookup exits 2 and names why; it never passes on a lookup it could not make. While GitHub is stopped, set MARTHA_GITHUB_STOPPED=1: no repository lookup goes out, and a scan that needs one exits 2. In a clone whose origin is not on github.com (a forge clone, a local path, or no origin), nothing is asked whatever the token and the switch say: a scan that needs a lookup exits 2 and names the origin's host (forge martha#39).

The text posted on GitHub, read whole, and one draft before it is posted:

# Every surface of this repository's posted text (read-only token; the run
# writes nothing):
GITHUB_REPOSITORY=<owner>/<repo> GITHUB_TOKEN=... npm run check:posted-text -- --ask-github

# One draft, before it is posted (offline, like check:private):
npm run check:posted-text -- --text <file>

Its where names the object a person acts on: issue #170 comment 6765201999:12, pull 263 body:4, pull 263 review 4810:2, commit 8ca6eb3 comment 12:1, and a draft <file> for a draft.

Martha's docs, from release v0.4.1: Getting started: a crew of two on your own project · @macula-io/martha · Martha · The agent control loop · claw-code: what it is, where it comes from, what Martha can learn · The host contract and the ledger · How a release is made · Nothing private gets in · The port map, in summary · The publish gate · The crew's declaration