Commit Graph

7 Commits

Author SHA1 Message Date
diegosouzapw
56b92d0226 fix(ci): omni-queue hang evidence is scoped and counted from every run
A hang signature recorded on a base check now matches only a hang of
the candidate on the same check: a base that times out a job never
excuses an ordinary keyless failure of that job (base-red pause before,
pr-red now).

The hang path requires every run of the candidate to have been only job
timeouts. The in-flight retry carries timedOutRuns while that holds;
validateState accepts it as a count, and a document written without it
keeps the old behaviour (pause with reason infra). The hang-suspected
detail and the culprit comment state the real number of timed-out runs.

The culprit comment says the base passes the job only on a green base
verdict, and says nothing about the base without a verdict. The fake
classifier follows the real precedence for timeout and hang verdicts.
2026-11-15 05:35:58 -03:00
diegosouzapw
95c72638ec fix(ci): omni-queue bisects a repeated job timeout instead of pausing
A job that hits its time limit on every attempt is a hanging test, not
the machine. When the infra retries are used up and every failure is
hang-shaped (timed_out, or cancelled with the maximum-execution-time
annotation; never runner loss, startup_failure or a plain cancel), the
tick records hang-suspected and classifies the hang signatures like any
red batch: base check when the base has no verdict, base-red pause when
the bare base fails the same job, otherwise bisection with hang: true,
whose timed-out segments are not retried. The culprit comment names the
job that timed out.

A base check that never produces a verdict (no CI run, or no result
after checksTimeoutMinutes) and has no retry left no longer pauses the
queue: it is recorded as a timeout verdict and the parked batch is
settled (pr-red, the check cannot be redone for the same SHA). The
verdict lookup for a later red batch accepts timeout, so no base check
is started again for that SHA.

A job timeout on the bare base is recorded as a hang signature of the
base check even next to other failures, so a batch that hangs on the
same job is matched to the base instead of being blamed.
2026-11-15 05:21:04 -03:00
diegosouzapw
974140b31a fix(ci): omni-queue checks the bare base for every unverified tip 2026-11-15 05:01:46 -03:00
diegosouzapw
ee0b8ef037 fix(ci): omni-queue classify compares tests across shards and skips aggregate gates
CodeRabbit review of #20166 (classify front):

- Base-red matching compared whole per-run keys ("a | b"), so the same
  failing tests grouped into different shards on base and candidate never
  matched and the batch took the PR-red path (culprit / bisection). The
  matcher now builds, per normalized check, the union of failing test/gate
  identifiers of the base check and matches a candidate failure when every
  identifier of its key is in that union. Empty keys keep the name-only
  rule (empty matches empty only).
- The always() gates "Gate / CI" and "Gate / Quality" fail with no test
  named whenever a job they need fails, so a timed-out job plus its gate
  failure was classified PR-red instead of infra. New config key
  aggregateChecks (validated in config.mjs, passed by tick.onRed to every
  classifyRed call) lists them; an aggregate failure with an empty key is
  ignored when any other check failed too. A gate failing alone, or one
  that names its own failure, still blocks.
- validateConfig accepted non-string approvers (null, 123, true) because
  LOGIN_RE.test coerces them; blockLabels had the same gap. Both item
  validators now require typeof string, matching the Zod schema.

No existing assertion changed; the Zod schema in config.test.mjs gains
aggregateChecks to mirror the new required key.
2026-11-14 03:10:34 -03:00
diegosouzapw
63c1344341 fix(ci): omni-queue fail-closed check dedupe and base-check classification
A same-name run only replaces an older one when it started after that one finished (and is not of another workflow), so parallel jobs that share a name across ci.yml and quality.yml can no longer hide a failure. Required checks turn green only through a GitHub Actions check run. classifyRed returns pr-red for a same-SHA base check that timed out (it can never be redone), flags a same-SHA pending base check with baseCheckPending, matches keys only when both are equal or both empty (reporting name-only matches), and duration stripping keeps numbers inside test titles.
2026-11-13 13:57:20 -03:00
diegosouzapw
0eee20f98f feat(ci): omni-queue candidate verdict and red classification
Implements plan sections 3.4 and 3.5 as pure modules: the candidate verdict
mirrors the Mergify merge_conditions (required success, advisory tolerated,
nothing pending, fail closed on skipped required checks, timeout), and red
candidates are classified as infra, base-red (same failures on a base check
of the same SHA, shard-insensitive) or PR-red.
2026-11-13 13:21:16 -03:00
diegosouzapw
d7318d9039 feat(ci): omni-queue shared contracts, config and module interfaces
Lead commit of the omni-queue plan (self-hosted batch merge queue, Mergify
replacement). Defines what every work package builds against:

- config/merge-queue/config.json (merge-ff landing, batch of 6, label
  omni-queue, shadow mode) + a dependency-free validator, cross-checked
  against a Zod schema in the tests;
- contracts.mjs: state document, history events, ref naming (candidates
  under omni-queue/**, state on omni-queue-state outside that CI glob),
  merge-commit trailers, approval status contexts bound to the head SHA,
  protected-surface globs;
- gitexec.mjs: shell-free git runner with the token in env and redacted
  errors;
- interface stubs for the WP1-WP6 modules and the npm run queue entry.
2026-11-13 12:45:27 -03:00