Skip to content

Name the test tiers for when they run, and give the schedule its own slot - #2443

Merged
max-sixty merged 2 commits into
mainfrom
agent-a8255009de498307c
Oct 12, 2026
Merged

max-sixty merged 2 commits into
mainfrom
agent-a8255009de498307c

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

The suite's nightly mark meant "a pull request can land without it", yet those tests ran on every push to main. This renames that tier main, adds a real nightly tier that only the daily run reaches, and gives the daily run a concurrency slot of its own so it stops being replaced before it starts.

Three tiers, named for when they run

TIERS in tests/conftest.py owns the selection:

Tier Runs on Flag
unmarked every run, both landing gates and broad discovery included (none)
main (formerly nightly, same meaning) each push to main --run-main
nightly only the daily schedule and a manual dispatch --run-nightly (every tier)

A test with both marks, such as a nightly test in a main module, belongs to the later tier. --changed-since REF (formerly --nightly-changed-since) adds the marked tests of either tier whose own lines a change edits; a pull request and wt merge's pre-merge both pass it.

The ci test job's selection per event:

  • pull request: --changed-since HEAD^1, so unmarked tests plus the main and nightly tests it edits;
  • push to main: --run-main, so unmarked plus main;
  • schedule and dispatch: --run-nightly, so every test.

Collected locally on this branch (of 6,030): broad discovery 3,070, --run-main 5,976, --run-nightly 6,030, and --changed-since origin/main 3,131. This PR edits the two sweeps' decorators, so its own CI runs them.

tests/AGENTS.md ("Run what the change needs") describes the tiers once and says when a test belongs in each. developing-leaf, running-tend, pyproject.toml's marker list and .config/wt.toml now use the new names.

The scheduled run gets its own slot

Since #751 the schedule shared the push queue (ci-nightly-automatic), so the next merge replaced it while it waited for a runner. The scheduled runs of Oct 9, 10 and 11 all ended cancelled without ever getting a runner (runner_id 0). The job's concurrency group is now ci-test-<event>, with pr-<n> for a pull request and dispatch-<ref> for a dispatch, so pushes keep their one-at-a-time queue and the schedule queues alone. tend-ci-fix still triggers on failed or cancelled ci runs on main, and a scheduled run reports on main, so a red nightly run still reaches it.

Corpus sweeps move to nightly

test_page_fixture_renders and test_a_still_page_comes_back_from_every_journey_as_it_was in tests/test_render_gate.py each sweep the whole example corpus (27 cases each). Together they take about 47 worker-minutes, 8% of a complete run. A push to main no longer runs them; the daily run does.

This was written by Claude Code on behalf of max-sixty

…slot

The suite now has three tiers, each named for when CI runs it (`TIERS` in
tests/conftest.py):

- unmarked: every run, both landing gates and broad discovery included;
- `main` (formerly `nightly`): each push to main; a pull request can land
  without it;
- `nightly`: only the daily scheduled run and a manual dispatch.

The old `nightly` mark meant "a pull request can land without it" and ran on
every push to main, so it is renamed `main` with the same meaning. A test
carrying both marks, such as a `nightly` test in a `main` module, is in the
later tier. The flags follow the events that use them: `--run-main` for a push,
`--run-nightly` (every tier) for the schedule and a dispatch, and
`--changed-since REF` (formerly `--nightly-changed-since`), which adds the
marked tests of either tier whose own lines a change edits, for a pull request
and `wt merge`.

The two corpus sweeps in test_render_gate.py, `test_page_fixture_renders` and
`test_a_still_page_comes_back_from_every_journey_as_it_was`, move to
`nightly`: about 47 worker-minutes, 8% of a complete run, that a push to main
no longer pays.

The scheduled run gets a concurrency slot of its own. Since #751 it shared the
push queue, so the next merge replaced it before it reached a runner: the
scheduled runs of Oct 9, 10 and 11 all ended cancelled with no runner. Pushes
keep their one-at-a-time queue. tend-ci-fix still hears a red or cancelled
scheduled run, which reports on main.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 805301c into main Oct 12, 2026
2 checks passed
@max-sixty
max-sixty deleted the agent-a8255009de498307c branch October 12, 2026 00:19
max-sixty added a commit that referenced this pull request Oct 12, 2026
Corrects a false reason in `ci.yaml`'s workflow-level concurrency
comment. It said a push to main keeps its run partly because "a
cancellation reaches tend-ci-fix as something to fix". `tend-ci-fix`
runs only when `workflow_run.conclusion == 'failure'`, and tend's ci-fix
template has no option to widen that, so a cancelled run is never
answered. The comment now says a cancellation goes unreported. #2443's
description repeated the same claim.

## Issue #74: scheduled `ci` runs cancelled

Investigated; the cause was already fixed by #2443 (merged 2026-10-12
00:19 UTC):

- Between #751 and #2443, 10 of the 25 daily scheduled runs ended
cancelled with no runner (`runner_name` empty): Sep 18, 27, 29 and Oct
2, 3, 5, 6, 9, 10, 11. The scheduled job shared the push queue's
concurrency group, and under `queue: single` the next merge replaced the
pending scheduled entry. Because `tend-ci-fix` ignores cancelled runs,
none of these reached anyone.
- #2443 gave the schedule a group of its own (`ci-test-schedule`). The
first scheduled run since then,
[38239628776](https://github.com/max-sixty/leaf/actions/runs/38239628776),
got a runner 4 seconds after it was created.
- The account-wide pool is not the cause: when the scheduled runs did
reach a runner (Oct 1, 4, 7 and 8), they waited between 18 minutes and
2¼ hours and then ran for 2 to 3 hours. That is well inside the 6-hour
job limit.

Behaviour changed: none. The change is to a comment only.
Hand-written source line delta: +4 −3 (YAML comment). Test line delta:
0.

> _This was written by Claude Code on behalf of max-sixty_

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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