Skip to content

fix(ci): fail closed on missing lint prerequisites and real native-build timeouts #4554

Closed

Description

@zackees

Context

The PR #4552 Linux unit job (run attempt 1, commit 636b0e4) was green in 6m29s although two checks could not run:

  • ./install printed Setup failed: [Errno 2] No such file or directory: .../.cache/js-tools, then downgraded it to Warning: JavaScript linter setup failed and exited successfully. In ci/setup-js-linting-fast.py, TOOLS_DIR.mkdir(exist_ok=True) does not create the missing .cache parent; install catches the nonzero exit and continues. This is a reproducible fresh-checkout path, not a build timeout.
  • bash lint --cpp printed Skipping combined AST ratchet — error: Failed to spawn: clang-tool-chain-query, but ci/lint_cpp/run_all_checkers.py converts the missing tool into empty results, so the CI check stays green without running that ratchet.

The same job logged [BUILD] WARNING: No output for 64s - dumping stacks. That warning is emitted by ci/meson/compile.py only after another line arrives; it is not itself a timeout. The first native smoke target completed its build in 287.64s, below the nominal 600s compile timeout. The next smoke targets took about 5s and 2s because the loop reuses the same Meson build tree within the same job. There was no logged build retry or prior failed attempt. Actions restored uv and Rust-linter caches, not C++ build artifacts; zccache reported 0/35 hits for the first target. Thus the hypothesis that a timed-out first attempt succeeded on later attempts because of restored native artifacts is not supported by this run.

There is still a timeout-enforcement risk worth testing: compile_meson() gives RunningProcess a 600s timeout but drains proc.line_iter(timeout=None) before calling proc.wait(). A permanently silent child may block in the iterator and never reach the timed wait. Confirm this with a bounded reproduction rather than assuming the 600s setting is effective.

Proposal

  1. Fix fresh-checkout JS bootstrap (mkdir(parents=True, exist_ok=True)) and make a failed setup fatal in CI when that prerequisite is requested. If JavaScript lint setup is intentionally unnecessary in the native unit job, skip it explicitly there and run the actual JS lint in a named required check; do not print a setup failure while leaving a green check.
  2. Provision clang-tool-chain-query for the CI C++ lint path and fail the CI check when its required AST ratchet cannot start. Preserve an intentional local optional mode only if it is visibly distinguished from CI's required mode.
  3. Give native compilation an enforced wall-clock deadline and actionable diagnostics for a genuinely hung child. Keep the 60s no-output event diagnostic-only: cold PCH/compilation can legitimately be silent for more than a minute. Ensure a real timeout cannot be turned green by a retry or a later incremental smoke target.

Acceptance criteria (RED → GREEN)

  • RED: On a fresh checkout without .cache/, JS setup reproduces the missing-parent failure. A forced JS setup failure and a missing clang-tool-chain-query reproduce the current green/skipped CI behavior. A short synthetic stalled build demonstrates whether the configured deadline is enforced.
  • GREEN: Fresh JS setup succeeds; deliberate setup failure or absent required AST tool makes the appropriate required CI check red with a clear diagnostic. The AST ratchet demonstrably runs in the normal CI path.
  • GREEN: A hung native compile terminates within its configured deadline, fails the job, and reports the child/process tree; a slow but progressing cold compile remains allowed. Sequential smoke targets cannot hide an earlier failure.
  • GREEN: Exercise these cases with focused regression tests and a hosted Linux job, recording the failing-before/passing-after signal rather than relying on cached artifacts or a rerun alone.

Decisions

  • Treat skipped required tooling and an unenforced true timeout as failures; do not fail merely because a healthy cold build has a 60s output gap.
  • Keep this separate from linker performance work: the linked run was slow on its first smoke target but did not time out, and it provides no evidence of a native artifact-cache rescue.

Activity

  1. zackees commented on Sep 24, 2026

    @zackees
    MemberAuthor

    Follow-up on the no-output policy: the 60-second warning plus full Python/process-tree stack dump is too eager. In the linked successful cold debug-thin build, the diagnostic fired after a 64s gap; the first smoke target then finished in 287.64s. This is not a build error and should not turn red merely because compilation is quiet for a minute.

    Recommended change to this issue's proposal:

    • Raise the first quiet-output diagnostic to 5 minutes. Make it a concise, rate-limited warning with elapsed time, last build milestone, and child process status; do not dump all stacks at that threshold.
    • Reserve a stack/process-tree dump for 10 minutes of sustained silence, or just before a separately configured hard deadline. Emit it while the process is still silent, not only when another line arrives (the current line_iter(timeout=None) loop checks the gap only after output resumes).
    • Calibrate the actual hard deadline against the cold full-debug/ASan suite before enforcing it. The historical perf(ci): investigate 20-minute Linux unit job, cold_skip misses, and example runtime #4529 Linux full unit compilation took 1130.84s overall, so blindly turning the current nominal 600s RunningProcess timeout into an absolute full-build cap would break legitimate runs. A real timeout should still fail the job; a 60s gap should not.
    • RED → GREEN: reproduce a healthy cold build with >60s output gap and show no stack dump; use a short-threshold test fixture for sustained silence to show one rate-limited warning, then one dump, then a nonzero deadline failure. Verify that later incremental smoke targets cannot erase that failure.

    The cache hypothesis remains unproven for this job: it was run attempt 1, no native build retry occurred, and the quick subsequent smoke targets reused the same in-job Meson tree rather than restored C++ artifacts.

  2. moved this from Triage to Done in FastLED Trackeron Sep 24, 2026
  3. added a commit that references this issue on Sep 24, 2026
    26c6046
  4. added a commit that references this issue on Sep 24, 2026
    a495d95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions