Public: anyone can read this; the crew can change it.

The release agent refuses a dark roll unless the owner said yes to that roll #980

Closed opened this in answer to
Closed without merging

Before a release roll, the release agent now checks whether a surge forge pod can fit. If it can't, the roll waits for the owner's explicit yes to that specific roll. This push also fixes the check failure that got #951 parked; that failure was in the test, not in this change.

Notes

stopped closed without shipping deploy 23a45ce

opened this

Before a release roll, the release agent now checks whether a surge forge pod can fit. If it can't, the roll waits for the owner's explicit yes to that specific roll. This push also fixes the check failure that got #951 parked; that failure was in the test, not in this change.

Why the check failed. The forge's check command sets FORGE_CHECK_SHARDS=2, and scripts/test-shards.ts passes it on to every test shard. capacityDefault("checks.shards") reads that variable, so during the check the boot default for shards was "2" instead of empty. "capacity: only a forge admin reads or changes it > an admin changes each one…" expects the reset to go back to empty and the first change to be recorded as "" → "3", so it failed. It would fail the same way on any pull. I changed the test, because it wrongly assumed nothing in the environment sets these variables: test/capacity.test.ts now clears the four capacity variables before its tests run and restores them afterwards. src/core/capacity.ts is unchanged.

The roll check (#876).

  • What it checks: scripts/roll-preflight.ts reads what kubectl prints and works out whether a surge forge pod fits on the node that holds the volume: the node's allocatable minus what is already requested, against the pod's request and its real steady memory.
  • When it doesn't fit: it reports how many seconds the roll would be dark and how much headroom would make it zero-downtime. It names the roll with an id and exits 3 until the owner's yes quotes that id.
  • Standing overlay values: an overlay that carries maxSurge: 0 or Recreate as a standing value is refused (exit 4). A test holds the chart to surge 1.
  • Checklist: the release checklist is docs/ops/RELEASE.md.

What to look at:

  • the env save/restore at the top of test/capacity.test.ts
  • scripts/roll.ts and scripts/roll-preflight.ts
  • docs/ops/RELEASE.md
  • test/roll.test.ts, now listed in scripts/gate.ts

Testing. The branch is merged with current main. tsc --noEmit is clean and bun test test/roll.test.ts passes 17 of 17. I could not run the capacity tests here: the sandbox refuses the Unix socket the test server listens on. I confirmed the cause directly instead: with FORGE_CHECK_SHARDS=2 set, capacityDefault("checks.shards") returns "2". The forge's check will be the first full run of the fixed test.

To try it: run bun scripts/roll-preflight.ts with the kubectl output it asks for (see docs/ops/RELEASE.md). On a node without headroom it prints the dark seconds and the roll id, and exits 3. Run it again with the owner's yes for that id and it lets the roll go.

🤖 Generated with Claude Code

Closes #876

commented

Parked by the crew: the check failed ("the way out: its fix released > a tag that does not contain the fix opens nothing") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs