Public: anyone can read this; the crew can change it.
Defect on the v1.0.0 path: the probe's "keeper's last beat" line is UNKNOWN (403) for any token but the owner's, so the release tick's health is unproven by the crew #15516
Check · Review · Land · Live done — Landed and live in production.
A non-admin person who can write trevato/forge now reads the release keeper's newest beat, on both GET /api/v1/keeper and the MCP tool releasekeeper. Before this, both doors used mayRead, which needs the administer ability, so only an admin role passed.
shipped production is serving it deploy 3fede26
2 earlier comments · 1 event
A non-admin person who can write trevato/forge now reads the release keeper's newest beat, on both GET /api/v1/keeper and the MCP tool release_keeper. Before this, both doors used mayRead, which needs the administer ability, so only an admin role passed. That is why a planner's token got 403 while the crew's run token, which counts as an agent and skips that check, got through.
Change
- A new check,
mayReadKeeperinsrc/release/gate.ts, lets in anyonemayReadalready lets in, plus any account that can write the forge's own repository (canWrite). src/http/api/keeper.tsandsrc/http/mcp/tools/release_keeper.tsuse it. The refusal words, the ETag and the cache headers are the same./releases, rollback and the terminal screens still usemayRead, so nothing else gets wider. The answer carries versions, holds and the tick's reason string, never a secret, and the heartbeat's size cap is untouched.docs/OPERATING.mdnow says who reads the beat. The "one unblocking action" no longer says it takes an admin token.
Tests
test/keeper-writer-reads.test.ts sets up an org-owned forge repository with a "write" team and a "read" team:
- A member on the write team gets 200 with the heartbeat, with an
rwtoken and with anrotoken. A GET is a read, so the token's scope does not matter here. - A member on the read team and anonymous get 403 with today's words.
- Over MCP, the writer gets the same body as over HTTP and the reader is refused.
With the source change taken out, the writer test and the MCP test fail. The reader and anonymous tests pass either way, because those callers were refused before too; they guard against widening the read too far, and no test can fail on them without the change. The existing tests for the crew run token, a run on another repository and an app preview still pass.
Not changed
scripts/v1-probe.ts: its 403 message ("this token may not read the release history") is still true for a token that does not write the repository. Once production runs this change, a writer's token gets 200 and the probe's keeper line prints PASS or FAIL from the beat.- A member who only reads the repository is still refused, as the issue asks.
- I didn't keep a plan on the issue or record an estimate: the
keep_planandestimatetools were not available in this run.
Checks
bun scripts/gate.ts --fix rewrapped one comment, which is committed. bun x tsc --noEmit is clean. scripts/fast.ts named 3,325 test files (about 280 minutes), too broad to run here, so I ran the covering ones myself: 63 files covering the keeper, MCP and release_keeper, releases, OPERATING and the v1 probe, all passing.
Try it
With a token for a non-admin member on a team that writes the forge repository, run curl -H 'authorization: Bearer <token>' $FORGE/api/v1/keeper: it answers 200 with heartbeat. A read-only member's token answers 403.
🤖 Generated with Claude Code
A non-admin member's token that can write the forge's own repository (trevato/forge in production) now reads the release keeper's newest beat. That holds in all three places: GET /api/v1/keeper, the MCP tool release_keeper, and the terminal's Release keeper screen. Before, all three needed the administer ability, which only the admin role has, so a planner's token got 403. A member who only reads the repository, and anonymous, still get the same refusal.
- What changed:
mayReadKeeperinsrc/release/gate.tslets in everyonemayReadlets in, plus anyone who can write the forge repository.- It is used by
src/http/api/keeper.ts,src/http/mcp/tools/release_keeper.ts, and the terminal (the palette entry insrc/tui/forge.tsandreadKeeperinsrc/tui/screens/keeper.ts). /releasesand the terminal's Releases screen keepmayRead.- Holding releases, lifting a hold and asking for a release now still need
mayRollBack. - The answer carries versions, holds and the tick's reason, never a secret, and the reason's size cap is unchanged.
- It is used by
- Tests:
test/keeper-writer-reads.test.tssets up a forge repository owned by an org, with a team that writes it and a team that only reads it.- Writer: gets 200 and the beat with both an
rwand anrotoken, the same body over MCP, the palette entry, and the beat inreadKeeper. - Reader-only member and anonymous: get 403 with today's words, and no palette entry or
readKeeperanswer. - With the source change removed, the writer, MCP and terminal tests fail. The reader and anonymous tests pass either way, because those callers were already refused; they guard against the read getting wider.
- Writer: gets 200 and the beat with both an
- Docs:
docs/OPERATING.mdnow says who may read the beat. - Not changed:
scripts/v1-probe.ts. Its 403 message ("this token may not read the release history") is still true for a token that cannot write the repository. Once production runs this change, a writer's token gets 200 and the probe's keeper line prints PASS or FAIL.
The first push failed the gate's "both doors" rule because the terminal still used the old check; the second commit fixes that. That commit also drops the test's own user-making helper, which the gate had flagged as identical to one in test/tui-board-panel-remove.test.ts; it now uses promote from test/helpers/members.ts. bun scripts/gate.ts and bun x tsc --noEmit pass. scripts/fast.ts named 3,325 test files, too many to run here, so I ran the 44 files covering the keeper, releases and the terminal: 284 tests pass. The forge's full check runs on this push.
To try it: with a token for a non-admin member on a team that writes the forge repository, run curl -H 'authorization: Bearer <token>' /api/v1/keeper and get 200 with heartbeat, or open Release keeper from the terminal's command palette. A read-only member's token gets 403 and no palette entry.
🤖 Generated with Claude Code
Does what the issue asks: mayReadKeeper widens only the keeper read (HTTP, MCP, terminal) to writers of the forge repo; /releases and acting stay on mayRead/mayRollBack. Tests cover writer rw/ro, reader, anonymous, MCP and terminal. Non-blocking: the 403 text still says "administrators and its repository readers", which is now stale for writers; the box 3 gap is real (probe unchanged, needs production to run this).
A non-admin person who can write trevato/forge now reads the release keeper's newest beat, on both
GET /api/v1/keeperand the MCP toolrelease_keeper. Before this, both doors usedmayRead, which needs theadministerability, so only an admin role passed. That is why a planner's token got 403 while the crew's run token, which counts as an agent and skips that check, got through.Change
mayReadKeeperinsrc/release/gate.ts, lets in anyonemayReadalready lets in, plus any account that can write the forge's own repository (canWrite).src/http/api/keeper.tsandsrc/http/mcp/tools/release_keeper.tsuse it. The refusal words, the ETag and the cache headers are the same./releases, rollback and the terminal screens still usemayRead, so nothing else gets wider. The answer carries versions, holds and the tick's reason string, never a secret, and the heartbeat's size cap is untouched.docs/OPERATING.mdnow says who reads the beat. The "one unblocking action" no longer says it takes an admin token.Tests
test/keeper-writer-reads.test.tssets up an org-owned forge repository with a "write" team and a "read" team:rwtoken and with anrotoken. A GET is a read, so the token's scope does not matter here.With the source change taken out, the writer test and the MCP test fail. The reader and anonymous tests pass either way, because those callers were refused before too; they guard against widening the read too far, and no test can fail on them without the change. The existing tests for the crew run token, a run on another repository and an app preview still pass.
Not changed
scripts/v1-probe.ts: its 403 message ("this token may not read the release history") is still true for a token that does not write the repository. Once production runs this change, a writer's token gets 200 and the probe's keeper line prints PASS or FAIL from the beat.keep_planandestimatetools were not available in this run.Checks
bun scripts/gate.ts --fixrewrapped one comment, which is committed.bun x tsc --noEmitis clean.scripts/fast.tsnamed 3,325 test files (about 280 minutes), too broad to run here, so I ran the covering ones myself: 63 files covering the keeper, MCP andrelease_keeper, releases, OPERATING and the v1 probe, all passing.Try it With a token for a non-admin member on a team that writes the forge repository, run
curl -H 'authorization: Bearer <token>' $FORGE/api/v1/keeper: it answers 200 withheartbeat. A read-only member's token answers 403.🤖 Generated with Claude Code
Closes #15515