Skip to content

feat(bin): detect model-authored GitHub writes that omit the attribution token - #76

Merged
sbracewell64 merged 1 commit into
mainfrom
fm/sol-attribution-landing
Aug 11, 2026
Merged

sbracewell64 merged 1 commit into
mainfrom
fm/sol-attribution-landing

Conversation

@sbracewell64

Copy link
Copy Markdown
Owner

Fork landing of the model-write attribution convention and its sweep, cut fresh from the fork trunk so this fleet runs it. The same change is under review upstream as a contribution in kunchenguid#2077, which stays open and untouched on the maintainer schedule.

What this adds

Every fleet write to GitHub authenticates as the account owner with author_association: OWNER and no bot marker, so nothing at write time can tell a model session apart from the owner typing. The design is a self-identifying token the session applies to itself, plus detection after the fact, because a model can silently omit the token and no write-time mechanism can stop it on this identity.

  • Token SOL-AI: - carries no meaning in GitHub-flavored Markdown and none in a commit message, and an all-caps hyphenated compound ending in a colon is not a word, so a search returns deliberate uses only.
  • Reachable where a session is composed - bin/fm-attribution-sweep.sh --convention emits the paste-ready preamble; docs/model-write-attribution.md owns the convention.
  • bin/fm-attribution-sweep.sh - read-only, GET-only through one chokepoint, reports candidates plus evidence and states in its own output that it cannot determine authorship.

Three-valued outcomes

Every scope ends in observed-clean, candidates, or could-not-observe. An API error, a truncated response, an exhausted request budget, an unparsable reply, and a repository set that resolved to nothing are all could-not-observe, never an empty finding. Exit status carries the same three values: 0 clean, 10 candidates, 20 at least one scope unobserved.

Red control

Five unprefixed writes from the 2026-08-02 capability probe are retained deliberately as the only real-world control this detector has. Both the document and the sweep's own summary label them, so a triager does not investigate a permanent known-positive as a real finding. The sweep does not filter them out: a known-positive that stops being reported has stopped being a control.

Defects found and fixed during review

Three window defects that would each have reported examined=0 as observed:

  • an empty repository set read as clean, though a scope-limited token and an account owning nothing are identical on the wire;
  • an unvalidated --since sorted below every real timestamp, so nothing matched;
  • a shape-only ISO check admitted a date that sorts above every real timestamp, the mirror of the previous one.

Verification

Validated through the no-mistakes pipeline on the contribution branch. On this branch against the fork trunk: lint clean, doc-audience ok, coverage guard ok, and the 51-assertion colocated test passes. The sweep's red-capability is proven live against the retained probe writes rather than only against fakes.

…ion token

Fork landing of the model-write attribution convention and its sweep. The same
change is under review upstream as a contribution; this branch carries only that
contribution's own files, cut fresh from the fork trunk so the fleet actually
runs it rather than waiting on an upstream merge that may never come.

Every fleet write to GitHub authenticates as the account owner with
author_association OWNER and no bot marker, so nothing at write time can tell a
model session apart from the owner typing. The design is therefore a
self-identifying token the session applies to itself, plus detection afterwards,
because a model can silently omit the token and no write-time mechanism can stop
it on this identity.

The token is SOL-AI:. It carries no meaning in GitHub-flavored Markdown and none
in a commit message, and an all-caps hyphenated compound ending in a colon is
not a word, so a search returns deliberate uses only.

bin/fm-attribution-sweep.sh --convention emits the paste-ready preamble so the
rule is reachable where a session is composed. docs/model-write-attribution.md
owns the convention, the coverage boundaries, and the retained probe writes.

The sweep lists writes under the account that lack the token. It reports
candidates rather than authors, and says so in its own output, because an
undeclared model write and a hand-typed comment are identical in every field
GitHub exposes. A clean run is distinguishable from a run that could not look:
an API error, a truncated response, an exhausted budget, an unparsable reply,
and a repository set that resolved to nothing are all could-not-observe, never
an empty finding, and the exit status carries the same three values. Every call
is a GET through one chokepoint.

Five unprefixed writes from the 2026-08-02 capability probe are retained on
purpose as the only real-world red control this detector has, and both the
document and the sweep's own summary label them so a triager does not
investigate a permanent known-positive as a real finding.

