Repository navigation
Commit 492598e
test(lint): compute the SYSTEM_FIELDS live census once per file, under its own hook timeout (#19813)
Fixes #19807
Clause-②: no
## What is red and why
The hourly full run on `main` (run 35829772446, `Test Core (2/6)` on
`de4ed33f`) failed on exactly one test:
`packages/lint/src/system-fields-consumers.test.ts:586` (the #8999
SYSTEM_FIELDS consumer census, 「the live population › is anchored to a
real export…」) — `Error: Test timed out in 5000ms`. The shard then
stopped and six scheduled packages never ran. The same failure, same
shard, same test, is the only red in the last 100 hourly runs (09-21
04:01Z, 09-21 16:00Z, 09-23 07:03Z); no commit between the last green
run (`fae870352`) and the red head touches `packages/lint/**`, and the
file is green on PR shards, where `@objectstack/lint` runs with few
neighbours.
Cause, read from the file: `liveSources()` reads every `.ts` under
`packages/lint/src` (201 files) and `censusUnionConsumers` parses each
with the TypeScript compiler (`setParentNodes: true`); the six live
tests each recomputed that whole census under vitest's default 5,000 ms
per-test wall, and the cold run crossed it on a loaded full-battery
shard (13 packages, `--concurrency=4` on 4 vCPUs).
## What changed
One file, test-only: the live census is computed ONCE per file in a
`beforeAll` that carries its own explicit timeout (60,000 ms, sized from
the measured cold run of ~1 s on a quiet box with headroom for a
contended shard), and the six live tests read that one result.
`censusUnionConsumers`, `liveSources()`, the LEDGER rows, the
PROVENANCE_API pin and every assertion are unchanged; no walk is
narrowed, no test skipped, no file-wide or package-wide `testTimeout`
raised.
## Verification
- Branch pushed by the dispatched dev
(`session_01XPUwWGnmky4PXPofNsf2w7`); its report with the measured
before/after durations follows on #19807.
- CI on this head is the judge: `Test Core` shards (the
`@objectstack/lint` package suite), `Lint & Repo Gates`, type checks.
- Not governed (`packages/lint/src/**` is on no register surface);
ordinary queue landing after the dispatching seat's ACCEPT.
Related, not changed here: #16465 / #16468 (shard-duration alarm and
per-package suite-duration ratchet, `pm:queue` in `domain:devx`), and
ten other test files that walk directories or parse with the TypeScript
compiler under the default wall (cli ×5, spec ×4, service-analytics ×1)
— none has gone red; the same one-computation shape applies if one does.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_0129ZpnaBcYZZ51rCvQiXg6C
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0e06f3b commit 492598e
1 file changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
523 | 523 | | |
524 | 524 | | |
525 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
526 | 539 | | |
527 | 540 | | |
528 | 541 | | |
| |||
585 | 598 | | |
586 | 599 | | |
587 | 600 | | |
588 | | - | |
| 601 | + | |
589 | 602 | | |
590 | 603 | | |
591 | 604 | | |
592 | 605 | | |
593 | 606 | | |
594 | 607 | | |
595 | | - | |
| 608 | + | |
596 | 609 | | |
597 | 610 | | |
598 | 611 | | |
| |||
607 | 620 | | |
608 | 621 | | |
609 | 622 | | |
610 | | - | |
| 623 | + | |
611 | 624 | | |
612 | 625 | | |
613 | 626 | | |
| |||
624 | 637 | | |
625 | 638 | | |
626 | 639 | | |
627 | | - | |
| 640 | + | |
628 | 641 | | |
629 | 642 | | |
630 | 643 | | |
631 | 644 | | |
632 | 645 | | |
633 | 646 | | |
634 | | - | |
| 647 | + | |
635 | 648 | | |
636 | 649 | | |
637 | 650 | | |
| |||
650 | 663 | | |
651 | 664 | | |
652 | 665 | | |
653 | | - | |
| 666 | + | |
654 | 667 | | |
655 | 668 | | |
656 | 669 | | |
| |||
0 commit comments