Skip to content

check: --scenario and --only for a fast renderer loop, and a rerun hint - #214

Open
agorischek wants to merge 3 commits into
mainfrom
feat/check-narrow
Open

agorischek wants to merge 3 commits into
mainfrom
feat/check-narrow

Conversation

@agorischek

@agorischek agorischek commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: e133c034186472175aaf8252002692251530bb3b

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Unit tests: the rerun command names the scenario, each failed check and --trust; naming only renderer scenarios skips extraction; runChecks rejects an unknown check with the list.
↑ End to end on a downstream repository: check -p turn-cost --scenario core-edit --only status-text --only opens-fitted --trust ran in 3.8 s, an unknown check and an unknown scenario are each named with the alternatives.
↓ The rerun line wasn't seen on a real failing run; it's covered only by the unit test.

Item 10 of a downstream user's (Superego) feedback, as decided for v0.3.1. projections check took about two minutes per projection, with no faster loop for renderer-only changes. The full run stays the default, and it's what CI should run.

  • --scenario <id> (repeatable, one projection): run the renderer checks on these scenarios only. The IDs are working-tree, head (HEAD → working tree) and the IDs in the renderer package's scenarios.json. Naming only scenarios.json scenarios skips extraction, the comparison with HEAD and comparator tests; each is reported as skipped, with the reason. On the reporter's turn-cost renderer that's 3.8 s instead of minutes.
  • --only <check> (repeatable): run only these renderer checks, by ID. runChecks (in @githubnext/projections/testing) now rejects an unknown ID and lists the valid ones, so the list has one source.
  • Rerun hint: a failed scenario's step ends with Rerun just this: projections check -p ID --scenario SCENARIO --only CHECK … [--trust] (and rerun in --json).
  • The MCP and VS Code check tool takes the same narrowing as scenarios and checks, and passes rerun through.
  • Docs: the check examples in projections check --help, and Run the checks in Develop a renderer.

Tests: cargo test -p projections-cli --lib check::, tools test packages/renderers/testing --filter "runChecks names".

… scenario says how to rerun just it

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Tool calls with renderer filters can report success without checking the requested scenarios when rendering is disabled.

3 open issues
What changed in this PR

Adds a faster renderer-check loop to Projections while keeping the full check suite as the default.

Changes:

  • Adds repeatable scenario and check filters, allowing renderer-only scenarios to bypass extraction and comparator tests.
  • Adds failed-check rerun hints to text and JSON reports, and exposes filtering through MCP and VS Code.
  • Documents the workflow and adds tests for filtering and rerun behavior.
File Description
packages/​renderers/​testing/​test/​helpers.test.mjs Tests unknown check ID rejection.
packages/​renderers/​testing/​src/​checks/​runner.ts Validates requested check IDs.
packages/​integrations/​vscode/​package.json Adds check and scenario tool inputs.
packages/​cli/​src/​tools/​checks.rs Forwards filters and preserves rerun hints.
packages/​cli/​src/​tools/​catalog.rs Defines MCP filtering inputs.
packages/​cli/​src/​commands/​help/​check.after-help.md Adds focused renderer-check examples.
packages/​cli/​src/​commands/​authoring.rs Adds and forwards CLI filter flags.
packages/​cli/​src/​check/​text.rs Prints rerun commands.
packages/​cli/​src/​check/​tests.rs Tests renderer-only run detection.
packages/​cli/​src/​check/​stage.rs Passes check filters to the browser.
packages/​cli/​src/​check/​render.rs Filters scenarios and generates rerun hints.
packages/​cli/​src/​check/​projection.rs Bypasses extraction for renderer-only runs.
packages/​cli/​src/​check/​mod.rs Adds filtering options and projection-count validation.
docs/​reference/​cli.md Documents the new CLI flags.
docs/​guides/​develop-a-renderer.md Explains focused checks and rerun hints.

Review effort: Balanced

Comment thread packages/cli/src/check/mod.rs Resolved
Comment thread packages/cli/src/check/render.rs Resolved
Comment thread packages/cli/src/check/render.rs Resolved
…n ID shared with the check's own is said, and the tool's narrowing needs render

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Generated rerun commands leave supplied-file paths unquoted and omit explicit browser selections, so copying them can fail or silently skip renderer checks.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Preserve explicit browser selection in rerun hints

packages/​cli/​src/​check/​render.rs:94

The rerun context drops an explicit --browser selection. If the original run uses a browser outside PATH and the standard install locations, copying the hint cannot find it: Checker::projection then skips renderer checks and can report success without rerunning the failed check. Please carry the explicit browser path into Rerun and include it, shell-escaped, in the generated command.

3 resolved since last review

Review effort: Balanced

Comment thread packages/cli/src/check/render.rs Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The generated rerun command omits repository/project selection and an explicit browser path, so it can check the wrong project or skip renderer checks and misleadingly report success.

No open issues 🎉

2 previously missed issues

In code that hasn't changed since last review

Medium severity Preserve the explicit browser path in rerun commands

packages/​cli/​src/​check/​render.rs:222

The rerun command drops an explicitly supplied --browser. If the failing run uses a browser outside PATH and the standard install locations (for example, --browser /opt/chrome-for-testing/chrome), copying this hint cannot find that browser; Checker::projection then skips the renderer checks and can report success without rerunning the failure. Carry the explicit browser path into Rerun and include it, shell-quoted, in the generated command.

Medium severity Preserve repository and project selection in rerun commands

packages/​cli/​src/​check/​render.rs:222

The rerun command loses the repository/project selected with -C or --root. Those flags do not change the process's working directory (main.rs:224–235), so copying the hint after a run such as projections --root packages/app check ... can check the parent project's projection instead, or fail to find it. Carry the effective repository and project selection into Rerun and include the corresponding shell-quoted arguments.

1 resolved since last review

Review effort: Balanced

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants