Skip to content

fix(each): Defer a commit the leg deadline kills instead of failing it - #2967

Merged
krlmlr merged 1 commit into
mainfrom
claude/each-defer-deadline-kill
Oct 18, 2026
Merged

krlmlr merged 1 commit into
mainfrom
claude/each-defer-deadline-kill

Conversation

@krlmlr

@krlmlr krlmlr commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Port of duckdb/duckdb-r#2921 (head ea7a655f8, still open there).

A commit the leg's timeout kills (exit 124) after the leg has decided another commit only outran the time the others left, which says nothing about the commit. scripts/each-shard.sh now leaves it undecided, with no record, no index line and nothing published, so the next run builds it like a commit the deadline never let start. The leg's first commit had the whole budget, so its kill is still recorded as a failure, which scripts/series-check.sh calls REPAIR. Both scripts take the hunks of duckdb-r#2921 unchanged; they applied to main with offsets of one to three lines, and the rigraph layer of both files is the same diff against the new blobs as against the old.

rigraph's own text said every kill is a repair that a rerun only repeats. The repair reference (.claude/skills/series-loop/references/2-repair.md), the playbook's classification table in SKILL.md, and the legs paragraph of handbook/operations/ci/per-commit/ now say that a later commit's kill is deferred and retried, and that the first commit's stays a repair. No other leaf said a killed commit is recorded as a failure.

.series-source moves to duckdb-r's ea7a655f8 (dated 2026-10-16, checked today), with the new blobs for each-shard.sh (10ebf8e1) and series-check.sh (e03c9f9f). Every other blob it lists is unchanged between the old source commit and the new one, which I checked file by file.

scripts/each-shard-test.sh is new and pins both cases offline. It injects stubs for rcc-one.sh, rcc-decided.sh and rcc-publish.sh through EACH_SHARD_HERE, the directory the shard resolves its helpers from, and gh on PATH for the statuses. Two legs run side by side under DEADLINE_MINUTES=1, the shortest deadline the shard accepts, so the kill comes from the real timeout and the test takes about a minute. Leg one's first commit hangs and is recorded as a failure with exit code 124. Leg two decides a passing and a failing commit, then defers the hanging one: no record, nothing published, its status left pending. The test passes (20 checks), and fails 6 of them against main's each-shard.sh. scripts/series-args-test.sh still passes (84), shellcheck is clean on the touched scripts, and check-handbook.sh is clean.

Known limit: the planner cannot put a previously deferred commit first. A deferral leaves no record, and scripts/each-plan.sh reads the store and deliberately not the statuses, so it cannot tell a deferred commit from one that never started. Giving it that signal would take a new kind of store entry or a status read in the planner, plus a forced shard boundary in each-partition.py, which is more than this port should carry. The deferral is bounded as long as nothing below the commit is rewritten. A kill is deferred only after the leg has decided an older commit, the oldest undecided commit always heads shard 1, and a kill there is recorded. So a commit is deferred at most once for each undecided commit older than it, and in the usual case, where only its own leg's tail is left, once. A repair folded below it re-mints the commit and starts that count again.

#2968 is stacked on this one.

Prepared with Claude Code, an LLM coding agent.

  • By submitting this pull request, I assign the copyright of my contribution to The igraph development team.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JXnA76zWTu4ZD8BQCSYRpk

Port of duckdb/duckdb-r#2921 (ea7a655f8).
A commit the leg's `timeout` kills (exit 124) after the leg has decided another commit
outran the time the others left, which says nothing about the commit.
`scripts/each-shard.sh` now leaves it undecided, with no record,
so the next run builds it like a commit the deadline never let start.
The leg's first commit had the whole budget, so its kill is still recorded as a failure,
which `scripts/series-check.sh` calls REPAIR.
Both scripts take the hunks of #2921 unchanged, and `.series-source` moves to that commit with their new blobs.

rigraph's own text said every kill is a repair:
the repair reference and the playbook's table in the `series-loop` skill,
and the legs paragraph of `handbook/operations/ci/per-commit/`.
They now say a later commit's kill is deferred and retried, and the first commit's stays a repair.

`scripts/each-shard-test.sh` pins both cases offline.
It injects stubs for `rcc-one.sh` and the store through `EACH_SHARD_HERE`, and `gh` on `PATH`,
and runs two legs side by side under a one-minute deadline, the shortest the shard takes,
so the kill is real and the test runs for about a minute.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnA76zWTu4ZD8BQCSYRpk
@krlmlr
krlmlr added this pull request to stack #2972 October 17, 2026 06:05
@krlmlr
krlmlr merged commit d224506 into main Oct 18, 2026
9 checks passed
@krlmlr
krlmlr deleted the claude/each-defer-deadline-kill branch October 18, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants