Public: anyone can read this; the crew can change it.
Traces 5b: a trace has a share link, off by default, revocable, served with secrets redacted #18176
Closed 14h 3m ago
Owners can now share a trace by a revocable link, and GET /t/:token serves it read-only with secrets redacted. My three new tests in test/trace-share.test.ts pass, and tsc and design-lint are clean. I didn't run the rest of the suite (the forge's check runs it on the push).
-
Reviews
No review yet.
-
Checks
stopped closed without shipping deploy 58477fa
-
History
- Share handlers share one form door; wrap comments 58477fa
- Direction: a trace's owner can share it by a revocable link, secrets masked (#18084) 1f9c3a1
- AWS writes for mail setup are a named allowlist beside the read rule, and nothing else (#18142) 93c7c3d
- Traces 1c: GET /api/v1/traces/:id returns the thread, turns and steps as one tree (#18128) 077bab0
- A box's TPS and tick time show live on its games pane, from spark's health report or `/spark tps` at check-in (#18143) f7e559b
- Access 4c: the grants view as an MCP tool and a terminal screen (#18130) 89afadf
- small: the Absorb findings say they are ready for the owner to send to Ben (#18132) d41ec43
- Games survival step 2a: BlueMap behind login at /games/<box>/<server>/map, no published box port (#18100) 1132c91
- A Mac can take a repository's checks and report them on the pull (#17915) 4c72a1d
- Access 4: one view of every grant, and a page that says who may do what (#18062) 5ba07c8
- Access 2: one `may(principal, action, resource)`, with the repository checks behind it first (#18065) 7d48ce1
- Apps without a login 2: a tiny model in the browser fills the app's spec, and the compiler catches every failure (#18117) 4147a37
- Games: a new pin for the forge's proxy plugin replaces the old jar, in PLUGINS and on disk, and the page says which one loaded (#18111) da9e15f
- Healer: a server still starting, its log moving, is not started again (#18053) d918642
- Game box: refuse a wake or a mod install the box has no memory for (#18057) 7fe508f
- Games survival step 1: a survival performance set (lithium, scalablelux, noisium, chunky) planned as one locked install (#18099) b838dce
- Games survival step 2b: read FabricExporter Prometheus metrics at check-in so TPS and tick time show on the games page (#18116) 0d92810
- Full suite red: 2 files in check run 01m8zwjzbrpcdryvgey8kqdeak (#18124) 643723c
- Apps without a login 1: a sentence becomes an app in the tab forge, with no model (#18080) 4aa5b50
- A git CDN: a repository's packs served from object storage by short-lived links (#18066) 78329a7
Owners can now share a trace by a revocable link, and GET /t/:token serves it read-only with secrets redacted. My three new tests in test/trace-share.test.ts pass, and tsc and design-lint are clean. I didn't run the rest of the suite (the forge's check runs it on the push). The commits were already on the branch and pushed, so there was nothing new to push.
What changed
- Storage: a new
trace_sharetable (migration20261204060000-trace-shareplus its pin) holds the run id, the SHA-256 of the token, who created it, and when it was revoked. The raw token is never stored. - Create and revoke (
src/trace/share.ts):POST /traces/:id/shareandPOST /traces/:id/unshareare the only ways in, and both go through the form door's same-origin check.- Only someone who can see the repo's owner-level facts may use them; this reuses the existing role, with no new grant table or admin shortcut.
- Someone who can't read the run gets 404, and a reader who isn't an owner gets
owner_only. - The raw token is shown once, at creation.
- Public link:
GET /t/:tokenchecks the token shape first, so a malformed token is a 404 with no lookup.- Unknown or revoked tokens are also 404.
- Every field goes through the existing redaction before it is rendered.
- Both doors: the web trace page has "Make a link" and "Revoke every link". The terminal trace screen (
src/tui/screens/trace.ts) hassto share andxto revoke.docs/features/traces.mdhas a new section. - Tests: the new tests cover a planted token showing as redacted, the same link returning 404 after revoke, a non-owner being refused, and cross-origin POSTs being rejected.
Left out
- There are no per-link expiry dates and no list of individual links. Revoke takes back all live links on the run at once.
- No new dependencies.
Gate notes
- The gate said it can't map
Looks: /traces/:idto a page inforge.json, so the reviewer picks the look. - The gate also flagged
ownerOfas 0.98 similar togateinsrc/actions/origin_read_grant.ts. I left both: they have the same shape but check different rules.
To try it: as the repository owner, open /traces/<a run id> and press "Make a link". Open the /t/<token> shown in a private window, then press "Revoke every link" and reload that window for a 404.
[
{"go":"/traces/<run id>","look":"Make a link button, then the one-time /t/<token> URL","expect":"token shown once; non-owners see no button"},
{"go":"/t/<token>","look":"read-only trace in a private window","expect":"secrets show as redacted"},
{"go":"/traces/<run id>","look":"Revoke every link, then reload /t/<token>","expect":"404"}
]
🤖 Generated with Claude Code
Owners can now share a trace by a revocable link, and
GET /t/:tokenserves it read-only with secrets redacted. My three new tests intest/trace-share.test.tspass, andtscanddesign-lintare clean. I didn't run the rest of the suite (the forge's check runs it on the push). The commits were already on the branch and pushed, so there was nothing new to push.What changed
trace_sharetable (migration20261204060000-trace-shareplus its pin) holds the run id, the SHA-256 of the token, who created it, and when it was revoked. The raw token is never stored.src/trace/share.ts):POST /traces/:id/shareandPOST /traces/:id/unshareare the only ways in, and both go through the form door's same-origin check.owner_only.GET /t/:tokenchecks the token shape first, so a malformed token is a 404 with no lookup.src/tui/screens/trace.ts) hassto share andxto revoke.docs/features/traces.mdhas a new section.Left out
Gate notes
Looks: /traces/:idto a page inforge.json, so the reviewer picks the look.ownerOfas 0.98 similar togateinsrc/actions/origin_read_grant.ts. I left both: they have the same shape but check different rules.To try it: as the repository owner, open
/traces/<a run id>and press "Make a link". Open the/t/<token>shown in a private window, then press "Revoke every link" and reload that window for a 404.🤖 Generated with Claude Code
Closes #18084