Skip to content

chore(ci): retain job creation and report runner-slot wait - #4052

Merged
schlessera merged 2 commits into
mainfrom
chore/2952-runner-slot-wait
Nov 16, 2026
Merged

schlessera merged 2 commits into
mainfrom
chore/2952-runner-slot-wait

Conversation

@schlessera

@schlessera schlessera commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Closes #2952

What changed

Retains job creation timestamps in new v2 run snapshots and reports creation-to-observed-start runner-slot wait overall and by workflow, category and event. JSON and Markdown show median, p90, max, known and unknown sample counts, and the numerator/denominator/percentage waiting strictly over five minutes. Legacy v1 snapshots remain readable and missing timestamps remain unknown.

Why this shape

Follows #2948 and the CI evidence decision. This is measurement only: creation-to-start can include dependency/dispatch delay and does not diagnose runner capacity. PR draft/ready cohorts require retained planner cadence; missing historical context stays pull_request_unknown. No runner, shard, concurrency, proof or merge policy changes.

New run schema: v2, jobs[].createdAt (nullable API created_at; optional on legacy inputs). New summary schema: v2, runnerSlotWait.{overall,byWorkflow,byCategory,byEvent}. Each aggregate has n, mean, median, p90, max, unknown, overFiveMinutes.{numerator,denominator,percent}. Other archive kinds retain their versions. Readers/seed accept run v1/v2 and refuse unsupported versions. Completed cached legacy attempts are not refetched solely to populate this metric.

Inventory coordination: #4045 is still open at implementation time. Its inventory should update the run and summary schema rows to v2 and map runner-slot wait to the fields above; legacy R v1 remains supported. This PR documents the new fields in the throughput guide without taking over that inventory branch.

Proof

  • Failing first: bun run test tests/ci-timings.test.ts on the original implementation failed runner-slot wait preserves creation time and legacy unknowns at expected schema 2 / received 1, and refused the v2 cohort fixture. Dependency installation first resolved a missing local TypeScript package; that module-load failure is not the receipt.

  • Restored implementation: both timing suites passed, 29 tests / 204 assertions. Includes the 210-second API fixture, native report JSON/Markdown, legacy unknown exclusion, strict >300-second boundary, real zero, queued cancellations, draft/ready/main/dispatch cohorts, overlapping enrichment and v2 seed import alongside v1 records.

  • Mutation: replacing missing creation-time intervals with zero failed the named legacy test: unknown changed from 1 to 0 and the known denominator changed from 1 to 2. Mutation restored; both suites passed afterward.

  • The jobs API was checked directly and returned created_at, started_at, completed_at; no extra API request is introduced by collection.

  • Local zip was initially absent; supplying the executable resolved seed fixture setup. No test/harness changes were made to bypass it.

  • bun run check:pr --base origin/main passed all selected checks (1,208 affected fast tests) at head a7fe275b3560811786dfb79b3f29e64b290a8522, base a9bcdbd6734c1733390570e2a68c10afde3b00a9.

{"version":1,"kind":"brain-check-pr-receipt","head":"eab9b15037d2bd8be190fc7a94f98a3d490af648","base":"origin/main","mode":"focused","startedAt":"2026-11-16T06:33:13.519Z","finishedAt":"2026-11-16T06:34:41.057Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12819.186860999998},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":143.94868199999837},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":114.78280900000027},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":19.716754000000947},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":74424.069815}]}

Collision scan at head a7fe275b3560811786dfb79b3f29e64b290a8522: bun scripts/collisions.ts --json --pr 4052 built the graph and reported 23 closure collisions, with no path/textual/unknown reports. These are shared verification closures with #3054, #3056, #3059, #3069, #3437, #3581, #3622, #3806, #4002, #4018, #4024, #4028, #4034, #4035, #4036, #4037, #4038, #4040, #4041, #4042, #4045, #4046 and #4050. The earlier cited-path scan also reported a documentation path overlap with #4045 in docs/process/ci-throughput.md; #4045 remains open and the schema coordination note above applies. This does not transfer ownership of another branch.

Checklist

  • Focused behavioral and mutation proof recorded; orchestrator owns hosted candidate confirmation.
  • Acceptance criteria met.
  • PR and issue milestone 0.45.0 read back after creation.
  • No shipped package behavior changed; no changeset required.
  • No product CLI/MCP/frontmatter contract changed.
  • Throughput and timing documentation updated.
  • No provider-turn path changed.
  • Existing version refusal remains scoped to the measurement input; unsupported data is not promoted to a supported schema. No host/turn security guard changed.

Anything left open

Hosted confirmation and landing belong to the orchestrator. Existing archive/report tasks #2955/#2956 remain separate; no follow-up issues filed. PR draft/ready history without retained context remains explicitly unknown. Initial full typecheck exhausted Node's default heap; NODE_OPTIONS=--max-old-space-size=8192 bunx tsc --noEmit passed. bun run build also passed.

@schlessera
schlessera marked this pull request as ready for review November 16, 2026 06:36
@schlessera
schlessera merged commit 017af32 into main Nov 16, 2026
52 of 54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, the gates they run, release scripts, packaging. type: chore Tooling, CI, release plumbing, dependencies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: keep job creation time and report runner-slot wait

1 participant