Repository navigation
ci: run xtask check when Web sources change - #1925
Conversation
`xtask check` reads `web/src` for branch id literals, but a pull request that changed only Web files selected the `web` group alone. #1891 merged that way and `main` failed the check on its next push (run 44683681616). Web sources of the kinds the check reads now select the `xtask` group. Refs #1919
yyhhyyyyyy
left a comment
There was a problem hiding this comment.
Review at 9b32ae45 (origin/main dccb94fe).
The PR closes the CI selection gap behind #1891: a pull request that changes Web sources under web/src now selects the xtask group together with web, so xtask check runs and reads those files for branch id literals. It updates the selector, its tests and the release workflow description.
Verdict: APPROVE.
scripts/ci-changes.mjs:16 matches web/src files ending in .ts, .vue, .mjs or .js, the extensions collected by xtask/src/literal_main.rs:262,300-310. The earlier quote-cases rule at scripts/ci-changes.mjs:15 still wins for its JSON fixture, and non-source Web paths remain web only. The verify job already runs its xtask check step when needs.changes.outputs.xtask is true (.github/workflows/ci.yml:153-154,187-194), so the new selection reaches the intended check without selecting the Rust workspace build or tests. The test at scripts/ci-changes.test.mjs:39-42 covers all four extensions, and :49 keeps the non-source Web case at web only. docs/release/README.md:183 matches the behavior.
Verification:
git diff --check origin/main...HEAD: clean.git merge-tree --write-tree HEAD origin/main: clean (56aab394).git merge-tree --write-tree HEAD 3510429d: clean (b2df55a4), so the open #1920 documentation change does not conflict with this selector change.LC_ALL=en_US.UTF-8 node --test scripts/ci-changes.test.mjs: 9 passed.node scripts/adr-check.mjs --base origin/main: passed (3 changed files).- CI at
9b32ae45:changesandwebpass;verifyis queued;dependencies,windows-cliandacp-registryskip. - This is a selector and documentation change; no runtime or package test was needed.
No existing review threads; no inline comments.
Verdict: APPROVE.
eric8810
left a comment
There was a problem hiding this comment.
Reviewed at head 9b32ae4.
This fixes the gap behind the main breakage at its producer rather than at the symptom: xtask check reads web/src for branch id literals, but the path classifier selected only the web group for those paths, so a pull request that changed web/src/** never ran the check that inspects it. #1924 repairs the file; this stops the next one.
Selecting web/src/*.{ts,vue,mjs,js} as ['web','xtask'] is the narrowest change that closes it: the pattern is the same extension set the checker reads, and non-source Web paths (web/package.json, web/src/styles/base.css) stay web-only, which the test also pins. The test change is the honest one — the old assertion that web/src/main.ts selects only web asserted the bug, and it is replaced rather than deleted silently, with a new case naming each extension including web/src/chat-ui/WebChatTimeline.vue.
Stating the cost (a verify job that builds xtask and runs the check, without the workspace build or tests) is what makes this reviewable as a CI trade rather than an unbounded slowdown.
Blocking: none.
Checks are green at this head. I read the whole diff, which is three files; I did not run the script tests.
Non-blocking: none.
|
Heads-up on the actual cost of
So triggering the Since |
codoggy
left a comment
There was a problem hiding this comment.
Review summary
I reviewed the merge-base diff for 9b32ae45ac4aacf004deea6f611d2d6e2ba3b0b6, focusing on which Web changes now select the branch-literal check and which jobs that selection enables. I found no blocking issues in that scope.
Non-blocking note: scripts/ci-changes.mjs:16 also selects the Rust xtask build for a test-only change such as web/src/chat-ui/contract.test.ts. The literal scanner skips tests/ directories and *.test.* files (xtask/src/literal_main.rs:288–309). If this gate is intended to mirror the scanner’s inputs, keep those paths Web-only and add a negative selector case to avoid the extra build.
Checks: Static inspection: the new rule precedes the Web catch-all and preserves the special routing for quote-cases.json. The workflow gates the boundary step on xtask without selecting workspace build or tests. CI: the script-test step passed, as did web and ci-ok; the boundary step itself was skipped on this scripts-and-docs diff. Tests not run locally.
Extract all pure static repository checks (zero business-crate compilation)
into a standalone lightweight workspace crate `xtask-check` (`xtask/check`)
with only 9 pure-Rust transitive dependencies (`proc-macro2`, `quote`,
`syn`, `unicode-ident`, `serde_core`, `serde_json`, `itoa`, `memchr`,
`zmij`, `rutis-types`), implementing ADR 026 D2 and D4:
- `xtask/check` (`xtask-check`): owns `boundaries` (cargo metadata crate
rules, `crates.*` freshness, live `modules::check` syn-AST boundaries,
`plugin_docs::check`), `types` (`npm/branch-services.d.ts` via
`rutis-types`), `npm` (`runtime/plugins/*/package-lock.json`),
`comment_links`, and `literal_main`, plus on-demand `module-graph DIR`
and `types` regeneration and all 78 unit tests.
- `xtask`: depends on `xtask-check` and delegates all pure static checks,
`types`, `module-graph`, `boundaries::write`, and `plugin_docs::rewrite`
to it, keeping runtime-assembled `catalog::check`, `graph`, `measure`,
and eval harnesses in `xtask`. `cargo run --locked -p xtask -- check`
continues to run both `xtask-check` and `catalog::check`.
- `scripts/ci-changes.mjs` & `.github/workflows/ci.yml`: add a `static`
check group and lightweight `[self-hosted, linux, x64]` `static-checks`
job (wired into `ci-ok`). Route Web sources (`web/src/**/*.{ts,vue,mjs,js}`),
plugin pages (`docs/architecture/rust-agent/plugins/**`), and static
generated snapshots to `static` instead of the heavy macOS `verify` /
`xtask` build, while keeping `generated/catalog.md` on `xtask` and
`xtask/check/**` on both `static` and `xtask`.
- Update `scripts/ci-changes.test.mjs`, `AGENTS.md`,
`docs/release/README.md`, and `docs/design/branch-typescript.md`.
Fixes #1933
Refs #1919, #1925
Extract all pure static repository checks (zero business-crate compilation)
into a standalone lightweight workspace crate `xtask-check` (`xtask/check`)
with only 9 pure-Rust transitive dependencies (`proc-macro2`, `quote`,
`syn`, `unicode-ident`, `serde_core`, `serde_json`, `itoa`, `memchr`,
`zmij`, `rutis-types`), implementing ADR 026 D2 and D4:
- `xtask/check` (`xtask-check`): owns `boundaries` (cargo metadata crate
rules, `crates.*` freshness, live `modules::check` syn-AST boundaries,
`plugin_docs::check`), `types` (`npm/branch-services.d.ts` via
`rutis-types`), `npm` (`runtime/plugins/*/package-lock.json`),
`comment_links`, and `literal_main`, plus on-demand `module-graph DIR`
and `types` regeneration and all 78 unit tests.
- `xtask`: depends on `xtask-check` and delegates all pure static checks,
`types`, `module-graph`, `boundaries::write`, and `plugin_docs::rewrite`
to it, keeping runtime-assembled `catalog::check`, `graph`, `measure`,
and eval harnesses in `xtask`. `cargo run --locked -p xtask -- check`
continues to run both `xtask-check` and `catalog::check`.
- `scripts/ci-changes.mjs` & `.github/workflows/ci.yml`: add a `static`
check group and lightweight `[self-hosted, linux, x64]` `static-checks`
job (wired into `ci-ok`). Route Web sources (`web/src/**/*.{ts,vue,mjs,js}`),
plugin pages (`docs/architecture/rust-agent/plugins/**`), and static
generated snapshots to `static` instead of the heavy macOS `verify` /
`xtask` build, while keeping `generated/catalog.md` on `xtask` and
`xtask/check/**` on both `static` and `xtask`.
- Update `scripts/ci-changes.test.mjs`, `AGENTS.md`,
`docs/release/README.md`, and `docs/design/branch-typescript.md`.
Fixes #1933
Refs #1919, #1925
# Conflicts:
# .github/workflows/ci.yml
# docs/release/README.md
# scripts/ci-changes.mjs
# xtask/Cargo.toml
Summary
A pull request that changes Web sources now runs
xtask check. Refs #1919.xtask checkreadsweb/src(.ts,.vue,.mjs,.js) for branch id literals, butscripts/ci-changes.mjsselected only thewebgroup for those paths. #1891 changedweb/src/chat-ui/WebChatTimeline.vue, passed withverifyskipped, andmainfailedCheck crate boundaries and plugin pageson the next push (run 44683681616). #1924 fixes that failure; this closes the selection gap behind it.Cost: such a pull request gains a
verifyjob that buildsxtaskand runs the check, without the workspace build or tests.Design rule checklist
All plugin design rules are n/a: the change is confined to CI path selection and its documentation.
Documentation
GitHub workflows states that Web source changes run the check.
Verification
node --test scripts/ci-changes.test.mjs— 9 passed, including the new case for each file kind the check reads and the case that other Web files still selectwebalone.node scripts/adr-check.mjs --base origin/mainandgit diff --checkpassed.