Skip to content

shell e2e: focus_swept played as two scenarios, French and English, and no shard planned beyond 1000 s (#1413) - #1417

Merged
napkinstack-agent[bot] merged 8 commits into
mainfrom
issue-1413-work
Dec 1, 2026
Merged

napkinstack-agent[bot] merged 8 commits into
mainfrom
issue-1413-work

Conversation

@kitokey-sam

@kitokey-sam kitokey-sam Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Module

modules/shell, and only it: scripts/e2e_window.py (focus_swept), scripts/e2e_times.txt, and a new test tests/e2e_shards.rs.

  • This pull request touches a single module
  • ⚠️ Cross-module — the cross-module label is required, justification below

Deliverable

Out of cycle: #1413 (opened by nora), assigned by the coordinator on 2026-12-01, the first risk to every attest. focus_swept alone takes 1057 s, and the 1200 s timeout bounds a whole shard.

Closes #1413

What it changes

Before After
focus_swept is one scenario: the French sweep, then the English one, 1057 s two scenarios, focus_swept_fr (528.4 s) and focus_swept_en (530.0 s). The planner places them apart
e2e_times.txt measured on 2026-11-15: focus_swept counted at 691 s, 30 scenarios at the median measured again on 2026-11-30, from a full run at 56949ed (main d43ebc0), all 98 scenarios, in main()'s order
nothing says when a shard is planned too long tests/e2e_shards.rs plans the 3 window shards as e2e_sharded.sh does, and fails when one is planned beyond 1000 s

Planned shards, with the times of 2026-11-30:

Shards (seconds) Longest, against the 1200 s timeout
main before #1340, e2e_times.txt of 2026-11-15 1176 (14 scenarios), 844, 887 (measured) 98 %
times measured again, not split 1057 (focus_swept alone), 926, 924 88 %
times measured again, split (this change, at 5aeb4ca) 973, 973, 973 81 %: 227 s of margin, measured 2026-11-30 and 2026-12-01

Why the seam is the language. The sweep's outer loop already opened one Window per language, and the two shared nothing but their meetings' folder, now one per language: session() makes its folder only once. The sweep covers a single surface, Settings, so splitting it « by surface » does not apply.

Rejected: a budget per shard in proportion to its planned time. It does not shorten anything: focus_swept would still be 1057 s and growing, and so would the attest's longest shard. It only moves the limit further. The established convention is to split a long test across shards rather than raise its timeout: Bazel's shard_count, and pytest-split / pytest-xdist balancing by measured durations, as e2e_shards.py already does.

Next drift. The test fails as soon as e2e_times.txt, measured again, plans a shard beyond 1000 s. A scenario that is never measured stays counted at the median: the times must be measured again from a full run, which this change does once.

Oracle

Kind of oracle: a module test (the planner), and the window's e2e for each half.


Review budget

e2e_window.py +15/−4 lines; e2e_times.txt measured again, line by line (+98/−75); new test, 66 lines.

  • Within budget

Contracts

  • No contract affected

Definition of Done

  • cargo fmt --check, cargo clippy --all-targets -D warnings, node --check, ruff (pre-commit)
  • The attest
  • The test sheet run by a verifier

Test sheet

The verifier's section: shell is standard; the change is to its e2e and a module test. Written at opening (5aeb4ca); everything runs once, at the head that merges.

Verifier: session 5710853f-fbe0-414d-86bc-2e63e730dc15 (lina, kitokey-lina[bot])

# Given · when · then Kind Result Evidence Commit Confirmed
S1 Given the head, when the shell's tests run (cargo test --locked --no-fail-fast -- --nocapture), then all pass, tests/e2e_shards.rs, tests/e2e_only.rs and tests/e2e_played.rs among them, with no « NOT RUN » automated passed the attest's cargo at e48004a (attest-1417.cargo.txt): fmt, clippy -D warnings, then 75 suites, 619 passed, 0 failed; grep -c 'NOT RUN' 0; e2e_shards, e2e_only, e2e_played among them e48004a
S2 Given the head, when focus_swept_fr runs alone (partial), then it passes: BY's 72 checks in French, 0 FAIL, and its time is within 10 % of e2e_times.txt's automated passed i-lina-v1417-s-fr-e48004a: 75 ok, 0 FAIL; BY's 72 checks in French; 526.8 s against 528.4 s timed (−0.3 %) e48004a
S3 Given the head, when focus_swept_en runs alone (partial), then it passes: BY's 72 checks in English, 0 FAIL, and its time is within 10 % of e2e_times.txt's automated passed i-lina-v1417-s-en-e48004a: 75 ok, 0 FAIL; BY's 72 checks in English; 532.7 s against 530.0 s timed (+0.5 %) e48004a
S4 Given BY's checks in the last full run before the split (attest of #1340 at 704f21e: 144 « ok » lines, 1058.3 s), when they are compared with S2's and S3's, timings removed, then they are the same lines, in the same order: no check lost or added by the split explored passed the 144 « ok » lines of BY in attest-1340/…/e2e.txt (704f21e, focus_swept: 1058.3 s), timings removed, diff against S2's 72 then S3's 72: identical, same order e48004a
S5 Given mutants of the verifier's own (M1: focus_swept_fr counted at 691 s; M2: main() calling focus_swept whole again, as main's e2e_window.py, with the head's times; M3: the times of 2026-11-27 (13a8917), focus_swept at 691 s, at the head), when cargo test --test e2e_shards runs, then each fails automated passed cargo test --test e2e_shards (own CARGO_TARGET_DIR) with each mutant, the tree restored between: M1 FAILED « a shard planned for 1032 s, beyond 1000 s: …,focus_swept_fr,… »; M2 FAILED « e2e_times.txt times scenarios main() does not call: ["focus_swept_en", "focus_swept_fr"] »; M3 FAILED « … ["focus_swept"] ». The head unmutated: e2e_shards 1 passed, e2e_only 2 passed, e2e_played 1 passed. 3 of 3 killed e48004a
S6 Given the head, when the attest's full e2e runs in its 3 window shards, then each shard's measured time is under 1200 s, and the longest is reported against the planned 973 s automated passed the attest's full e2e at e48004a (evidence/1417/e2e.txt, « e2e: passed », 0 FAIL): window shards 2, 3, 4 hold 32, 32, 37 scenarios, their « (name: s) » lines summing to 960.6, 966.3 and 952.7 s; the whole run, shards side by side, 992 s (before: ~1190 s). Longest 966.3 s against 977/977/978 s planned, 234 s under 1200 s; focus_swept_fr 524.1 s in shard 3, focus_swept_en 529.9 s in shard 2 e48004a
  • Oracle, seen failing (not a row): on main 2735caa's e2e_window.py and e2e_times.txt, tests/e2e_shards.rs as at 5aeb4ca FAILED « a shard planned for 1062 s, beyond 1000 s: focus_swept »; the head's test FAILED there earlier, « focus_swept is played as focus_swept_fr and focus_swept_en ». Green at e48004a (S5).
  • At opening, by the planner alone (python3 -I e2e_shards.py lists 3, summed as the test does): the head 973/973/973; M1 1028 (killed); M2 624/624/625 (survives); M3 542/542/543 (survives). M2 and M3 leave names in e2e_times.txt that main() no longer calls, and the scenario they drop is counted at the median (11.5 s). Review comment to the author (issuecomment-7296091393); sam added the check at d270e1c (every name timed is one main() calls, and no focus_swept), his local runs: M2 and M3 FAILED, the head 1 passed. S5 confirms the three at the merge head.

🤖 Generated with Claude Code

kitokey-sam Bot and others added 6 commits December 1, 2026 00:05
Agent-Session: 7368a2a3-2f44-4202-9dcb-56104a1d9256
… red, focus_swept alone 1057 s (#1413)

e2e_times.txt measured again from a full run on 2026-11-30 (56949ed, main d43ebc0), every one of the
98 scenarios main() calls, in its order: focus_swept was counted 691.3 s, and 30 at the median.
tests/e2e_shards.rs plans the 3 window shards as e2e_sharded.sh does and holds each at 1000 s at most,
e2e.sh's 1200 s less a margin. Red here: focus_swept alone is planned 1057 s.

Agent-Session: 7368a2a3-2f44-4202-9dcb-56104a1d9256
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ach placed apart by the shards (#1413)

The sweep's outer loop was already one Window per language, nothing shared between them but the
meetings' folder, now one per language (session() makes its folder once). Each half is counted at
half the measured 1056.7 s until a run measures it. Green: the shards planned 968, 969 and 969 s.

Agent-Session: 7368a2a3-2f44-4202-9dcb-56104a1d9256
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1413)

cargo fmt and clippy, as the module's check asks.

Agent-Session: 7368a2a3-2f44-4202-9dcb-56104a1d9256
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 530.0 s (#1413)

Partials i-s1413-byfr-7eec042 and i-s1413-byen-7eec042: each passed, 75 ok, 0 FAIL.

Agent-Session: 7368a2a3-2f44-4202-9dcb-56104a1d9256
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t as measured here

#1340's focus_swept 1062.5 replaced by its two halves, measured. formats_redone, new in main, counted at the median until a run measures it.

Agent-Session: 7368a2a3-2f44-4202-9dcb-56104a1d9256
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent napkinstack-agent Bot added the out-of-cycle Work outside the current cycle: an incident, a production defect; justified in the PR label Dec 1, 2026
@kitokey-lina

kitokey-lina Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Verifier (lina, session 5710853f), at opening, head 5aeb4ca: the sheet is in the description; everything runs at the merge turn.

A gap in the oracle, two survivors. Planned by e2e_shards.py lists 3 and summed as tests/e2e_shards.rs sums:

State Shards planned (s) The test
main (da935c7) with the new test 1062, 802, 803 red ✔
head 973, 973, 973 green
M1 — focus_swept_fr 691 1028, 1027, 1028 red ✔ killed
M2 — main() calling focus_swept whole again (main's e2e_window.py), the head's times 624, 624, 625 green: survives
M3 — the times of 13a8917 (focus_swept 691) at the head 542, 542, 543 green: survives

In M2 and M3, e2e_times.txt names scenarios main() no longer calls (focus_swept_fr/_en, or focus_swept), and the scenario actually played is counted at the median, 11.5 s, while it takes ~1058 s. The PR's « Next drift » names the unmeasured case; the stale one is cheaper to catch: the planner already knows main()'s list.

Smallest check that kills both, proposed: in e2e_shards.rs, every name of e2e_times.txt is one main() calls (from the shards' own output, already read), the message naming the stale ones. A new scenario stays at the median as today (formats_redone), so nothing else changes.

Your call whether to add it here; if not, M2 and M3 go in the sheet as a gap, with an issue.

kitokey-sam Bot and others added 2 commits December 1, 2026 01:15
… not call, focus_swept above all (#1413)

lina's two survivors (#1417): main() calling focus_swept whole with the halves timed, or the old times
with focus_swept at the head — the scenario played counted at the median, 11.5 s, for ~1058 s. Every
name of e2e_times.txt is now one the shards hold, and focus_swept is no longer timed (the coordinator,
2026-12-01). Both survivors fail, naming the stale names; the head passes.

Agent-Session: 7368a2a3-2f44-4202-9dcb-56104a1d9256
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No conflict. channel_added_from_page, new in main, counted at the median until a run measures it.

Agent-Session: 7368a2a3-2f44-4202-9dcb-56104a1d9256
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kitokey-lina

kitokey-lina Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Verifier's review (lina, session 5710853f-fbe0-414d-86bc-2e63e730dc15), at e48004a (d270e1c + main 2735caa).

Read, the whole diff against main: scripts/e2e_window.py (focus_swept taking its languages, focus_swept_fr/_en called by main() in its place, each half with its own meetings' folder); scripts/e2e_times.txt measured again (all 98 lines of 2026-11-30, then the two halves); tests/e2e_shards.rs (the planner run as e2e_sharded.sh runs it, each shard summed with the median for what is not measured, ≤ 1000 s; since d270e1c, no timed name main() does not call, and no focus_swept). The planner itself (e2e_shards.py, unchanged) computes the same median (statistics.median).

Found: at opening, two survivors (M2, M3: a stale name in e2e_times.txt left the scenario played at the median); sam added the check at d270e1c, and both now fail. Nothing else. A remark, not a defect: each half prints BY's sentence « in both languages »; harmless, the shard merge reads the timing line, not that one.

Sheet: S1–S6 passed at e48004a, in the description: the attest's cargo 619 passed, 0 NOT RUN; the halves 524.1 s and 529.9 s in the full, its longest window shard 966.3 s of scenarios, the run 992 s side by side; coverage unchanged, 144 = 72 + 72, line for line; oracle red on main, 3 of 3 mutants killed.

Verifier: session 5710853f-fbe0-414d-86bc-2e63e730dc15 — signed, approved at e48004a.

@kitokey-lina kitokey-lina Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at e48004a by the verifier, lina (session 5710853f-fbe0-414d-86bc-2e63e730dc15), expert in design systems, accessibility and test verification: sheet S1–S6 passed, review in the comment above.

@napkinstack-agent
napkinstack-agent Bot merged commit 9713975 into main Dec 1, 2026
19 of 21 checks passed
@napkinstack-agent
napkinstack-agent Bot deleted the issue-1413-work branch December 1, 2026 02:32
kitokey-ines Bot added a commit that referenced this pull request Dec 1, 2026
Agent-Session: d68d8ea4-0375-44c6-98e5-667929031835
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

out-of-cycle Work outside the current cycle: an incident, a production defect; justified in the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

focus_swept at 88 % of a shard's budget (1062 s / 1200 s): split it or bound it

0 participants