Skip to content

ci: confirmation fixture still reaches its work watchdog on main #2930

Closed

Description

@schlessera

Context

The #2868 repair correctly joins cleanup before refusing, but its confirmation fixture still reaches the 27-second work watchdog on current main 541b8d98328a760290ac6dd4a7f065af76153408.

Found in the required bun run test ./tests validation for #2880: confirmation executable renews automatically, releases cancellation and cannot renew beyond the cap fails after 27036.82 ms at tests/integration-command.test.ts:150, with Integration fixture work deadline exceeded; owned cleanup joined inside the 30-second test cap.

An independent clean worktree at the unchanged main base, with its own frozen dependencies and Bun 1.4.2, reproduces it with:

bun run test ./tests/integration-command.test.ts

Result: 4 pass, 1 fail across five tests (52.94 s). The same confirmation test reaches the explicit watchdog at 27051.18 ms. Unlike the original #2868 failure, this receipt has no dangling-process notice or late ENOENT; cleanup is joined. The first merge scenario also took 15498.46 ms on base, versus 18108.74 ms in the broad head run. The run followed severe local host pressure, so this does not establish a new production regression or a reliably controlled trigger. The fixture and integration implementation are unchanged by #2880.

Decision (maintainer, 2026-11-03)

Make the fixture cheaper. Attribute the dominant operation with per-mode timings under controlled load, then reduce its cost until the case keeps a stated margin at a stated oversubscription level. Deadlines stay unchanged.

Rejected: treating CPU oversubscription as an environment limit and closing as environment-attributed.

Scope

  1. Attribute. Under the controlled load from the 2026-11-03 reproduction below (owned busy loops at 0×, 1× and 3× oversubscription), record per-mode and per-awaited-operation timings for confirmation executable renews automatically, releases cancellation and cannot renew beyond the cap (tests/integration-command.test.ts:189 at 3d3516a02; the original receipt's :150 was an older line), and name the operation that dominates the slowdown.
  2. Reduce. Cut that operation's cost in the fixture (or the code it exercises, if the cost is there and the change keeps behaviour) until the case meets the stated target.
  3. State the target. The PR states the oversubscription level and the margin against the 27-second work watchdog that the repaired case keeps, with the measurements behind it.

Out of scope

Acceptance criteria

  • Per-mode/awaited-operation timings at 0×, 1× and 3× oversubscription on unchanged main are recorded in the PR, naming the dominant operation; a passing retry alone is not a diagnosis.
  • The PR states the target: an oversubscription level above 1× (main fails 9 of 10 at 3×) and a margin against the 27-second watchdog, and shows the repaired case meeting it in at least 10 consecutive runs at that level, with the same measured runs on main for comparison.
  • Automatic renewal, cancellation/release, exact maximum-cap expiry and valid proof-gated delivery are preserved in all modes; existing assertions are unchanged.
  • The work/test bounds and the offline local Git/fake-gh fixtures are unchanged.
  • Owned subprocess/output/scenario continuations remain joined on every outcome.
  • A mutation that restores the dominant operation's original cost brings the case back outside the stated margin at the stated level (restored-mutation receipt).

Verification

bun run test ./tests/integration-command.test.ts and the complete bun run test ./tests, preserving the leading ./. Load is imposed with owned busy-loop processes stopped by PID afterwards, never by pattern. Compare named mode/operation timings and cleanup evidence on matched source/runtime inputs.

Contract impact

None. Test fixture cost only; no production reservation policy changes.

Evidence so far

Bounded current-main control — 2026-10-29

On isolated main a8e80eea1ec045579ee7d69d6019bce5e78afa5e, Bun 1.4.4 (38afee6c8), with an independently copied frozen install and unchanged lock SHA-256 5bbd5f6651f111db3fcfabeda512d44a21163cba54c58993f8878012d548cc14:

GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false timeout --signal=TERM --kill-after=10s 120s bun run test ./tests/integration-command.test.ts

Exit 0; 5 pass / 0 fail / 335 assertions; 22.78 seconds. The named confirmation case passes in 11811.90 ms. The ordinary repository invocation wrapper, network preload and original assertions/deadlines remain in force. The command-scoped Git setting isolates synthetic commits from ambient signing; no global Git setting changed. The outer watchdog did not fire. The per-mode failing-invocation stall remains unattributed; this is neither a controlled host-load trigger nor historical Bun-1.4.2 equivalence. Retain needs: repro, original failed receipts and priority p2; no source repair, readiness or historical-cause claim follows.

Complete local log SHA-256: 6e545967f95de1cd6ecc5fa6c25a5bedeea780b24dc9217608190e1727c36b3a. No source was changed for this control.

Bounded current-main control — 2026-11-02

Main a84d9bfbcb4e608b504aa0a9feb1144ad9a0b77e, Bun 1.4.4 (38afee6c8), unchanged production/test source and frozen dependencies:

timeout --signal=TERM --kill-after=5s 90s env GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false bun run test ./tests/integration-command.test.ts -t 'confirmation executable'

Exit 0; one selected case passed, six filtered, 55 assertions. The real confirmation fixture completed in 7164.36 ms (7.18-second test process). Automatic renewal, cancellation/release and cap checks stayed intact. This is an isolated non-reproduction of the work-watchdog failure, not a controlled load schedule or a cause/repair. The ordinary invocation wrapper and offline preload remained enabled; the outer watchdog did not fire. No global Git, assertion, deadline or ownership guard changed. Preserve needs: repro, original failed evidence and p2; the missing next evidence is the correlated same-failure operation/owner/completion timeline already specified above.

Controlled reproduction under CPU oversubscription — 2026-11-03

At main 3d3516a02, Bun 1.4.2, offline frozen install in an isolated worktree, unchanged source, the ordinary wrapper and network preload, and the command-scoped signing override used by earlier controls:

timeout --signal=TERM --kill-after=5s 120s env GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=commit.gpgsign GIT_CONFIG_VALUE_0=false bun run test ./tests/integration-command.test.ts -t 'confirmation executable'

Load was imposed with owned busy-loop processes on a 32-CPU host; every one was stopped by PID afterwards.

Busy loops Runs Result Test-process time
0 3 3 pass 5.02–5.04 s
32 (1× oversubscription) 3 3 pass 20.88–21.89 s
96 (3×, load average about 95) 10 1 pass, 9 fail 26.84–28.48 s

Seven of the nine failures are the original receipt exactly: Integration fixture work deadline exceeded; owned cleanup joined inside the 30-second test cap, at 27,040–27,152 ms. The other two failed at 28,171 and 28,441 ms with Invocation anchor stopped before command startup (scripts/test-invocation-child.ts:37). That is the same watchdog firing before the invocation anchor reported startup. No dangling-process notice appeared.

What this establishes (observed): CPU contention alone reproduces the work-watchdog refusal, so the "reliably controlled trigger" that was missing now exists. The fixture's cost is strongly load-sensitive. Under 1× oversubscription it is already about 4× slower and keeps only about 22% margin against the 27-second watchdog. The original failure was likewise recorded "following severe local host pressure".

What it does not establish: which mode or awaited operation dominates the slowdown. The 4× slowdown at 1× oversubscription is more than a CPU-share explanation predicts. That is an inference to test, not attribution. Bare process start-up of bun and git grew only from about 3 ms to 14 ms under the same load, so start-up alone does not account for it.

Main CI recurrence check: in the window 2026-10-26 18:00 UTC to 2026-11-03 08:00 UTC, 116 runs, of which 97 were green; the failed-job logs of the other 19 contain no Integration fixture work deadline exceeded.

Triage 2026-11-03: folded the maintainer ruling (make the fixture cheaper: attribute under controlled load, then reduce cost to a stated margin at a stated oversubscription level; deadlines unchanged).

Activity

  1. added
    type: fix
    area: ci
    needs: repro
    on Oct 25, 2026
  2. added this to the 0.45.0 milestone on Oct 25, 2026
  3. added
    priority: p2
    on Oct 25, 2026
  4. schlessera commented on Oct 25, 2026

    @schlessera
    OwnerAuthor

    2026-10-25 triage at main dcd3b336dbade5e29e8a131eeeb5a0d9cffe60ff: Sorted this complete source-bound attribution report as wanted unscheduled p2 work. Retain needs: repro and all original failures, bounded controls, deadlines and ownership/authority assertions; passing reruns do not establish a cause or repair. Existing parent/standalone scope and release commitments are preserved.

  5. added
    needs: decision
    and removed
    needs: repro
    on Nov 3, 2026
  6. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Triage 2026-11-03 at main 3d3516a02: reproduced under controlled CPU load. In an isolated worktree with unchanged source, the confirmation case passed 3 of 3 runs unloaded (about 5 s) and 3 of 3 beside 32 busy loops on a 32-CPU host (about 21 s). Beside 96 busy loops it failed 9 of 10. Seven of those failures are the exact original Integration fixture work deadline exceeded receipt at about 27.1 s. The other two hit the same watchdog before the invocation anchor started. The commands and the full table are in the body.

    Labels: replaced needs: repro with needs: decision. The reproduction gap is closed. What remains is a scope choice, with deadlines unchanged either way:

    1. Reduce the fixture's cost after per-mode attribution.
    2. Record the measured oversubscription threshold as an environment limit and close.

    Recommendation: option 2, after a cheap attribution pass. The case keeps about 22% margin at 1× oversubscription, and main CI has not failed it since 2026-10-26.

  7. added
    agent-ready
    and removed
    needs: decision
    on Nov 3, 2026
  8. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-03): make the fixture cheaper. Attribute the dominant operation with per-mode timings under controlled load, then reduce its cost until the case keeps a stated margin at a stated oversubscription level. Deadlines unchanged. Closing as an environment limit is rejected.

    The body is now that specification. The PR states the target, which must be above 1× oversubscription (main fails 9 of 10 at 3×), and proves it with at least 10 consecutive runs at that level plus a restored-mutation receipt. Also corrected the test's citation to tests/integration-command.test.ts:189 at 3d3516a02. Replaced needs: decision; agent-ready.

  9. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-03): confirmed the bar as written: a stated margin at a stated oversubscription level above 1x, proven by at least 10 consecutive passing runs, with deadlines unchanged.

  10. self-assigned this
    on Nov 15, 2026
  11. schlessera commented on Nov 15, 2026

    @schlessera
    OwnerAuthor

    Claimed for implementation. Claim token: claim-d294bbd4. Branch: fix/2930-confirmation-fixture-cost.

  12. schlessera commented on Nov 15, 2026

    @schlessera
    OwnerAuthor

    Readiness review: the maintainer's cost-reduction ruling and acceptance criteria are complete; no parent epic or open implementation PR. The cited confirmation case remains present on fetched main. Claimed for scoped fixture cost attribution and reduction with deadlines and authority assertions unchanged. Pre-claim collision scan reports closure overlap (typecheck/unit) with #3056, #3059, #3116, #3437, #3581, #3622, #3806, #4002, #4018, #4022, #4035 and #4041; no direct path collision.

  13. schlessera commented on Nov 15, 2026

    @schlessera
    OwnerAuthor

    Implementation is in draft PR #4051. At 3× controlled CPU oversubscription the unchanged confirmation case passed ten consecutive runs, with a worst case of 23.062 seconds and 14.6% margin against the unchanged 27-second watchdog. Restoring the original fixture cost reproduced the watchdog failure at 27.064 seconds. All assertions and cleanup ownership remain unchanged. Local preflight passed (656 tests); the complete local root suite has environment-limited failures recorded and compared against main in the PR. Hosted draft feedback was requested at https://github.com/schlessera/brain-kit/actions/runs/43761505985. Handing back WAITING for that result; the claim is retained and the orchestrator owns confirmation and landing. No source follow-up issues filed.

  14. schlessera commented on Nov 16, 2026

    @schlessera
    OwnerAuthor

    Merged in #4051 as 5c9869caa through the integration lease (orchestrator merge queue for 0.45.0). Candidate confirmation passed on the exact head; the squash's own main run carries the post-merge heavy categories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: cipriority: p2type: fix

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions