Skip to content

testing: align CI gates and cleanup with the testing strategy#368

Merged
RtlZeroMemory merged 2 commits intomainfrom
feature/testing-ci-gates-and-suite-cleanup
Apr 14, 2026
Merged

testing: align CI gates and cleanup with the testing strategy#368
RtlZeroMemory merged 2 commits intomainfrom
feature/testing-ci-gates-and-suite-cleanup

Conversation

@RtlZeroMemory
Copy link
Copy Markdown
Owner

@RtlZeroMemory RtlZeroMemory commented Apr 14, 2026

Scope

  • add an explicit fast/full/nightly/release test gate structure across CI, nightly, and release workflows
  • surface the release-critical package and terminal suites with named slices and a repo-side progress summary
  • retire bootstrap-only constraint wrapper tests by promoting the real assertion files to the primary filenames
  • add a concise contributor rule in docs/dev/testing.md requiring new tests to declare contract source and fidelity

CI gate changes

  • ci.yml now names the fast gate (fast gate / quality, fast gate / release-critical suites) and the full gate (full gate / create-rezi smoke, full gate / node <version> / <os>, full gate / bun / ubuntu-latest)
  • new nightly.yml runs the scheduled nightly gate with release-critical package and terminal slices, template smoke, the 3x3 Node/OS matrix, and Bun
  • release.yml now repeats the release-critical package and terminal slices before the release matrix

Release-critical visibility changes

  • added scripts/testing-slices.mjs as the shared release-critical suite catalog and progress-summary source
  • CI now writes the testing progress summary to $GITHUB_STEP_SUMMARY
  • release-critical suites are surfaced with explicit names for input, table, virtual list, command palette, file navigation, modal focus, code editor, and terminal runtime coverage

Tests retired

  • removed the five bootstrap-only constraint wrapper files and promoted their real assertion files to the primary .test.ts names:
  • graph
  • helpers
  • integration
  • parser
  • resolver

Working-agreement location

  • docs/dev/testing.md

Test commands run

  • node --test scripts/__tests__/testing-slices.test.mjs scripts/__tests__/testing-workflows.release-critical.test.mjs scripts/__tests__/ci-workflow-linux-reduced-e2e.test.mjs
  • npm ci
  • npm run build
  • npm run test:progress
  • npm run test:release-critical
  • npm run build:native
  • npm run test:release-critical:terminal

Known limitations

  • the fast gate intentionally stops at package-level release-critical coverage and leaves terminal-real coverage to the full, nightly, and release paths
  • the repo still does not carry first-class per-test classification metadata, so no classification percentage is claimed in the repo-side progress summary
  • the full PR gate still surfaces terminal-real coverage through the existing matrix steps rather than a second dedicated PR job

Closes #355
Closes #356
Closes #357
Closes #358
Closes #359
Closes #325

#Closes #355
#Closes #356
#Closes #357
#Closes #358
#Closes #359
#Closes #325

Summary by CodeRabbit

  • New Features

    • Added release-critical test suites across CI, nightly, and release gates and a CLI to list/run those slices
    • Added npm scripts: test:release-critical, test:release-critical:terminal, test:progress
  • Documentation

    • Updated testing guide with CI gate definitions and new test declaration requirements
  • Tests

    • Migrated many constraint tests to Node’s test runner and added workflow validation tests
  • Chores

    • Clarified workflow job display names and updated gate ordering/dependencies; added nightly scheduled workflow

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8d7c72cc-2bf3-408b-83bb-8ad37db2e1d9

📥 Commits

Reviewing files that changed from the base of the PR and between a72bcbd and 6d06c3d.

📒 Files selected for processing (6)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • docs/dev/testing.md
  • scripts/__tests__/testing-slices.test.mjs
  • scripts/__tests__/testing-workflows.release-critical.test.mjs
  • scripts/testing-slices.mjs

📝 Walkthrough

Walkthrough

Updates CI to explicit fast/full/nightly/release gates, adds a new release-critical job surfaced across workflows, consolidates numerous constraint tests into in-file Node node:test suites (removing dynamic bootstrap impl files), adds a new scripts/testing-slices.mjs CLI plus tests, and documents the gate model and new test declaration requirements.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/ci.yml, .github/workflows/release.yml, .github/workflows/nightly.yml
Added/renamed gate-prefixed job display names (fast/full/release), introduced release-critical-suites job in CI/nightly/release workflows, adjusted job dependencies so release flows gate on release-critical-suites, and added a new nightly.yml workflow.
Constraint Test Consolidation
packages/core/src/__tests__/constraints/... (graph.test.ts, parser.test.ts, resolver.test.ts, integration.test.ts, helpers.test.ts)
Removed dynamic bootstrap/impl .test.impl.ts files and replaced them with self-contained tests using Node's node:test runner; moved test implementations into the .test.ts files and deleted the .impl.ts counterparts.
Test Infrastructure CLI & Tests
scripts/testing-slices.mjs, scripts/__tests__/testing-slices.test.mjs, scripts/__tests__/testing-workflows.release-critical.test.mjs
Added a CLI to enumerate/summary/run release-critical test slices, scan reference scenarios, and emit grouped CI output; added tests validating CLI summary JSON/flag handling and workflow visibility of release-critical-suites.
NPM Scripts & Documentation
package.json, docs/dev/testing.md
Added three npm scripts (test:release-critical, test:release-critical:terminal, test:progress) calling the new CLI; expanded docs with CI gate model, release-critical suite mapping, and a new test declaration requirement (contract source + fidelity).

Sequence Diagram(s)

sequenceDiagram
  participant GH as "GitHub Actions\n(workflow)"
  participant Repo as "Repo (checkout)"
  participant Node as "Node/npm\n(scripts/testing-slices.mjs)"
  participant Tests as "Test Suites / Native Build"

  GH->>Repo: checkout (no submodules)
  GH->>Node: setup Node / npm
  Node->>Repo: read scripts/testing-slices.mjs & package.json
  GH->>Node: run `npm run test:progress` (append to $GITHUB_STEP_SUMMARY)
  GH->>Node: run `npm run test:release-critical`
  Node->>Tests: run package slices (node --test / npm scripts)
  Node->>Tests: run terminal/native slices (build native, terminal e2e)
  Tests-->>Node: exit status
  Node-->>GH: propagate exit status (fail/pass)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through gates both fast and neat,