Three window defects that would each have reported examined=0 as observed were
found and fixed during review: an empty repository set read as clean, an
unvalidated --since sorted below every timestamp, and a shape-only ISO check
admitted a date that sorts above every timestamp.
@sbracewell64
sbracewell64 merged commit ef7d1cd into main Aug 11, 2026
25 of 27 checks passed
sbracewell64 added a commit that referenced this pull request Aug 11, 2026
…ocking_on (CFVC-06) (#71)

* feat(bin): carry the status boundary as a typed event with derived blocking_on (CFVC-06)

The worker-to-supervisor boundary's control facts were prose.
bin/fm-classify-lib.sh classified wakes by grepping a crew's own sentence
against `PR ready|checks green|ready in branch|merged`, so
"working: rebased onto merged #76" escalated as a terminal event and had to be
defended by a rule excluding nonterminal verbs - a guard around a guess.

Each event is now a typed `fm-status-event.v1` envelope carrying verb, key,
phase, repeatable evidence references and one bounded summary. New
bin/fm-status-event-lib.sh owns the format; bin/fm-classify-lib.sh remains the
single owner of what a verb MEANS and reads that field instead of a regex. The
default classification path runs no regex at all, so the free-text arm and the
collision class it created are gone rather than caught after the fact.

What a task is waiting on is derived, never declared. status_event_blocking_on
combines the verb, the keyed open-decision fold and bin/fm-crew-state.sh's typed
verdict, so proof that a run is advancing overrules a stale blocked claim, and a
decision left open earlier is not masked by a later unrelated event. A worker
cannot write the field: the envelope's field set is closed, and an event
carrying blocking_on= is refused whole and surfaced as malformed rather than
silently stripped and half believed.

Compatibility is the three shared parsers. Every consumer in bin/ already reads
status lines through status_line_verb, status_line_note and the decision-key
parser, so teaching those the envelope taught the fleet at once and a log part
way through the migration reads correctly. Prose remains the human note.

bin/fm-brief.sh teaches the typed form to every reporting scaffold, including
the rule that blocking_on is derived. bin/fm-fleet-snapshot.sh projects the
envelope and the derived field, reusing the crew read it already paid for.
bin/fm-wake-lib.sh renders a typed event to its prose projection before the
drain annotation's byte budget, so evidence references cannot truncate away the
summary.

Retired: FM_CLASSIFY_CAPTAIN_RE_DEFAULT's free-text arm, and the nonterminal
verb rule as a defence against it. That rule survives as declared policy and
still applies on the opt-in FM_CAPTAIN_RE path, where prose matching is what the
home asked for. A bare verbless line such as "merged" is no longer
captain-relevant, and tests/fm-daemon.test.sh records that change of behavior.

Tests assert the retirement with a negative control that requires each collision
line to match the retired arm as a bare regex before requiring it not to
classify; that a typed event classifies with the default pattern blanked, so no
regex fallback remains; that a worker-written blocking_on is refused with its
own reason and cannot reach the answer even through summary prose; that the
derived answer changes with crew state while the status line is held constant;
that both derivation helpers are total over the declared crew-verdict
vocabulary; and that every reporting scaffold teaches the typed form.

* no-mistakes(review): copy status-event lib into fixtures, project envelope key, add conformance test

* no-mistakes(document): align classification docs and comments with typed status events

* fix(tests): carry the status-event library into every sandbox bin fixture

bin/fm-wake-lib.sh and bin/fm-classify-lib.sh source the sibling
bin/fm-status-event-lib.sh eagerly, so every fixture that builds a synthetic
bin/ from a hand-maintained manifest must carry that sibling too. Three did
not, and under `set -eu` the missing source aborts the script under test:

- tests/fm-gotmp.test.sh symlinks the libraries into a fake FM_ROOT (two sites).
- tests/fm-backend.test.sh copies OLD_BIN_UNCHANGED_SIBLINGS into the synthetic
  pre-refactor tree, whose own header already records that a sourced sibling
  must be a real reachable file there or the source aborts.
- tests/fm-remote-backlog-handoff.test.sh copies a fixed list into a fake
  remote root.

The eager source is deliberately left hard rather than made conditional. The
classifier's dependency is a correctness contract: a silently absent parser
would let a sandbox read a typed event as prose, which is the failure this
increment removes. Softening it to keep a manifest short would trade a loud
fixture break for a quiet wrong answer.

Red before and green after on the same tree: each of the three suites failed
with the missing-sibling abort and now passes (3, 28 and 10 assertions).
sbracewell64 added a commit that referenced this pull request Aug 11, 2026
…ocking_on (CFVC-06) (#71)

* feat(bin): carry the status boundary as a typed event with derived blocking_on (CFVC-06)

The worker-to-supervisor boundary's control facts were prose.
bin/fm-classify-lib.sh classified wakes by grepping a crew's own sentence
against `PR ready|checks green|ready in branch|merged`, so
"working: rebased onto merged #76" escalated as a terminal event and had to be
defended by a rule excluding nonterminal verbs - a guard around a guess.

Each event is now a typed `fm-status-event.v1` envelope carrying verb, key,
phase, repeatable evidence references and one bounded summary. New
bin/fm-status-event-lib.sh owns the format; bin/fm-classify-lib.sh remains the
single owner of what a verb MEANS and reads that field instead of a regex. The
default classification path runs no regex at all, so the free-text arm and the
collision class it created are gone rather than caught after the fact.

What a task is waiting on is derived, never declared. status_event_blocking_on
combines the verb, the keyed open-decision fold and bin/fm-crew-state.sh's typed
verdict, so proof that a run is advancing overrules a stale blocked claim, and a
decision left open earlier is not masked by a later unrelated event. A worker
cannot write the field: the envelope's field set is closed, and an event
carrying blocking_on= is refused whole and surfaced as malformed rather than
silently stripped and half believed.

Compatibility is the three shared parsers. Every consumer in bin/ already reads
status lines through status_line_verb, status_line_note and the decision-key
parser, so teaching those the envelope taught the fleet at once and a log part
way through the migration reads correctly. Prose remains the human note.

bin/fm-brief.sh teaches the typed form to every reporting scaffold, including
the rule that blocking_on is derived. bin/fm-fleet-snapshot.sh projects the
envelope and the derived field, reusing the crew read it already paid for.
bin/fm-wake-lib.sh renders a typed event to its prose projection before the
drain annotation's byte budget, so evidence references cannot truncate away the
summary.

Retired: FM_CLASSIFY_CAPTAIN_RE_DEFAULT's free-text arm, and the nonterminal
verb rule as a defence against it. That rule survives as declared policy and
still applies on the opt-in FM_CAPTAIN_RE path, where prose matching is what the
home asked for. A bare verbless line such as "merged" is no longer
captain-relevant, and tests/fm-daemon.test.sh records that change of behavior.

Tests assert the retirement with a negative control that requires each collision
line to match the retired arm as a bare regex before requiring it not to
classify; that a typed event classifies with the default pattern blanked, so no
regex fallback remains; that a worker-written blocking_on is refused with its
own reason and cannot reach the answer even through summary prose; that the
derived answer changes with crew state while the status line is held constant;
that both derivation helpers are total over the declared crew-verdict
vocabulary; and that every reporting scaffold teaches the typed form.

* no-mistakes(review): copy status-event lib into fixtures, project envelope key, add conformance test

* no-mistakes(document): align classification docs and comments with typed status events

* fix(tests): carry the status-event library into every sandbox bin fixture

bin/fm-wake-lib.sh and bin/fm-classify-lib.sh source the sibling
bin/fm-status-event-lib.sh eagerly, so every fixture that builds a synthetic
bin/ from a hand-maintained manifest must carry that sibling too. Three did
not, and under `set -eu` the missing source aborts the script under test:

- tests/fm-gotmp.test.sh symlinks the libraries into a fake FM_ROOT (two sites).
- tests/fm-backend.test.sh copies OLD_BIN_UNCHANGED_SIBLINGS into the synthetic
  pre-refactor tree, whose own header already records that a sourced sibling
  must be a real reachable file there or the source aborts.
- tests/fm-remote-backlog-handoff.test.sh copies a fixed list into a fake
  remote root.

The eager source is deliberately left hard rather than made conditional. The
classifier's dependency is a correctness contract: a silently absent parser
would let a sandbox read a typed event as prose, which is the failure this
increment removes. Softening it to keep a manifest short would trade a loud
fixture break for a quiet wrong answer.

Red before and green after on the same tree: each of the three suites failed
with the missing-sibling abort and now passes (3, 28 and 10 assertions).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant