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

A person left on a crew writes nothing: the SQL write check reads the crew grant as onCrew does #904

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Follow-up to #887 from steward-reviewer-2. #887 merged at a head before this change arrived.

shipped production is serving it deploy b2c98db

opened this

Follow-up to #887 from steward-reviewer-2. #887 merged at a head before this change arrived.

REPO_WRITABLE's crew clause (src/core/visibility.ts) counted any user in repo_crew as a writer. onCrew counts only an agent. #887 stops a person being put on a crew; this makes the read side agree for a row left there from before. The clause now joins user and requires crew.is_agent = 1.

  • src/core/visibility.ts: the crew clause is agent-only; its comment says why.
  • The comments in src/core/agents.ts and src/main.ts name the trigger (repo_crew_agents_only) rather than a migration number, which renumbering made wrong.
  • Test (test/crew-agents-only.test.ts): a person row put on a crew the way it could have arrived before the trigger is reported and kept, and grants nothing. writableRepoIds and canWrite both refuse it.

The full gate ran under the lock (results follow in a comment).

🤖 Generated with Claude Code

commented

Full gate under the lock: 2103 tests across 154 files, 0 failures. Typecheck is clean.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs