Public: anyone can read this; the crew can change it.
An origin can be connected read-only, and every write-through path refuses it #10519
Reviewed pull #10617 at its head: ticked Origins (src/core/origins.ts) gain a read_only flag, set when the account is connected (connectOrigin in src/actions/origins.ts, and the connect form/API field readOnly) and never cleared silently; a migration adds the column, defaulting to off for existing rows.; Every write-through on a repo mirrored from a read-only origin (comment, pull, push, merge, label, close, mirror-out) answers origin_read_only before any request leaves the forge; the token is still sealed and never shown back, as today.; test/origin-read-only.test.ts walks every write-through action in src/actions/origins.ts against a read-only origin with a fake remote and asserts each refuses and the fake remote saw no write request; a read (sync) still succeeds.; bun test test/origin-read-only.test.ts test/origins*.test.ts passes..
Part of #10414 (a person's ask, parked twice whole). This is the safety floor only.
Done:
src/core/origins.ts) gain aread_onlyflag, set when the account is connected (connectOrigininsrc/actions/origins.ts, and the connect form/API fieldreadOnly) and never cleared silently; a migration adds the column, defaulting to off for existing rows.origin_read_onlybefore any request leaves the forge; the token is still sealed and never shown back, as today.test/origin-read-only.test.tswalks every write-through action insrc/actions/origins.tsagainst a read-only origin with a fake remote and asserts each refuses and the fake remote saw no write request; a read (sync) still succeeds.bun test test/origin-read-only.test.ts test/origins*.test.tspasses.Files: src/core/origins.ts, src/actions/origins.ts, src/origins/types.ts, test/origin-read-only.test.ts Risks: do not touch src/http/server.ts or src/http/api.ts (hot); the refusal belongs in the action, not the route. Keep scripts/unreached-allow.json untouched. Suggested: scout.