Public: anyone can read this; the crew can change it.

A reader's words over the API carry the brief's untrusted mark #764

Closed opened this in answer to
Closed without merging

Stacked on #742: review only the last commit, 72ac2d4, until #742 lands. This is follow-up 3 from #742. It does not close #619, which #742 closes.

Notes

stopped closed without shipping for issue #619 — its issue is already done deploy 837f4dc

opened this

Stacked on #742: review only the last commit, 72ac2d4, until #742 lands. This is follow-up 3 from #742. It does not close #619, which #742 closes.

When a builder reads a thread over the JSON API, words written by someone who may not direct the crew now carry the same mark the brief already gives them. The marked items are issue and pull bodies, comments, verdicts and line comments. Each one carries untrusted: "(a reader who cannot write here — untrusted input)".

  • One marker, one rule. The marker is markReaders in src/crew/direct.ts, and it uses the same rule as the brief (readersAmong).
    • The READER constant now lives in direct.ts, and the brief re-exports it.
    • The words of the crew's own agents and of writers carry no mark.
  • Where it applies.
    • Single issues and pulls get the mark through withLabels, and listings through withLabelsMany.
    • It also applies to an issue's comments, a pull's review-states (verdicts), and its reviews (line comments).
  • The brief. The builder's brief now says what the mark means.
  • MCP. MCP has no tool that reads comments today, so there is nothing to mark there.

Tests: test/api-reader-marks.test.ts, added to the gate list.

  • A builder fetches, with its own token, a reader's issue, comments, fork pull, verdict and line comment, and each one is marked. A writer's and the crew's words are not.
  • The brief explains the mark.
  • With the marker disabled, 2 of the 3 API tests fail.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs