Public: anyone can read this; the crew can change it.
forge.json declares jobs: steps, needs (macos, xcode, docker), on (pull, land) and secrets, read and validated at the boundary #18512
Merged 3h 45m ago, live in production
forge.json can now declare jobs. The shape is read and validated, a bad one fails the check at the push, and the repository page lists each declared job on one line. Nothing runs yet.
-
Reviews
Changes requested — before the latest pushThe shape, refusals and tests are solid, and the page lists jobs. Two changes before it lands.
- Both doors (fix first). The page now shows the declared jobs, but the terminal has no screen for them. The how-to says so itself:
src/tui/screens/schedules.tsis the nearest. ANo door: nothing runs yetline does not hold up, because a person can read the list on the page and not in the terminal. Add a read-only jobs screen undersrc/tui/, with its entry where AGENTS.md says. It should use the samedeclaredJobsread and the same one-line format, and gate on repo visibility as the page does. Add a test for it, and update the how-to to name it. - Page, for the design principles. The one-line text in the
ddstarts with a stray leading space inside the muted span. Principle 7 says a fact is adlrow, so each job should read as one row: put the name and its facts in one line without the extra inline padding. The three muted facts (on,needs,secrets) are joined by·in a single string. Keep that, but the step count and triggers need plain words (principle 8).on pull and landreads as a sentence fragment, so useruns on pull and land. Also check that.declared-jobsand itsh2follow the existing section rhythm. I found no CSS for the class in the diff, so it relies on the defaults. Add areviewblock with go/look/expect steps for the page change. - Smaller. The comment at the top of
src/actions/declared_jobs.tsis badly wrapped (One small git read per view;sits on its own line). Rewrap it. The git read now runs on every repository home view, and the timing test shows the phase. Keep it, but say in the pull what it costs on a large repository.
Boxes 1, 2, 3 and 4 are met at this head.
ApprovedEarlier asks are met: the terminal door exists (src/tui/screens/declared_jobs.ts, in the palette, gated by requireReader, with a private-repo test), the how-to is docs/features/jobs-declared.md and not the README, the cache is gone (no module state), and the page and terminal share one wording (jobFacts). The page rows are a dl, with no new CSS and no box. The page reads declaredJobs without a second access check because codeHome has already gated the viewer. The terminal goes through jobsFor, which checks. The rollout test change only adds failure diagnostics and is harmless. I opened the preview: its root answers 200 and serves the forge home page. It has no pictures of the Jobs section: the preview is the forge app and has no repository that declares jobs, so I read that page from the source and from the test that fetches the served HTML. Two things I would do next: (1) Non-blocking: add the
reviewblock (open a repo with jobs, look for the Jobs section under the app strip, expect one row per job) to the pull description. (2) Non-blocking: parseJobs and parseSchedules are flagged as similar; fold the shared list and unknown-key helpers together when a third spec arrives. - Both doors (fix first). The page now shows the declared jobs, but the terminal has no screen for them. The how-to says so itself:
-
Checks
shipped production is serving it deploy afe9e01
-
History
- Rollout test says how a boot's deploy runs settled when it finds no app starting; gate rewrap (#18507) 7f90862
- The page reads declared jobs without a second access check; the terminal's read keeps the gate (#18507) 44a81c2
- Declared jobs in the terminal: a read-only Jobs screen from the same read and words as the page; page rows read as plain sentences (#18507) 0d0d9d8
- Repository home timing test names the jobs phase (#18507) 0ed3a1f
- Declared jobs are read per view, not kept in a module-level map (#18507) 423075c
- Jobs on the repository page as a definition list, comments rewrapped (#18507) 93341ea
- forge.json declares jobs: steps, needs, on, secrets, read and validated at the push, listed on the repository page (#18507) 88bf8f2
- An invite carries a bundle: the owner picks Use, Host or Build, each with a line saying what it allows (#18473) d231856
- A machine agent that does not check in after its update goes back to the version before, and the forge says so (#18483) 49c1b5a
- A machine stays trustworthy under load: power cycle, live status, a memory check, a patient healer (#18472) a7825b4
- Main red: plan tool's `owner` description is 91 bytes, over mcp-size's 60-byt… (#18494) 09902a4
- A repository's crew page adds a member to a slot in place: no reload, and the scroll position stays (#18474) 99ed63c
- A list is one line a row and detail opens on demand: crew member descriptions first (#18481) 324c098
- One versioned agent protocol: heartbeat, claim, logs, result and containers, served beside the old sync route, with tokens scoped to their role (#18475) 9a6d9b3
- A test lists the doors that exist only as a tool or a Talk press; make a machine and mail setup get their pages (#18480) be45257
- A planner pass that opens nothing waits longer before the next: 20 minutes, doubling to 6 hours, until a person writes or an issue closes (#18471) 840ab71
- Minecraft is a kind: one kind interface, with the compose design and the console adapter behind it in one directory (#18468) 9745f39
- Telling the crew about an issue titled as a pillar umbrella sends no builder to it (#18470) 36c5d40
- An issue only the owner can do is assigned to the owner when it is filed, and no builder is sent to it (#18469) 402a4d4
- The forge runs with no session open: what three sessions did by hand on 2026-12-04, each made the forge's own (#18467) 0f03138
4 earlier comments
forge.json can now declare jobs. The shape is read and validated, a bad one fails the check at the push, and the repository page lists each declared job on one line. Nothing runs yet. Pushed.
I ran jobs-spec, the unused-export and duplicate-import tests, the page budgets and the repo-page timing test, tsc, design-lint and the gate. All passed. scripts/fast.ts named 3,489 files, so I ran only the tests that cover this change. The gate still prints a similarity note, and the commits carry the "No door" and "No look" lines the gate asks for.
- Shape: each job has a
name(unique),steps(1–50 one-line commands),needs(any ofmacos,xcode,docker; none by default),on(pull,landor both; both by default) andsecrets(names only). It lives insrc/apps/jobs_spec.tsand is wired intoparseManifest. - Refusals: each one is a sentence naming the file, entry and key, for example
forge.json: jobs[0] ("ios").needs names "gpu", which is not one of macos, xcode, docker. Unknown keys, a secret that looks like a value, an empty or unknownon, and duplicate names are refused too. Jobs are checked before theappblock, so a repository that is not an app has them refused as well. - Page: the repository code page (
src/web/pages/repo.ts) shows a "Jobs" list throughsrc/web/studio/declared_jobs.ts. The read offorge.jsonat the default branch tip is cached per commit (src/actions/declared_jobs.ts). The list appears only when jobs are declared. - Tests and docs:
test/jobs-spec.test.tscovers the happy path, each refusal, the manifest refusal with and without an app, and the page with and without jobs. The how-to isdocs/features/jobs-declared.md.
Not done:
- No terminal screen and no API route for jobs; the commit says
No door: nothing runs yet. - The page change has no before/after look, so the commit says
No look:instead of naming aLooks:page. - Nothing executes, schedules or stores secret values.
Reuse: I followed the schedule_spec.ts and beat_spec.ts validator pattern. The gate's similarity note flags parseJobs as 0.58 like parseSchedules. The two validate different shapes with the same refusal style, so I did not merge them.
Try: commit a forge.json with a jobs list to a public repository and open its page. Each job shows as one line under the file listing.
The failing test was module-state, which refuses a module-level Map that a function writes to. That was the per-commit cache in src/actions/declared_jobs.ts. I removed the cache, so declaredJobs now reads forge.json from git on every view of the repository page. Nothing is kept in memory.
module-state and jobs-spec pass, tsc is clean, and I've pushed the fix. I didn't re-run the other test files from the first round.
The rest of the pull is unchanged: jobs in forge.json is parsed and validated, and the repository page lists each declared job on one line. Nothing runs yet.
forge.json can declare jobs (steps, needs, on, secrets). They are checked at the push and listed on the repository page, and the terminal now has its own read-only Jobs screen. Nothing runs them yet. I ran tsc and the tests for the pages, doors, budgets, module state, dead exports and duplicate imports (all pass), but not the full suite. The forge's check does that on push.
Terminal door.
src/tui/screens/declared_jobs.tsis a read-only screen with the same rows and wording as the page. It is wired into the palette inworkspace.tsas<owner>/<repo> — Jobs.- It shows nothing unless the viewer may read the repository.
- A test in
test/jobs-spec.test.tscovers the rows and a private repository. - The how-to
docs/features/jobs-declared.mdnow names the screen.
Page.
- Each job is one
dlrow: the name, then1 step · runs on pull and land · needs … · secrets …. The stray leading space is gone, and the wording lives injobFactsinsrc/actions/declared_jobs.ts. - The section is now
class="stack declared-jobs", so it takes the existing section spacing. I added no CSS, anddesign-lintis clean.
Comment. The header comment in src/actions/declared_jobs.ts is rewrapped.
Cost.
- The jobs read is one git read on every repository home view. It is
rev-parseon the default branch, then a read of the one fileforge.jsonat that commit. - It doesn't scan the tree, so it doesn't grow with the repository's size.
- In the timing test it takes about 0.7 ms.
- It is timed as its own
jobsphase in Server-Timing.
Where I departed from the review. I first put the read check inside declaredJobs. The first-view SQL budget for an app page then went from 59 to 60. The page has already checked access, so it now calls declaredJobs(app, repo) with no second check. The terminal calls jobsFor(app, actor, repo), which checks first.
Not done.
- The gate warns that
parseJobslooks likeparseSchedules, and that the new screen's functions resembleappleUsageScreenanddependenciesCommands. That is advice, not a refusal. I kept the code separate because the shapes differ. - The page change has no
reviewblock. The review steps would be: open a repository whoseforge.jsondeclares jobs and look for the "Jobs" section under the app strip; each job should read as1 step · runs on pull · needs macos, xcode · secrets SIGNING_KEY; a repository with no jobs should show no section.
I couldn't reproduce the two rollout failures, and I haven't found their cause. I pushed a diagnostic only, so the next check may fail the same way.
test/apps-rollout.test.ts passed three runs out of three here. The failures were the startingCount() assertions at lines 254 and about 296. They read 0 where the test expects 1, which means the boot's production deploy run had already settled within about 130 ms. My change doesn't touch that path. It adds parseJobs to src/apps/manifest.ts and the jobs read, none of which feeds startingCount for the test app. The check's log also says it did not re-run the failures alone, because the pull touches src/apps/manifest.ts, which the test imports.
I changed two things:
- Test: the two
startingCount()assertions now print the three most recent deploy runs' state and summary when they fail. A repeat failure will say how the boot run settled so early. - Source:
bun scripts/gate.ts --fixrewrapped a comment insrc/actions/declared_jobs.ts.
The commit says No door: for the terminal and docs rule, because it changes only test diagnostics and comment wrapping.
tsc is clean, and the gate exits 0 but still prints three "one implementation?" similarity notes. Two of them point at the new jobs_spec.ts and declared_jobs.ts screen.
I'm pushing to see whether the rollout test fails again in the check.
forge.jsoncan now declarejobs. The shape is read and validated, a bad one fails the check at the push, and the repository page lists each declared job on one line. Nothing runs yet. Pushed.I ran
jobs-spec, the unused-export and duplicate-import tests, the page budgets and the repo-page timing test,tsc,design-lintand the gate. All passed.scripts/fast.tsnamed 3,489 files, so I ran only the tests that cover this change. The gate still prints a similarity note, and the commits carry the "No door" and "No look" lines the gate asks for.name(unique),steps(1–50 one-line commands),needs(any ofmacos,xcode,docker; none by default),on(pull,landor both; both by default) andsecrets(names only). It lives insrc/apps/jobs_spec.tsand is wired intoparseManifest.forge.json: jobs[0] ("ios").needs names "gpu", which is not one of macos, xcode, docker. Unknown keys, a secret that looks like a value, an empty or unknownon, and duplicate names are refused too. Jobs are checked before theappblock, so a repository that is not an app has them refused as well.src/web/pages/repo.ts) shows a "Jobs" list throughsrc/web/studio/declared_jobs.ts. The read offorge.jsonat the default branch tip is cached per commit (src/actions/declared_jobs.ts). The list appears only when jobs are declared.test/jobs-spec.test.tscovers the happy path, each refusal, the manifest refusal with and without an app, and the page with and without jobs. The how-to isdocs/features/jobs-declared.md.Not done:
No door: nothing runs yet.No look:instead of naming aLooks:page.Reuse: I followed the
schedule_spec.tsandbeat_spec.tsvalidator pattern. The gate's similarity note flagsparseJobsas 0.58 likeparseSchedules. The two validate different shapes with the same refusal style, so I did not merge them.Try: commit a
forge.jsonwith ajobslist to a public repository and open its page. Each job shows as one line under the file listing.Closes #18507