Skip to content

Checks, the stale label and CI fix loops follow the work - #957

Merged
coderhelm[bot] merged 4 commits into
mainfrom
checks-labels-fix-loops-follow-the-work
Dec 3, 2026
Merged

coderhelm[bot] merged 4 commits into
mainfrom
checks-labels-fix-loops-follow-the-work

Conversation

@nambok

@nambok nambok commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Three places where CoderHelm stopped following the work on a pnpm monorepo.

  • The review's verification. A workspace root was installed with --ignore-workspace, so the root's type-check (which runs every member's) found members with no node_modules, and the review said its own verification "couldn't run". Unit tests kept in an end-to-end package (e2e/unit/*.test.ts, run by Vitest) were left out as end-to-end specs because the package's dependencies named Playwright.
  • The stale label. CoderHelm's label came off only in the hourly sweep. The sweep never removed it in "Preview only" mode. A push of commits made before the label never counted, because their dates were older than the label. A person's label was taken off like CoderHelm's own, and a failed removal produced only a warning line.
  • The CI fix loop. The loop ended on fixed counts (cycles, pushes, two fixes per failing test) even while its fixes were still changing what failed. Its endings also asked a person to look at the check.

Changes

Verification

  • A repository root that declares a workspace (pnpm-workspace.yaml or workspaces) installs the whole workspace: pnpm install --frozen-lockfile, npm ci, yarn install or bun install. Members planned after the root reuse that one install, and the install's dependency files are merged.
  • The verification script points npm, pnpm and yarn at a package cache, and the sandbox keeps that cache between builds (a new buildspec cache path).
  • New common::e2e::test_owner. It decides which runner runs a test file from the runner configs at or above it: Playwright testDir/testMatch/testIgnore, Cypress specPattern, Vitest include/exclude, Jest testMatch/testRegex/roots, and a manifest's jest block. Where a config doesn't say, the runner's defaults apply. A pattern a config names beats a default.
    • Only files Playwright, Cypress or WebdriverIO pick up are "runs against a preview".
    • When no config says, the old reading stands.
  • The planner now reads those configs and the root manifest.
  • package_test_command also tries a package's other scripts whose runner takes one file.
  • narrow handles node --test.

Stale label

  • The gateway reads activity from the webhook: a push (by a person or CoderHelm), ready_for_review, reopened, a review, a review comment, or a comment by a person. When the pull request carries the stale label, the gateway queues it. The worker then takes CoderHelm's label off at once, in every mode. Removal is idempotent (a 404 counts as done).
  • The warning comment records the head it was posted at. A head that moved since then counts as activity.
  • The sweep stays as the backstop. It removes CoderHelm's own label even in "Preview only" mode; only the dashboard's preview changes nothing. It removes the label under its own spelling on the pull request.
  • A label a person put on (or put back) stays theirs.
  • A failed read or removal raises an internal alert as CoderHelm's own problem.

CI fix loop

  • run_round::ci_cycle_goes_on, ci_push_cap and test_cap_stops:
    • Past the usual cycles and pushes, the loop goes on while the failure keeps changing, up to twice the usual count.
    • One test still red after its fixes stops the loop only when nothing else moved.
    • Two cycles without progress end it.
  • GaveUp::own_problem types every ending that is CoderHelm's own: budget, a dead end, or its own fault. hand_off_red_ci records it as an alert. The hand-off texts no longer give a person the step.

An incident case, xk_checks_labels_and_fix_loops_follow_the_work, replays all three on an invented layout.

Verification

  • cargo fmt --all --check, rustfmt --check --edition 2021 worker/src/passes/incidents/*.rs
  • cargo clippy -p common -p worker -p gateway --all-targets -- -D warnings
  • cargo test -p common -p worker -p gateway
  • brand_spelling.py, domain_examples.py
  • New tests:
    • A workspace root installs once, and every check reuses that install.
    • Vitest unit tests in an e2e/ package run; Playwright's specs wait for a preview.
    • Config and glob reading.
    • A commit after the label takes it off, and so do commits made before the label but pushed after it.
    • A review takes the label off, from the webhook and from the sweep.
    • A person's re-added label is respected.
    • "Preview only" never adds a label but tidies CoderHelm's own.
    • Removal is idempotent, and a failure raises an alert.
    • The fix loop's progress rule and its typed endings.

- A workspace root installs the whole workspace once (with the sandbox's
  package cache); members reuse it. The runner whose config picks a test
  file up decides whether it runs in the sandbox: unit tests beside
  Playwright specs run under their own runner.
- CoderHelm's stale label comes off on the webhook for a push, review,
  comment or ready for review, with the sweep as backstop, in every mode
  but the preview. A push counts by the head the warning recorded. Removal
  is idempotent, a person's label stays theirs, a failure is an alert.
- The CI fix loop goes on while its fixes make progress, past its usual
  cycles and pushes; a per-test cap stops it only when nothing else moved.
  Its own endings are typed and alerted, never a person's to-do.
- Incident xk replays all three.
@nambok nambok added the ch-review CoderHelm reviews this pull request label Dec 3, 2026
coderhelm[bot]

This comment was marked as outdated.

…cter class closes no array

- Taking the stale label off counts as done only on GitHub's 404 status,
  never on a 404 elsewhere in the error's URL or body (a pull request
  numbered 404, a repository name). The label lookup reads it the same way.
- A config's array or call value ends at its matching bracket outside
  quoted strings: testMatch ['**/*.e2e.[jt]s'] keeps its glob.
- The activity read takes the label's time itself (last_activity), in
  place of a second function beside it.
- A pull request edit takes the label off only for a new title, the edit
  the sweep reads too; a body edit no longer flaps the label.
- The stall check's comments describe what it returns and how the loop
  ends.
coderhelm[bot]

This comment was marked as outdated.

@coderhelm
coderhelm Bot dismissed their stale review December 3, 2026 20:47

Superseded by CoderHelm's latest review

@coderhelm

coderhelm Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

💚 Post-merge health check passed: the deploy of e4687c9 completed and stayed green for the full 15-minute watch window (no new failures vs. the pre-merge baseline).
Auto-merge

  • ✅ CoderHelm approved
  • ✅ CI green
    The rest is in the pull request description.

coderhelm[bot]

This comment was marked as outdated.

@coderhelm coderhelm 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 with notes 4c05b91 (merged)

@coderhelm
coderhelm Bot merged commit e4687c9 into main Dec 3, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ch-review CoderHelm reviews this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant