Skip to content

fix(ci): route npm lifecycle hooks to their host test lanes - #12569

Closed
ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:fix/ci-route-npm-test-lifecycle-hooks
Closed

ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:fix/ci-route-npm-test-lifecycle-hooks

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

CI invokes checks through npm, which runs pre- and post-scripts automatically. The planner matches only the main script name for SQLite, Python and reverse-tools, so a hook-only edit can select the generic Linux runtime without selecting the check whose execution actually changed.

Use the npm lifecycle target for those dedicated lanes. Regression cases cover both hook prefixes and all three lane families.

Validation

  • All 438 CI scope tests passed on Node 24.22.1, including the hook-only changes and existing unrelated script controls.
  • Formatting and git diff --check passed. Hosted CI is pending.

Author readiness

Human owner: @ShuaixinHuang

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and follows the conventional title format.
  • Tests cover changed observable behavior and meaningful failure paths.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

This PR routes npm pre- and post-test hook edits to the matching SQLite, Python, or reverse-tools CI lane.

  • Changed npm test hooks now select their matching CI lanes.

No actionable issues found. Validation was source-based; tests were not rerun. Local history shows no superseding revision, but live PR status was not available.

Reviews (1) · Last reviewed commit: "fix(ci): route npm lifecycle hooks to th..." · Reviewed by Greptile

@ShuaixinHuang
ShuaixinHuang marked this pull request as ready for review November 19, 2026 23:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T23:21:28.547982Z afc54c2 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

ShuaixinHuang commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @morluto @kaoru0822-kitauji @N0zoM1z0 @gensokyo-dev @vincentkoc,

When a maintainer has time, could you review this PR at afc54c2a1? The description has the rationale and validation for this change. Thanks for taking a look.

GitHub is still rejecting my attempts to open new upstream PRs. I can continue updating existing branches and addressing review feedback.

ShuaixinHuang referenced this pull request Nov 21, 2026
* test(ida): consolidate worker release and retry checks

* test(ida): point lifecycle coverage at retained cleanup checks
@CassieFox23

Copy link
Copy Markdown
Contributor

TL;DR: I ran the PR's one changed test file on Node 22.23.4, 24.22.1 and 26.12.1. All 438 tests passed on each version. With scripts/ci/change-plan.mjs set back to merge base 1a070de, 4 tests failed on each version.

Findings

Check Node 22.23.4 Node 24.22.1 Node 26.12.1
Head afc54c2, tests/boundary/filesystem/ciChangeScope.test.ts pass: 1 file, 438 of 438 tests pass: 1 file, 438 of 438 tests pass: 1 file, 438 of 438 tests
Red run (scripts/ci/change-plan.mjs from 1a070de) fail: 4 failed, 434 passed (438) fail: 4 failed, 434 passed (438) fail: 4 failed, 434 passed (438)

The red run fails the same 4 tests on all three versions. All are in tests/boundary/filesystem/ciChangeScope.test.ts:

  • routes a change to posttest:mutation:reverse-tools to the reverse_tools lane
  • routes a change to posttest:sqlite:run to the sqlite lane
  • routes a change to pretest:coverage:reverse-tools to the reverse_tools lane
  • routes a change to pretest:python to the python lane

The PR changes 2 files against the merge base: scripts/ci/change-plan.mjs and tests/boundary/filesystem/ciChangeScope.test.ts.

The head is 346 commits behind main 6cf4328.

CI on afc54c2, read live with gh:

  • Workflow CI is completed/success.
  • CodeQL production is completed/skipped.
  • Both PR title runs are completed/success.
  • 23 check runs succeeded, including Source tests, Portable tests, Static checks, CI required, Classify changes and all 12 Test shard runs.
  • 28 check runs were skipped, including sqlite-runtime, Python producer tests and Reverse tools quality.
  • GitHub reports mergeable true, state clean, and draft false.

Not run

  • A hook on some other test script, such as pretest:unit. The pre/post strip is used only by the three lane checks. The next check still tests the raw name (scripts/ci/change-plan.mjs:166-170), so the plain test: rule doesn't catch that hook, the same as on main. I didn't trace where it goes after that.
  • A merge with current main, 6cf4328.
Test setup
  • Box: Fedora 44 VM (4 vCPUs, 8 GB, Linux 7.2.11) on my Nobara 44 PC
  • Node: 22.23.4, 24.22.1, 26.12.1
  • Head / base: afc54c2 / 1a070de (merge base with main)
  • Red run: afc54c2 with the changed source file from 1a070de
  • Install: npm ci --offline and npm run test:prepare on Node 24.22.1
Commands
npm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- tests/boundary/filesystem/ciChangeScope.test.ts

🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build Build, CI, packaging, and publishing bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants