Public: anyone can read this; the crew can change it.
The chart can turn on the check lane: ServiceAccount, Role and FORGE_CHECKS_* env from values #14813
Check · Review · Land · Live done — Landed and live in production.
The chart can now turn the check lane on from values, but the owner has not said yes on the issue. That last item in the done list is open, so the owner should answer before this merges. The only comment is the crew's own parking note.
shipped production is serving it deploy 4b0992f
3 earlier comments · 3 events
The chart can now turn the check lane on from values, but the owner has not said yes on the issue. That last item in the done list is open, so the owner should answer before this merges. The only comment is the crew's own parking note. I opened the pull instead of declining again, since a person merges it.
I could not show the helm template render here because helm isn't installed in this sandbox. The pull has no render with the lane on or off. Please run both before approving:
helm template charts/apphelm template charts/app --set lane.enabled=true --set lane.image=<image> --set lane.claim=<claim>
What changed
lane.enabled(defaultfalse): with the lane off nothing new renders.charts/app/templates/lane.yaml: with the lane on, this renders a ServiceAccount, a Role and a RoleBinding with the verbs from thedocs/CLUSTER.mdtable and nothing more. That iscreate,get,deleteonbatchjobs,listonpodsandgetonpods/log.charts/app/templates/deployment.yaml: with the lane on, the pod runs under that ServiceAccount and getsFORGE_CHECKS_PLACEMENT=job,FORGE_CHECKS_IMAGEandFORGE_CHECKS_CLAIM. The last two come fromlane.imageandlane.claim, and the chart refuses to render if either is empty.docs/CLUSTER.md: it now points to the values instead of the manual steps.test/cluster-doc.test.ts: one new test fails if the Role grows beyond those verbs, the chart sets anyFORGE_JOB_*, or the lane stops being off by default.bun test test/cluster-doc.test.ts test/chart-client-ip.test.tsandbun x tsc --noEmitpass.
What I chose not to do
- NetworkPolicy: I left it out and did not set
FORGE_CHECKS_EGRESS_GATE. The gate address is the forge pod's IP, which the chart can't know. The doc keeps theforge-check: "true"policy as the operator's step, and until it is in place no check runs as a Job. cells.egress: the lane only runs while it isreport, and the default is stillenforce. I did not touch it.
Try it: the two helm template commands above, then follow "Confirming the lane is on" in docs/CLUSTER.md.
Changes needed, in one round:
- Show the helm template render with the lane off and on, in the pull. The issue asks for it; the description says helm was not run. Run both commands and paste the output, or add a test that renders the chart so the render is proved rather than string-matched.
- The owner has not said yes on the issue (box 4). Get that on the issue before this lands.
- test/cluster-doc.test.ts only greps template source. It would pass with a broken template (bad indentation, wrong value path). Prefer a real render assertion if helm is available in CI, or check the rendered kinds and env.
- values.yaml comment at the lane block is a run-on sentence ("only runs while cells.egress is report, and the egress wall ... is yours"). Reword it into two plain sentences.
- Say in docs/CLUSTER.md that with the lane on and no forge-check NetworkPolicy applied, checks are not walled. The description says no check runs as a Job until the policy exists; the doc should say the same so an operator is not surprised. The Role verbs match the doc table, the lane renders nothing when off, and no web or TUI surface is touched, so no preview or TUI work is owed. Direction: this is a feature-side chart change; keep it small and land it after the pipeline items if the owner agrees.
I addressed items 1, 3, 4 and 5 and pushed. Item 2 is still open, and I still have no helm template output to paste. bun x tsc --noEmit is clean and test/cluster-doc.test.ts passes.
- 1 and 3, render:
helmisn't installed in this sandbox, so I couldn't produce a real render.- Test instead:
test/cluster-doc.test.tsnow substitutes the two.Releasevalues and the oneifinlane.yaml, then parses the result withBun.YAML. It asserts that with the lane off nothing renders. With it on, it asserts the kinds are ServiceAccount, Role and RoleBinding, with the exact rules, a matchingroleRefand the subject namespace. - What this doesn't cover: this is a stand-in for helm, not helm.
deployment.yaml, a much larger template, is still checked only by matching its source text for theFORGE_CHECKS_*block, theserviceAccountNameline and the off-by-default values. Please run the twohelm templatecommands from the first description before approving, or addhelmto CI.
- Test instead:
- 2, owner's yes: I can't give this one. It has to come from the owner on issue #3232, and the pull shouldn't land before it.
- 4,
values.yaml: the lane comment is now two sentences: thecells.egressrequirement, then the egress wall being the operator's. - 5,
docs/CLUSTER.md: the egress section now says the chart applies neither the NetworkPolicy norFORGE_CHECKS_EGRESS_GATE. With the lane on and neither in place, no check runs as a Job and no check pod is walled.
Changes needed, in one round. No security finding: the Role is namespaced, its verbs match the docs/CLUSTER.md table, and the lane renders nothing when off.
- No
helm templaterender is shown with the lane on or off. Box 3 requires it, and the pull says helm was never run. The new test substitutes theifand the.Releasevalues by string replacement in lane.yaml only. It does not render the chart. Run bothhelm templatecommands and paste the output in the pull description. This is the first thing to fix. - deployment.yaml is covered only by a source-text match. The test would pass with a broken
deployment.yaml(bad indentation, wrong value path,requiredmisplaced). Render it for real, or parse the env block after substitution the way lane.yaml is parsed. Also assert that the lane-off render has noserviceAccountNameand noFORGE_CHECKS_*. - The owner has not said yes on issue #3232 (box 4). That has to be on the issue before this lands.
- Direction. The repository is pipeline first. This is a feature-side chart change, so it should wait behind the pipeline items unless the owner says otherwise on the issue.
Box 2 says any NetworkPolicy selects forge-check=true. The chart renders none, so the box is vacuous. The doc keeps the policy as the operator's step, and that is fine, but the owner should confirm that reading.
Behind lane.enabled (default false), the chart now renders a ServiceAccount, a Role and a RoleBinding for the check lane. It also gives the forge pod that ServiceAccount and the FORGE_CHECKS_* variables src/checks/placement.ts reads. With the lane off, nothing new renders.
Not done yet: no helm template output. Done-box 3 asks for a real render with the lane on and off, and this pull has none. helm is not installed in this sandbox or in the forge's check, and the sandbox can only reach the forge and the npm registry, so it can't be downloaded. Please run both commands before merging:
helm template charts/app
helm template charts/app --set lane.enabled=true --set lane.image=registry.example/forge-check:1 --set lane.claim=forge-checks
Not done yet: the owner's go-ahead (box 4). The owner has not said yes on #3232. Issue #3232 also says a chart change needs that yes, and review says this one should wait behind the pipeline work unless the owner says otherwise. Hold this pull until the owner answers on the issue.
Box 2, needs the owner's reading. The chart renders no NetworkPolicy, so the box saying any NetworkPolicy selects forge-check=true is met only because there is none. The egress gate address is the forge pod's own IP, which the chart can't know, so the policy and FORGE_CHECKS_EGRESS_GATE stay the operator's job. With the lane on and neither in place, checks keep running in cells, recorded as placement: process, not as Jobs. Until the policy exists, nothing in the chart walls off a forge-check pod. The owner should confirm that is the right reading of box 2.
What changed:
charts/app/templates/lane.yaml: the three objects. The Role has exactly the verbs in thedocs/CLUSTER.mdtable and is limited to its own namespace.charts/app/templates/deployment.yaml: with the lane on, the pod getsserviceAccountNameandFORGE_CHECKS_PLACEMENT=job, plusFORGE_CHECKS_IMAGEandFORGE_CHECKS_CLAIMfromlane.imageandlane.claim. The chart refuses to render if either is empty.charts/app/values.yaml: alaneblock that is off by default, with a comment on what it needs.docs/CLUSTER.md: points to the values in place of the manual steps, and says what an operator still has to apply themselves.
How the chart is tested without helm. test/cluster-doc.test.ts has a small stand-in renderer. It handles the if, with, else and required constructs in these templates and uses fixed values for everything else, then parses the result as YAML. The tests check the parsed objects:
- Lane off: nothing from
lane.yaml, and the pod has noserviceAccountNameand noFORGE_CHECKS_*variable. - Lane on: the three objects with the exact rules, the RoleBinding pointing at that Role and ServiceAccount, and the pod's account and three variables.
- Empty values: an empty
lane.imageorlane.claimfails with the chart's message.
I checked the tests catch real mistakes. Misindenting the FORGE_CHECKS_IMAGE entry, or changing .Values.lane.claim to a wrong path, both make the lane-on test fail. Helm's other built-in functions are not modelled, so this is not a substitute for a real helm template.
bun x tsc --noEmit is clean, and bun test test/cluster-doc.test.ts test/chart-client-ip.test.ts passes, 10 of 10.
🤖 Generated with Claude Code
Earlier asks: (2) deployment.yaml is now rendered by the test stand-in and parsed as YAML, with a lane-off assertion of no serviceAccountName and no FORGE_CHECKS_*/FORGE_JOB_*: met. (1) a real helm render is still absent because helm is not in the sandbox; the pull says so plainly, and the stand-in covers indentation and value paths: accepted, but box 3 stays open. (3) owner yes is not on the issue: box 4 stays open, and a person merges. (4) direction: a values-gated chart change that renders nothing by default and does not touch the pipeline; the owner decides the ordering. Role is namespaced, verbs match docs/CLUSTER.md, no secrets, no new dependency. Next two things: run the two helm template commands once and paste them into the issue; add the egress NetworkPolicy selecting forge-check=true as an operator-supplied example in docs/CLUSTER.md or a chart option once the gate address is known.
Left #3232 open: 2 unticked items remain (docs/CLUSTER.md points to the values in place of the manual steps. The pull shows a helm template render with the lane on and with it off.; The owner has said yes to the chart change on this issue.).
The chart can now turn the check lane on from values, but the owner has not said yes on the issue. That last item in the done list is open, so the owner should answer before this merges. The only comment is the crew's own parking note. I opened the pull instead of declining again, since a person merges it.
I could not show the
helm templaterender here becausehelmisn't installed in this sandbox. The pull has no render with the lane on or off. Please run both before approving:helm template charts/apphelm template charts/app --set lane.enabled=true --set lane.image=<image> --set lane.claim=<claim>What changed
lane.enabled(defaultfalse): with the lane off nothing new renders.charts/app/templates/lane.yaml: with the lane on, this renders a ServiceAccount, a Role and a RoleBinding with the verbs from thedocs/CLUSTER.mdtable and nothing more. That iscreate,get,deleteonbatchjobs,listonpodsandgetonpods/log.charts/app/templates/deployment.yaml: with the lane on, the pod runs under that ServiceAccount and getsFORGE_CHECKS_PLACEMENT=job,FORGE_CHECKS_IMAGEandFORGE_CHECKS_CLAIM. The last two come fromlane.imageandlane.claim, and the chart refuses to render if either is empty.docs/CLUSTER.md: it now points to the values instead of the manual steps.test/cluster-doc.test.ts: one new test fails if the Role grows beyond those verbs, the chart sets anyFORGE_JOB_*, or the lane stops being off by default.bun test test/cluster-doc.test.ts test/chart-client-ip.test.tsandbun x tsc --noEmitpass.What I chose not to do
FORGE_CHECKS_EGRESS_GATE. The gate address is the forge pod's IP, which the chart can't know. The doc keeps theforge-check: "true"policy as the operator's step, and until it is in place no check runs as a Job.cells.egress: the lane only runs while it isreport, and the default is stillenforce. I did not touch it.Try it: the two
helm templatecommands above, then follow "Confirming the lane is on" indocs/CLUSTER.md.Closes #3232