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 #18162
Closed 10h 8m ago
Trace owners can now make a share link for a crew run, and take it back; /t/ serves the trace read-only with secrets masked. I ran the new tests, the dead-code, module-state, doorless and migration suites, tsc and design-lint.
-
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
Trace owners can now make a share link for a crew run, and take it back; /t/<token> serves the trace read-only with secrets masked. I ran the new tests, the dead-code, module-state, doorless and migration suites, tsc and design-lint. One earlier run of the combined set showed a single failure I could not reproduce; two reruns were clean. The full suite was not run.
What changed
- Storage: a new migration (pinned) adds
trace_share: run id, SHA-256 of the token, who made it, when it was revoked. Only the hash is kept; the rawtr_…token is shown once, on the answer to making it. - Who may make or revoke: only someone who may read the run's log and sees its owner facts (
canSeeOwnerFacts: the repository's owner or writers). There is no new grant table or admin shortcut. A non-owner gets 404, and 403 if they can read the log but are not an owner. - Same-origin: both
POST /traces/:id/shareand/unsharego throughreadForm, which refuses a cross-origin request. GET /t/:token: shows the steps and their raw lines. Every line goes throughredactHeldagain, so a log written before a value was masked is still masked now. It shows no repository, cost or links. It isno-store,no-referrerandnoindex. A revoked, unknown or malformed token is 404.- Page:
/traces/:idhas a Share section for the owner, with Make a link and Revoke every link. - Terminal: on the trace screen,
smakes a link (shown once) andxrevokes. - Docs:
docs/features/traces.mdhas a new section. - Test:
test/trace-share.test.tsplants aghp_…token in the log and checks that:- the response shows it as
[redacted]; - after revoke the same link is 404;
- a non-owner cannot create or revoke a link;
- a cross-origin make or revoke is refused;
- the table holds no raw token.
- the response shows it as
Left out
- Expiry, naming a link, and revoking one of several (revoke takes back all of a run's links). Also no JSON twin.
- Refreshing the POST answer makes another link.
- The terminal
sandxact without asking first. Thetui-asks-firsttest passes.
Gate notes
- The gate warns that
ownerOfinshare.tsis similar togateinorigin_read_grant.ts. They check different things, so I left them separate. - The gate also says the
/traces/:idroute is not anapp.lookspage inforge.json, so the reviewer decides on the look.
Try
Open /traces/<run id> as the repository owner and press Make a link. Open the /t/<token> shown in a private window, then press Revoke every link and reload it for a 404.
[
{"go":"/traces/<run id> as the repo owner","look":"Share section: 'Sharing is off.' and Make a link","expect":"after Make a link, the page shows 'Link, shown once' with /t/tr_… and a Revoke button"},
{"go":"/t/<token> in a private window","look":"steps with raw lines, no repo, cost or links","expect":"any credential-shaped text reads [redacted]"},
{"go":"Revoke every link, then reload /t/<token>","look":"the shared page","expect":"404"}
]Declined: already done on main in 7a173148f. That commit, "Traces 5: compare two traces, and share one with secrets redacted (#18017)", is the work the issue asks for, and it replaces this branch's version of the share feature. Run log: https://forge.open-platform.sh/trevato/forge/runs/01m909wnmhxbd9wr3ky9c9jmq1
Trace owners can now make a share link for a crew run, and take it back;
/t/<token>serves the trace read-only with secrets masked. I ran the new tests, the dead-code, module-state, doorless and migration suites,tscanddesign-lint. One earlier run of the combined set showed a single failure I could not reproduce; two reruns were clean. The full suite was not run.What changed
trace_share: run id, SHA-256 of the token, who made it, when it was revoked. Only the hash is kept; the rawtr_…token is shown once, on the answer to making it.canSeeOwnerFacts: the repository's owner or writers). There is no new grant table or admin shortcut. A non-owner gets 404, and 403 if they can read the log but are not an owner.POST /traces/:id/shareand/unsharego throughreadForm, which refuses a cross-origin request.GET /t/:token: shows the steps and their raw lines. Every line goes throughredactHeldagain, so a log written before a value was masked is still masked now. It shows no repository, cost or links. It isno-store,no-referrerandnoindex. A revoked, unknown or malformed token is 404./traces/:idhas a Share section for the owner, with Make a link and Revoke every link.smakes a link (shown once) andxrevokes.docs/features/traces.mdhas a new section.test/trace-share.test.tsplants aghp_…token in the log and checks that:[redacted];Left out
sandxact without asking first. Thetui-asks-firsttest passes.Gate notes
ownerOfinshare.tsis similar togateinorigin_read_grant.ts. They check different things, so I left them separate./traces/:idroute is not anapp.lookspage inforge.json, so the reviewer decides on the look.Try Open
/traces/<run id>as the repository owner and press Make a link. Open the/t/<token>shown in a private window, then press Revoke every link and reload it for a 404.Closes #18084