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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:3hsqzl7iad is past its budget: trevato/forge: "child quota > room for small but not large is refused only for large" failed on 23 pulls in the last ho… #10574

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The child-quota test now gets its memory limit from the size table instead of a hard-coded number, so it passes again (#10503).

shipped production is serving it deploy f21b126

opened this

The child-quota test now gets its memory limit from the size table instead of a hard-coded number, so it passes again (#10503).

Cause: this was not a load-dependent flake. Commit ab3dadb9f raised a small child forge to 2048 MiB in SIZES. The test "room for small but not large is refused only for large" still set FORGE_CHILD_MEMORY_MIB=2000. That limit is below even one small forge. On top of that, the previous test leaves a "first" child in the ledger holding another 2048 MiB. So the test fails every time, on any machine, wherever main contains ab3dadb9f. I ran it locally against this branch's base and it failed the same way. The sentinel's "passes on main" doesn't match that.

Change, in test/child-quota.test.ts only: the limit is now what is already held (heldByChildren(dir)) plus SIZES.small.memoryMiB. The env is passed to quotaRefusal directly instead of written to process.env. A small forge fits exactly and a large one is refused. If the size table changes again, the verdict follows it. The test also asserts that the gap between small and large still exists, so it can't pass vacuously.

Not changed: src/spawn/quota.ts and src/spawn/sizes.ts. The code was right; the test held a stale copy of a figure.

To try: bun test test/child-quota.test.ts passes 4 of 4. bun scripts/gate.ts and bun x tsc --noEmit are clean.

🤖 Generated with Claude Code

Closes #10503

commented

The child-quota test now gets its memory limit from the size table instead of a hard-coded number, so it passes again (#10503).

Cause: this was not a load-dependent flake. Commit ab3dadb9f raised a small child forge to 2048 MiB in SIZES. The test "room for small but not large is refused only for large" still set FORGE_CHILD_MEMORY_MIB=2000. That limit is below even one small forge. On top of that, the previous test leaves a "first" child in the ledger holding another 2048 MiB. So the test fails every time, on any machine, wherever main contains ab3dadb9f. I ran it locally against this branch's base and it failed the same way. The sentinel's "passes on main" doesn't match that.

Change, in test/child-quota.test.ts only: the limit is now what is already held (heldByChildren(dir)) plus SIZES.small.memoryMiB. The env is passed to quotaRefusal directly instead of written to process.env. A small forge fits exactly and a large one is refused. If the size table changes again, the verdict follows it. The test also asserts that the gap between small and large still exists, so it can't pass vacuously.

Not changed: src/spawn/quota.ts and src/spawn/sizes.ts. The code was right; the test held a stale copy of a figure.

To try: bun test test/child-quota.test.ts passes 4 of 4. bun scripts/gate.ts and bun x tsc --noEmit are clean.

🤖 Generated with Claude Code

commented

Fixes the child-quota test that failed on every pull (#10503), and removes one stale entry from the unreached allow list.

  • test/child-quota.test.ts: the test "room for small but not large is refused only for large" was not flaky. It failed every time. Commit ab3dadb9f made a small child forge hold 2048 MiB, and the test still set FORGE_CHILD_MEMORY_MIB=2000, which is less than one small forge. The previous test also leaves a "first" child in the ledger holding another 2048 MiB. The test now sets its limit to what is already held (heldByChildren(dir)) plus SIZES.small.memoryMiB, and passes that env straight to quotaRefusal. A small forge fits exactly and a large one is refused. If the size table changes again, the test still holds. It also asserts that large needs more room than small, so it can't pass by accident.
  • scripts/unreached-allow.json: src/kernel/why_now.ts is imported by the app now, so it comes off the list. That is what "an allowed module that has become reached leaves the list" was failing on. It fails the same way on this branch's base, so it is not caused by the quota change.

No code under src/ changed: the quota logic was right, and the test had kept an old copy of a size figure.

To try: bun test test/child-quota.test.ts test/unreached.test.ts passes 8 of 8, and bun scripts/gate.ts and bun x tsc --noEmit are clean.

🤖 Generated with Claude Code

commented

This pull now changes nothing compared with main: main already contains both of its fixes, so it can be closed.

  • test/child-quota.test.ts (#10503): main landed the same fix for "room for small but not large is refused only for large". The memory limit is set to what the ledger already holds plus SIZES.small.memoryMiB, so a small forge fits and a large one is refused. The merge conflict was only over two wordings of that fix, and I kept main's.
  • scripts/unreached-allow.json: main also no longer lists src/kernel/why_now.ts, so this branch's removal of it adds nothing.

After the merge, bun test test/child-quota.test.ts test/unreached.test.ts passes 8 of 8, and bun scripts/gate.ts and bun x tsc --noEmit are clean.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs