You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ci-behavior-shards.md
+31-15Lines changed: 31 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,36 +10,40 @@ The source run is [GitHub Actions run 30648119449](https://github.com/ruby-dlee/
10
10
11
11
`tests/behavior-test-durations.tsv` records the per-script measurements derived from that run.
12
12
13
-
The runner contract test added with the sharding implementation is included with a conservative two-second initial estimate, so the completeness guard covers it immediately.
13
+
The runner contract test added with the sharding implementation and the newly landed `tests/lavish.test.sh` are included, so the completeness guard covers both immediately.
14
14
15
15
## Assignment
16
16
17
17
The planner uses deterministic longest-processing-time assignment.
18
18
19
19
It sorts by descending recorded duration, uses the test path as the stable secondary key, assigns the next test to the currently lightest shard, and breaks load ties by the lowest shard number.
20
20
21
-
The six-shard checked-in plan has these estimated serial loads.
21
+
The eight-shard checked-in plan has these estimated serial loads.
22
22
23
23
| Shard | Tests | Estimated load |
24
24
|---:|---:|---:|
25
-
| 1 | 1 | 673400 ms (11m13s) |
26
-
| 2 | 1 | 620746 ms (10m21s) |
27
-
| 3 | 1 | 563637 ms (9m24s) |
28
-
| 4 | 22 | 528938 ms (8m49s) |
29
-
| 5 | 28 | 528929 ms (8m49s) |
30
-
| 6 | 28 | 528933 ms (8m49s) |
25
+
| 1 | 1 | 563637 ms (9m24s) |
26
+
| 2 | 1 | 475500 ms (7m56s) |
27
+
| 3 | 13 | 401927 ms (6m42s) |
28
+
| 4 | 13 | 401942 ms (6m42s) |
29
+
| 5 | 13 | 401927 ms (6m42s) |
30
+
| 6 | 10 | 401979 ms (6m42s) |
31
+
| 7 | 16 | 401935 ms (6m42s) |
32
+
| 8 | 17 | 401936 ms (6m42s) |
31
33
32
-
The expected healthy critical path is therefore about 11 minutes rather than 57 minutes.
34
+
The expected healthy behavior-execution critical path is 9 minutes 24 seconds rather than 57 minutes 23 seconds.
33
35
34
-
The largest single test file, `tests/fm-account-routing.test.sh`, sets the remaining floor.
36
+
The account-routing and report-stack suites keep their original test functions and assertions in shared suite files, while two runner wrappers partition each call list deterministically between isolated runners.
37
+
38
+
The largest remaining indivisible test file, `tests/fm-teardown.test.sh`, sets the 9-minute-24-second floor.
35
39
36
40
## Coverage guard
37
41
38
-
`bin/fm-behavior-shards.sh --check 6` fails when the duration inventory has a missing path, duplicate path, malformed duration, or any difference from the complete `tests/*.test.sh` inventory.
42
+
`bin/fm-behavior-shards.sh --check 8` fails when the duration inventory has a missing path, duplicate path, malformed duration, or any difference from the complete `tests/*.test.sh` inventory.
39
43
40
44
Every matrix runner writes an executed manifest while continuing through all assigned scripts and preserving each exit code.
41
45
42
-
The final `Behavior tests` job downloads all six manifests and runs `bin/fm-behavior-shards.sh --verify 6 <manifest-dir>`.
46
+
The final `Behavior tests` job downloads all eight manifests and runs `bin/fm-behavior-shards.sh --verify 8 <manifest-dir>`.
43
47
44
48
Verification fails for a missing shard, missing test, duplicate test, wrong shard assignment, malformed row, or recorded test failure.
45
49
@@ -55,17 +59,29 @@ The workflow also assigns each shard private mode-0700 `TMPDIR` and `TMUX_TMPDIR
55
59
56
60
Scripts remain serial within a shard, so no existing test needed weaker assertions, a mock conversion, a skip, a retry, or an added sleep.
57
61
58
-
Each matrix job is named `Behavior tests (shard N/6)`, and the runner emits explicit begin and end markers containing the test path and exit code.
62
+
Each matrix job is named `Behavior tests (shard N/8)`, and the runner emits explicit begin and end markers containing the test path and exit code.
63
+
64
+
The 15-minute per-shard timeout leaves bounded margin above the 9m24s slowest planned shard while replacing the prior 90-minute blanket.
65
+
66
+
## Teardown child-endpoint investigation
67
+
68
+
GitHub Actions run 30649486198 failed at 17:52:54 UTC after `test_forced_secondmate_child_uses_child_home_for_endpoint_verification` correctly retained the Agent Fleet lease, child metadata, and child worktree but its final message assertion expected the endpoint state to be `unknown`.
69
+
70
+
The Zellij fixture returns a live session, pane, and tab from the child firstmate home, so endpoint discovery deterministically classifies it as `present` before destructive cleanup and emits `managed endpoint ... is still alive`.
71
+
72
+
The failure was therefore an assertion-ordering mismatch introduced when the fixture became capable of proving presence, not a delayed endpoint shutdown.
73
+
74
+
Commit `d7db2dcb010cc48f4ca6d34b4386d934e6c9cdde` fixes the assertion to match the proven state while retaining the refusal and all three containment checks.
59
75
60
-
The 15-minute per-shard timeout leaves bounded margin above the measured 11m13s slowest shard while replacing the prior 90-minute blanket.
76
+
GitHub Actions run 30657355610 executed the corrected sequence at 19:51:41 UTC and passed the full behavior job without a retry or added sleep.
61
77
62
78
## Refreshing timings
63
79
64
80
Run the complete suite serially in the target environment and atomically replace the duration data only if every test passes.
0 commit comments