I tidied tests and made them meet,
Release-critical lights now gleam,
Scripts that group, and workflows team,
A nimble hop — the CI's complete!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'testing: align CI gates and cleanup with the testing strategy' accurately summarizes the main changes: restructuring CI gates (fast/full/nightly/release) and retiring redundant tests.
Linked Issues check ✅ Passed All linked issues (#355, #356, #357, #358, #359, #325) have their coding requirements met: gates defined in workflows, progress metrics via testing-slices.mjs, redundant tests retired, release-critical suites surfaced, and fidelity documentation added.
Out of Scope Changes check ✅ Passed All changes align with PR objectives: workflow restructuring, test file consolidation, release-critical suite implementation, and testing documentation. No unrelated or out-of-scope modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/testing-ci-gates-and-suite-cleanup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a72bcbd700

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml Outdated
Comment on lines +251 to +252
needs: [quality-gates, template-smoke, matrix-config]
name: node ${{ matrix.node-version }} / ${{ matrix.os }}
name: full gate / node ${{ matrix.node-version }} / ${{ matrix.os }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make full CI jobs depend on release-critical suites

In .github/workflows/ci.yml, the new release-critical-suites job is labeled as part of the fast gate, but the expensive full-gate jobs (template-smoke, ci, and bun) still only depend on quality-gates. That means the matrix and Bun runs can start (and consume runner time) even when npm run test:release-critical is already failing, so the new fast gate cannot short-circuit the slower fan-out path as intended.

Useful? React with 👍 / 👎.

Comment thread .github/workflows/release.yml Outdated
Comment on lines 145 to 146
name: release gate / node ${{ matrix.node-version }} / ${{ matrix.os }}
needs: [quality-preflight]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate release matrix on release-critical suites

In .github/workflows/release.yml, release-ci still depends only on quality-preflight even after adding release-critical-suites. As a result, the 3x3 release matrix can run in parallel with (or before completion of) the release-critical slice instead of being gated by it, which defeats the stated “release-critical first” sequencing and wastes release runner minutes when the slice fails.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (2)
packages/core/src/__tests__/constraints/graph.test.ts (1)

9-37: Extract the runtime fixture builders once.

runtimeNode and boxWithId are now duplicated here and in packages/core/src/__tests__/constraints/resolver.test.ts, and both hand-shape internal RuntimeInstance / VNode objects. A shared helper would reduce drift the next time those internals move.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/core/src/__tests__/constraints/graph.test.ts` around lines 9 - 37,
The tests duplicate internal fixture builders runtimeNode and boxWithId; extract
these into a single shared test helper module and update both tests to import
and use them to avoid drift: create a new helper file exporting runtimeNode and
boxWithId (preserving their signatures and how they construct
RuntimeInstance/VNode), replace the local definitions in graph.test.ts and
resolver.test.ts with imports from that module, and ensure any types
(RuntimeInstance, VNode, InstanceId) are imported or re-exported so both test
files compile unchanged.
scripts/testing-slices.mjs (1)

152-170: Reject unexpected arguments instead of failing open.

summary returns before validating trailing args, and run currently ignores arbitrary --flag extras. That makes script typos succeed silently in CI/npm entrypoints instead of surfacing as configuration errors.

♻️ One way to tighten the parser
 function parseArgs(argv) {
   const [command, value, extra] = argv;
   const json = argv.includes("--json");
 
   if (command === "summary") {
+    const unexpected = argv.slice(1).filter((arg) => arg !== "--json");
+    if (unexpected.length > 0) {
+      throw new Error(`testing-slices: unexpected extra argument: ${unexpected[0]}`);
+    }
     return { command, json };
   }
 
   if (command === "run") {
     if (typeof value !== "string" || value.length === 0) {
       throw new Error("testing-slices: run requires a slice name");
     }
-    if (typeof extra === "string" && !extra.startsWith("--")) {
+    if (typeof extra === "string") {
       throw new Error(`testing-slices: unexpected extra argument: ${extra}`);
     }
     return { command, slice: value };
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/testing-slices.mjs` around lines 152 - 170, The parseArgs function
currently returns early for "summary" and doesn't validate trailing args, and
"run" ignores arbitrary extra flags; update parseArgs to validate the extra
token (extra) and --json handling (json) for both branches: for "summary" ensure
no unexpected extra arguments (allow only an optional "--json"), set json
accordingly, and throw on any other extra; for "run" ensure extra is either
undefined or the "--json" flag (set json in the returned object) and throw for
any other extra (use the existing variables command, value, extra, json and
return objects like { command, json } or { command, slice: value, json }).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 183-208: The fast gate job release-critical-suites isn't being
waited on by the downstream jobs template-smoke, ci, and bun (they only list
quality-gates), so failures in release-critical-suites won't block the full-gate
fan-out; update each downstream job (template-smoke, ci, bun and the other
occurrences mentioned) to include release-critical-suites in their needs array
(or alternatively add a new aggregate fast-gate job and have those jobs depend
on that aggregate) so the fast/full split is enforced and those jobs only start
after release-critical-suites completes.

In `@docs/dev/testing.md`:
- Around line 88-115: Update the "CI Integration" section to match the gate
model described in "CI Gates": replace references to the old single-flow
pipeline and any mention of "npm install" with the current multi-gate flow and
the use of "npm ci" everywhere, and add a clear note about the separate
release-critical job (fast/full/nightly/release split) and how it maps to the
named release-critical suites; ensure "CI Integration" explicitly documents the
split gate behavior and the existence of the release-critical job so the two
sections are consistent.

In `@scripts/__tests__/testing-slices.test.mjs`:
- Around line 1-2: The import statements are out of the repository's configured
order; swap them so they are sorted as the formatter expects (place the
"node:assert" import before "node:child_process"), i.e., import { strict as
assert } from "node:assert" then import { execFileSync } from
"node:child_process" so the symbols assert and execFileSync appear in the
correct order for the formatter.

In `@scripts/__tests__/testing-workflows.release-critical.test.mjs`:
- Around line 18-20: The three asserts use loose regexes that can match
unintended lines (e.g., test:release-critical:terminal) and anywhere in the
workflow; update the checks in
scripts/__tests__/testing-workflows.release-critical.test.mjs to first extract
or narrow to the release-critical-suites job/block (the
'release-critical-suites' block) and then use anchored full-line regexes (start
^ and end $) for the exact command lines (e.g., the npm run
test:release-critical and npm run test:progress >> "$GITHUB_STEP_SUMMARY") so
they only match the intended lines inside that block; apply the same tightening
to the other occurrences referenced (the asserts at 26-28 and 34-36).

In `@scripts/testing-slices.mjs`:
- Line 4: Run the project formatter/import organizer on
scripts/testing-slices.mjs to fix style and import ordering errors; specifically
normalize the import statement that currently uses "import { existsSync,
readdirSync, readFileSync } from \"node:fs\";" and run the repository's
formatter (e.g., prettier/organize-imports or the repo's npm/yarn format script)
so the sections around the other reported ranges (uses of existsSync,
readdirSync, readFileSync at the other spots) are adjusted to match repository
rules and clear CI.

---

Nitpick comments:
In `@packages/core/src/__tests__/constraints/graph.test.ts`:
- Around line 9-37: The tests duplicate internal fixture builders runtimeNode
and boxWithId; extract these into a single shared test helper module and update
both tests to import and use them to avoid drift: create a new helper file
exporting runtimeNode and boxWithId (preserving their signatures and how they
construct RuntimeInstance/VNode), replace the local definitions in graph.test.ts
and resolver.test.ts with imports from that module, and ensure any types
(RuntimeInstance, VNode, InstanceId) are imported or re-exported so both test
files compile unchanged.

In `@scripts/testing-slices.mjs`:
- Around line 152-170: The parseArgs function currently returns early for
"summary" and doesn't validate trailing args, and "run" ignores arbitrary extra
flags; update parseArgs to validate the extra token (extra) and --json handling
(json) for both branches: for "summary" ensure no unexpected extra arguments
(allow only an optional "--json"), set json accordingly, and throw on any other
extra; for "run" ensure extra is either undefined or the "--json" flag (set json
in the returned object) and throw for any other extra (use the existing
variables command, value, extra, json and return objects like { command, json }
or { command, slice: value, json }).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ac741ff5-cb06-4723-a723-6dc9af17662d

📥 Commits

Reviewing files that changed from the base of the PR and between 618a50e and a72bcbd.

📒 Files selected for processing (18)
  • .github/workflows/ci.yml
  • .github/workflows/nightly.yml
  • .github/workflows/release.yml
  • docs/dev/testing.md
  • package.json
  • packages/core/src/__tests__/constraints/graph.test.impl.ts
  • packages/core/src/__tests__/constraints/graph.test.ts
  • packages/core/src/__tests__/constraints/helpers.test.impl.ts
  • packages/core/src/__tests__/constraints/helpers.test.ts
  • packages/core/src/__tests__/constraints/integration.test.impl.ts
  • packages/core/src/__tests__/constraints/integration.test.ts
  • packages/core/src/__tests__/constraints/parser.test.impl.ts
  • packages/core/src/__tests__/constraints/parser.test.ts
  • packages/core/src/__tests__/constraints/resolver.test.impl.ts
  • packages/core/src/__tests__/constraints/resolver.test.ts
  • scripts/__tests__/testing-slices.test.mjs
  • scripts/__tests__/testing-workflows.release-critical.test.mjs
  • scripts/testing-slices.mjs
💤 Files with no reviewable changes (5)
  • packages/core/src/tests/constraints/helpers.test.impl.ts
  • packages/core/src/tests/constraints/parser.test.impl.ts
  • packages/core/src/tests/constraints/resolver.test.impl.ts
  • packages/core/src/tests/constraints/integration.test.impl.ts
  • packages/core/src/tests/constraints/graph.test.impl.ts

Comment thread .github/workflows/ci.yml
Comment thread docs/dev/testing.md
Comment thread scripts/__tests__/testing-slices.test.mjs Outdated
Comment thread scripts/__tests__/testing-workflows.release-critical.test.mjs Outdated
Comment thread scripts/testing-slices.mjs Outdated
@RtlZeroMemory RtlZeroMemory merged commit f219cff into main Apr 14, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant