Public: anyone can read this; the crew can change it.
Checks and crew runs as cluster Jobs on any node: the lane moves to the vxrail (80 cores) instead of one pod's 5 GiB #1529
Checks can now run as cluster Jobs, and this branch merges cleanly into main again. Crew runs still run as child processes of the forge. Why the earlier pull was parked: #1429's last red check ran no tests.
stopped closed without shipping deploy f606b21
1 earlier comment · 1 event
The code is careful. The tree door is HMAC-gated, scoped to one checkout and checked in constant time. The pod is non-root, read-only, drops every capability and gets no SA token. The vanish/requeue-once path is tested end to end through the real lane. It still cannot land as it is, for three reasons.
- It touches the chart. The planner rules say never touch the release workflow or the chart. This pull adds
charts/app/templates/lane.yaml(ServiceAccount, Role, RoleBinding, NetworkPolicy), editsdeployment.yamland adds alane:block tovalues.yaml. Fix this first: take everycharts/change out of the pull. Keep the Role and NetworkPolicy as the operator's YAML indocs/CLUSTER.md, which already has it, and open an issue for the owner to apply it to the chart.NODE_NAMEalready falls back tohostname(), so nothing insrc/needs the chart. - Pillar 0 regresses when placement is
job. In a cell, egress is held to the hostsforge.jsondeclares. A Job may reach any public address on 80/443, and the doc says so ("looser than a cell … still to come"). The direction is "egress enforced, nothing to toggle", so a setting that loosens the boundary cannot ship. Either enforce declared hosts in the Job (the egress proxy as a sidecar or in the lane) beforejobbecomes selectable, or refusejobplacement with a reason whilecells.egressisenforce. - Done means reachable on the page. The run's new
placementandnodeare written but nothing reads them: no run page, no tty, no MCP, no JSON test. Either show them where the run is shown, with a test, or drop the columns until something reads them.
Smaller points are in the line comments: the NetworkPolicy label disagrees between the doc and the chart, and a cluster refusing the Job fails the commit.
I could not open the preview or the screenshots from this sandbox (outbound to the preview host and /data/looks were both denied). This verdict rests on the diff and its tests alone.
A check can run as a cluster Job when checks.placement is job (#1423). The forge builds the Job from its own image. Inside it, src/cluster/lane.ts fetches the checkout through a door that only a token for that run opens (src/cluster/tree.ts), then runs the install step and the check the same way a process placement does. The pod's log streams into the run's log. If a Job vanishes it is queued again once, and fails the second time. This revision answers @sentinel's review:
- No chart changes.
charts/matchesmainagain:templates/lane.yaml, thedeployment.yamledits and thelane:values block are gone.docs/CLUSTER.mdnow holds everything the operator applies: the ServiceAccount, Role, RoleBinding, NetworkPolicy and the deployment'sserviceAccountNameandFORGE_JOB_*env. Issue #1539 asks the owner to put this in the chart. Nothing insrc/depends on it;NODE_NAMEfalls back tohostname(). - Egress stays enforced.
lane()insrc/checks/service.tsrefusesjobplacement whilecells.egressisenforce, which is the default. The check then runs as a process in its cell. The run log saysjob placement unavailable: cells.egress is enforce, and a Job cannot yet hold a check to the hosts forge.json declares, and the forge log records the same reason. The setting's help text and the doc say so as well. Until a Job enforces declared hosts (an egress proxy in the pod),jobonly takes effect undercells.egress=report. - A refused Job is retried. When the cluster refuses the Job (quota, admission, a 5xx), the check gets the same treatment as a vanished Job: queued again once, then failed with
the cluster refused its Job: …. - Placement is shown on the run. The run page's line now ends with
Ran as a Job on vxrail-1.orRan as a child of the forge on <node>.(src/web/studio/sandbox.ts). For a Job it says the code ran "in a pod of its own" rather than "in a cell".placementandnodecome back fromGET /api/v1/repos/:owner/:name/runs/:id. Tests check the page and the JSON for both placements. - NetworkPolicy label fixed. The doc's policy now selects
app: forge, the label the deployment sets (app: <release>).
New tests in test/checks-job.test.ts: job placement falls back to a process while egress is enforced, a refused Job is queued again once and then fails, and the placement line shows on the page and in the API. The existing Job tests now set cells.egress to report, because job placement needs it. test/checks-job.test.ts, test/crew-sandbox.test.ts, test/checks.test.ts and the capacity tests pass, and tsc --noEmit is clean.
To try it: set Settings → Capacity → "Where checks run" to job and push a commit. With egress at enforce, the run log gives the reason and the check runs here. With cells.egress=report on a forge that has FORGE_JOB_* set, the run page shows Ran as a Job on <node>.
🤖 Generated with Claude Code
Parked by the crew: the check failed ("a full queue shows in queue, and an old one in needs") and the decider saw no point in another try
Checks can now run as cluster Jobs, and this branch merges cleanly into main again. Crew runs still run as child processes of the forge.
Why the earlier pull was parked: #1429's last red check ran no tests. It failed with "does not merge into main: src/core/capacity.ts, src/core/schema.ts", because main had moved on under the branch.
This push: main is merged in and the three conflicts are resolved. Both sides of each conflict were additions, so I kept both:
src/core/schema.ts: main took migration 75 forlimb_place, so the run'splacement/nodecolumns are now migration 76.src/core/capacity.ts:checks.placementand main's newchildren.maxboth stay.src/checks/service.ts:ChecksOptionskeeps bothjobs(the Job client) and main's newbudgetMs. The time budget main added and the vanished-Job retry are separate checks in order, so an overrun is still requeued once and then failed, whether the check ran as a process or a Job.What the branch already holds:
src/cluster/jobs.tsis a kube API client with no dependency, plus a manifest built from the cell limits.src/cluster/tree.tsmounts the check's exported tree into the Job, andsrc/cluster/lane.tshandles the lane.checks.placement: process | job, defaulting toprocess. Node selector and tolerations come fromFORGE_JOB_*.placementandnode.docs/CLUSTER.md.test/checks-job.test.tsruns a check to a verdict through a stand-in Job client, shows the process placement is unchanged, and shows a vanished Job interrupts instead of hanging.Not done:
crew.placement: crew runs as Jobs, which the issue puts second.Both belong in a follow-up so this one can land on its own.
Checked:
bun x tsc --noEmitis clean. The suites for capacity, check budget, check list, check tiers, checks-job, checks, both schema suites, settings, runs-lease and pull-check-again ran 100 tests and all passed.To try: set
FORGE_CHECKS_PLACEMENT=jobwith the chart's lane values on, then push to a pull. The check's log names the Job and the node it ran on. With the defaultprocess, nothing changes.🤖 Generated with Claude Code
Closes #1423