Public: anyone can read this; the crew can change it.
A run gets exactly the secrets it declares, for exactly that run, and never in a transcript #369
Closed 63d 1h ago
A run now receives only the secrets its brief or issue declares, for that run alone, and a granted value is kept out of the log, events and commits. bun test is not fully green here: 10 tests fail, and I did not check them against main.
-
Reviews
No review yet.
-
Checks
stopped closed without shipping
-
History
- Merge main; run_secret creates its own table so it no longer rides the shared migration list 5472062
- One share verb: share(item, to?) routes to who needs to know, with budgets against noise (#370) 02d3306
- Offline-first feed: a Mac with no wifi still shows the last feed and keeps your tells (#371) 37391dc
- Merge main into scout/336: keep snapshot destination import and the grant sweep 1a6a0c3
- The Backups page takes the snapshot destination: bucket and keys sealed in the forge, not plaintext in its environment (#367) d0b8075
- Merge main into scout/336: run_secret becomes migration 36; log keeps both redaction and the error ring 30a7fb4
- The home page is the feed: server-rendered, live, on phone and desk (#368) b7a4fe8
- A run gets exactly the secrets it declares, for that run only, and never in a transcript b4fba88
- secret.key leaves the snapshot bucket: whoever reads the bucket must not hold the key and the data together (#366) aa54cff
- Feed model and ranker: a per-viewer read model of forge events, ranked, each item with a one-sentence reason (#364) c0eddaa
- The forge keeps its own errors: the last hour's error lines are counted and the latest few are readable in health (#359) ffd6a50
- The board shows the forge's health as one line: “all fine”, or what needs you, live (#358) bab479a
- One screen answers “is everything fine?”: the asks inbox, reborn as all fine / these need you (#357) 550bab7
- Forge-level secrets: a sealed, write-only slot an operator can trust (#356) 4d684d7
- The MCP plans in one call: `plan` opens several small issues and links them (#355) aac1cf6
- The forge says how it is at /api/v1/health: disk, memory, queue, stuck runs, apps asleep and previews, as one plain answer (#352) 80ce2a0
- Something that newly needs you reaches your phone: a notify URL fed from the event stream (#354) 4b9f1ce
- The MCP reads and edits the plan: `map`, `link` and `unlink` tools (#353) e63de54
- A hosted app with children still working is never put to sleep by the sweep (#350) 907652b
- The MCP tells the truth about itself: probe reads, the guide lists all ten tools, probe and stop have tests (#342) ba859c8
2 earlier comments
I merged main into the branch and pushed it; the two conflicts are resolved and the merge result typechecks. I did not rerun the full bun test suite after the merge. I ran only test/run-secrets.test.ts, test/kernel.test.ts, test/secret-store.test.ts and test/crew.test.ts, and all 44 tests in them pass.
src/core/schema.ts:mainalso added a migration 35, the feed'sinteractiontable. I kept that one as 35 and renumbered therun_secrettable to migration 36, so it runs after it.src/kernel/log.ts: I kept the error ring thatmainadded tocreateLog. The log line is still redacted withredactHeld, so granted secret values stay out of it.
Everything else in the pull is unchanged: a run gets only the secrets it declares, for that run only. Granted values are redacted from the log, events and commits, and the run page shows the names held.
I merged main into the branch and pushed; the only conflict was the import block in src/main.ts, and it is resolved.
- Imports in
src/main.ts:mainnow importsresolveDestinationfrom./snapshot/destination.tsin place of the old snapshot store imports (dirStore,s3FromEnv,s3Store). I kept that and dropped the old store imports, which nothing else in the file uses. I also kept myreleaseOrphansimport. - Checks run:
tscis clean, and 35 tests pass acrosstest/run-secrets.test.ts,test/kernel.test.tsandtest/crew.test.ts. I did not rerun the full suite after this merge. It had 10 failures on the earlier run (mirror/origin, Instagram and sign-in-throttle tests, plus an off-host redirect test that returnedunreachable), and I didn't check those againstmain.
Nothing else in the pull changed: a run still gets only the secrets it declares, for that run only, with values redacted from the log, events and commits.
A run now receives only the secrets its brief or issue declares, for that run alone, and a granted value is kept out of the log, events and commits.
bun testis not fully green here: 10 tests fail, and I did not check them againstmain. They are mirror/origin, Instagram and sign-in-throttle tests, and only the off-host redirect failure was read (unreachableinstead ofinvalid_response, which looks like the sandbox's restricted network). The newtest/run-secrets.test.tsand the crew, sandbox, secret-store and run-lease tests pass, andtscis clean.What changed
Only declared names are resolved (narrowest scope wins). A malformed name or host, or a name that would shadow the run's environment (
FORGE_*,GIT_*,PATH, …), is refused and said in the run log. Names that exist at no scope are logged as "not set".src/crew/grant.tsdoes this.FORGE_TOKEN. An@hostis added to the sandbox allowlist for that run only, but only if its secret was actually granted, and it is logged by host name.kernel/log.ts, with hooks inruns/log.tsandcore/events.ts.src/crew/leak.ts). If commits the agent already made contain a value, the branch is not pushed and the run says so.run_secrettable (migration 35) stores names and scope, never values. The grant is released in the runner'sfinally, so a crash is covered, and a 30-second sweep inmain.tscloses any left open. The classic run page shows "Secrets held: NAMES (released)".docs/APPS.md.Tests:
test/run-secrets.test.tsplants a value and shows it never reaches the log (plain or encoded) or an event. It also covers a value written into a file and into a commit, the egress widening, and the crash sweep.Left out
To try: set a forge secret under Settings → Secrets, assign an agent an issue whose body starts with the front-matter above, and open the run page to see the names held.
🤖 Generated with Claude Code
Closes #336