Skip to content

xtask(ci): decouple pure static repository checks from workspace-coupled xtask - #1950

Merged
eric8810 merged 4 commits into
mainfrom
eric/1933-decouple-static-xtask-checks
Nov 21, 2026
Merged

eric8810 merged 4 commits into
mainfrom
eric/1933-decouple-static-xtask-checks

Conversation

@eric8810

@eric8810 eric8810 commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Implements ADR 026 D2 + D4 (physical isolation of pure static L1 checks from heavy workspace builds). Fixes #1933. Refs #1919, #1925.

Problem

xtask depends on 15 internal workspace crates (dim-app-server, dim-agent-runtime with testing, dim-agent-capabilities, dim-agent-aimux, rusqlite, rquickjs, axum, reqwest, rmcp, rutis, etc.) plus ~750 KB of evaluation harnesses. Because all checks lived in that single binary, PRs touching Web sources (#1925), plugin pages, or static generated files had to queue on the macOS verify pool and compile nearly the entire Rust backend just to run pure static checks (literal_main, boundaries, plugin_docs, types, npm, comment_links).

Changes

  • New lightweight crate xtask/check (xtask-check) with zero business-crate dependencies and zero C/C++ native dependencies — only 4 direct / 9 transitive pure-Rust crates (proc-macro2, quote, syn, unicode-ident, serde_core, serde_json, itoa, memchr, zmij, rutis-types):
    • Owns all pure static checks: boundaries (Cargo metadata crate rules + crates.* freshness + live modules::check syn-AST boundaries + plugin_docs::check), types (npm/branch-services.d.ts via AST-only rutis-types), npm (runtime/plugins/*/package-lock.json), comment_links, and literal_main, plus all 78 unit tests.
    • Supports cargo run --locked -p xtask-check (all pure static checks), module-graph DIR, and types.
    • Cold check/test builds in ~2s; all 78 unit tests pass in 0.26s; all static repository checks complete in <1s.
  • Deduplicated xtask delegation:
    • xtask depends on xtask-check (and drops syn, proc-macro2, rutis-types from xtask/Cargo.toml) and delegates all pure static checks, module-graph, types, boundaries::write, and plugin_docs::rewrite to it.
    • cargo run --locked -p xtask -- check keeps working as the single full local entry point (running xtask_check::check_all fail-first, then runtime-assembled catalog::check).
  • Lightweight CI isolation (.github/workflows/ci.yml & scripts/ci-changes.mjs):
    • Add a static check group and a [self-hosted, linux, x64] static-checks job (wired into ci-ok) that runs cargo clippy --locked -p xtask-check --all-targets -- -D warnings, cargo test --locked -p xtask-check, and cargo run --locked -p xtask-check.
    • Route web/src/**/*.{ts,vue,mjs,js} to ['web', 'static'] and docs/architecture/rust-agent/{plugins,generated}/ (except generated/catalog.md) to ['static'], so Web and plugin-doc PRs skip the macOS verify runner and 15-crate backend build completely.
    • Keep docs/architecture/rust-agent/generated/catalog.md on ['xtask'] (runtime-assembled catalog check) and route xtask/check/** to ['static', 'xtask'].
  • Docs & tests: update scripts/ci-changes.test.mjs, AGENTS.md, docs/release/README.md, and the two types.rs links in docs/design/branch-typescript.md.

Gate cost disclosure (ADR 026 D4)

  • Added job: static-checks on [self-hosted, linux, x64] (~15s total for clippy + 78 tests + full static check; 9 pure-Rust crates, zero backend crates).
  • Net CI savings: removes Web source PRs (web/src/**/*.{ts,vue,mjs,js}) and plugin-doc PRs from the contended macOS ARM64 verify pool and eliminates their ~10–30 min cargo build -p xtask backend builds.

Design rule checklist

All plugin/runtime design rules are n/a: this change only reorganizes xtask static verification tooling and CI routing, with no runtime, Timeline, or plugin behavior changes.

  • Scope: n/a — xtask static verification tooling and CI only.
  • Commands and results: n/a.
  • Handover: n/a.
  • Timeline before callbacks: n/a.
  • Infrastructure: n/a.
  • Core mechanisms and consumers: n/a.
  • Batch: n/a.
  • Context: n/a.
  • No reading another plugin's internal state: n/a.
  • Cross-language faces: n/a.
  • Business configuration: n/a.
  • Missing mechanism capabilities: n/a.
  • Timeline holds only facts later decisions use: n/a.

Documentation

  • No accepted ADR is modified or deleted (ADR 008).
  • No other module's design is changed (updated only the two moved-file links to xtask/check/src/types.rs in docs/design/branch-typescript.md).
  • Delivery status is not added to an ADR, index or roadmap.

Verification

  • cargo tree --locked -p xtask-check — confirmed zero dim-* / rutis runtime / native C dependencies (9 pure-Rust crates total).
  • cargo fmt --all -- --check --config error_on_line_overflow=true — passed.
  • cargo clippy --locked -p xtask-check --all-targets -- -D warnings — passed.
  • cargo test --locked -p xtask-check — 78 passed, 0 failed (0.26s).
  • cargo run --locked -p xtask-check — all 7 pure static checks passed (743 modules, 4558 edges, 26 plugin docs, npm/branch-services.d.ts, plugin locks, 97 comment links, 11 unrelated literal_main uses).
  • cargo run --locked -p xtask-check -- module-graph /tmp/dim-xtask-check-module-graph — emitted modules.json and modules.mmd on demand.
  • cargo clippy --locked -p xtask --all-targets -- -D warnings — passed.
  • cargo run --locked -p xtask -- check — full check (xtask-check + runtime-assembled catalog::check) passed.
  • node --test scripts/ci-changes.test.mjs scripts/adr-check.test.mjs — 16 passed (9 ci-changes + 7 adr-check).
  • node scripts/adr-check.mjs --base origin/main & git diff --check — passed.

@eric8810
eric8810 force-pushed the eric/1933-decouple-static-xtask-checks branch from 0034e66 to e6ae710 Compare November 20, 2026 10:26
@eric8810
eric8810 marked this pull request as ready for review November 20, 2026 10:27

@yyhhyyyyyy yyhhyyyyyy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This PR implements ADR 026 D2 and D4: it extracts the pure static repository checks into a new xtask-check crate and routes Web sources, plugin pages, generated graphs and xtask/check changes to a new Linux static-checks job, while the runtime-assembled catalog.md check stays in xtask. I reviewed the full main...head diff, including the moved code against origin/main.

P2: xtask/check changes bypass the format gate

Problem. scripts/ci-changes.mjs:27 routes xtask/check/** to static and xtask, not rust. The only format check in CI is .github/workflows/ci.yml:202, guarded by if: needs.changes.outputs.rust == 'true' at line 198. The new static-checks job at .github/workflows/ci.yml:95-99 runs clippy, tests and the checks, but not cargo fmt.

Failure scenario. A PR changes only xtask/check/src/boundaries.rs and leaves an unformatted line. The changes job sets rust=false, so verify skips its format step; static-checks passes, and verify still builds xtask and runs xtask check. The PR merges. The following main push classifies xtask/check/... as non-documentation and selects every group, so verify runs the format step and main turns red, blocking later PRs. docs/architecture/build.md:320 states that CI runs this format check.

Evidence. .github/workflows/ci.yml:198 and :202; .github/workflows/ci.yml:95-99; scripts/ci-changes.mjs:27; docs/architecture/build.md:320.

Fix. Add cargo fmt --all -- --check --config error_on_line_overflow=true to the static-checks run block. rustfmt is installed from rust-toolchain.toml, and the command is cheap for every static route. Keeping xtask/check on rust would also restore the gate, but it reintroduces the heavy workspace build this PR removes.

P3 (optional): enforce that xtask-check stays lightweight

Problem. The PR's central property is that xtask-check has zero business-crate dependencies, but nothing enforces it. xtask/check/src/boundaries.rs:42-52 enforces rules for dim-agent-types, dim-agent-runtime and dim-agent-capabilities; there is no rule for xtask-check.

Failure scenario. A later PR adds dim-agent-types to xtask/check/Cargo.toml to reuse a type. static-checks still passes, but every Web, plugin-page and generated-doc PR now compiles a business crate, silently undoing the L1 isolation and the cost saving.

Evidence. xtask/check/src/boundaries.rs:42-52; xtask/check/Cargo.toml:9-13.

Fix. Extend the existing metadata loop with a rule that rejects a dim-* or rutis dependency of xtask-check, leaving rutis-types allowed, or add a small unit test over the manifest. Optional because it guards a future change, not this head.

Verification

  • cargo test --locked -p xtask-check: 78 passed.
  • cargo run --locked -p xtask-check and -- check: all static checks passed (743 modules, 4558 edges, 26 plugin documents, 97 comment links, 11 literal_main uses).
  • cargo run --locked -p xtask -- check: passed, including service catalog passed.
  • cargo clippy --locked -p xtask-check --all-targets -- -D warnings and cargo clippy --locked -p xtask --all-targets -- -D warnings: passed.
  • cargo fmt --all -- --check --config error_on_line_overflow=true: passed.
  • node --test scripts/ci-changes.test.mjs: 9 passed.
  • The moved comment_links, literal_main, modules, npm and types files are byte-identical to origin/main. plugin_docs and boundaries differ only by the expected extraction and the added --locked --offline metadata flags. catalog::check remains in xtask, and xtask check still runs it after xtask-check.

CI at this head: changes, dependencies, static-checks, web and windows-cli pass; verify is pending; acp-registry is skipped. Main moved to 3d5749c (#1920) during this review. git merge-tree --write-tree origin/main HEAD is clean (tree 5e58884a): the merged ci.yml contains each job once, has no conflicting or duplicated concurrency block, and ci-ok still includes static-checks. No #1920 follow-up is needed.

Verdict: REQUEST_CHANGES for the P2 format gate. The P3 is optional and does not block.

Cross-PR: #1941 changes rutis-types from 0.19.3 to 0.23.0 in xtask/Cargo.toml; after this move that line lives in xtask/check/Cargo.toml, so the bump must follow it. #1921 edits ci.yml and docs/release/README.md too, so the merge order needs care; I did not review that diff in detail here.

Comment thread .github/workflows/ci.yml
build-warnings: ""
- name: Run pure static repository checks
run: |
cargo clippy --locked -p xtask-check --all-targets -- -D warnings

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P2: xtask/check/** changes bypass the format gate.

Problem: scripts/ci-changes.mjs:27 routes these files to static and xtask, so needs.changes.outputs.rust is false. The only format check, cargo fmt --all -- --check --config error_on_line_overflow=true at .github/workflows/ci.yml:202, is guarded by if: needs.changes.outputs.rust == 'true' at line 198. This job does not run it.

Failure scenario: a PR edits only xtask/check/src/boundaries.rs and leaves an unformatted line. All PR checks pass. After merge, the main push selects every group for the non-documentation path, verify runs the format step, and main turns red.

Evidence: .github/workflows/ci.yml:198, :202, :95-99; scripts/ci-changes.mjs:27; docs/architecture/build.md:320.

Fix: add cargo fmt --all -- --check --config error_on_line_overflow=true to this run block. Keeping xtask/check on rust would also restore it, but reintroduces the heavy workspace build.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fixed in cf331c5.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fixed in d50b2be. The static-checks run block still starts with the format gate at .github/workflows/ci.yml:94, scripts/ci-changes.mjs:30 still selects static for xtask/check/**, and ci-ok still needs static-checks at .github/workflows/ci.yml:411.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Still fixed at ab9ea4c. The static-checks run block still starts with the format gate at .github/workflows/ci.yml:94, scripts/ci-changes.mjs:30 still selects static for xtask/check/**, and ci-ok still needs static-checks at .github/workflows/ci.yml:404 (the line moved from 411 after #1949 and #1951 removed ci.yml lines).

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
@eric8810
eric8810 force-pushed the eric/1933-decouple-static-xtask-checks branch from e6ae710 to cf331c5 Compare November 20, 2026 12:00
@eric8810

Copy link
Copy Markdown
Collaborator Author

Thanks for the thorough review! Addressed both findings and rebased onto origin/main (including #1920, #1921, and #1941's rutis-types 0.23.0 bump):

  • P2 (format gate on xtask/check/**): Added cargo fmt --all -- --check --config error_on_line_overflow=true to the static-checks job in .github/workflows/ci.yml so xtask/check-only PRs cannot bypass formatting.
  • P3 (guard xtask-check lightweight boundary): Added a xtask-check dependency check in xtask/check/src/boundaries.rs rejecting any dim-* or rutis dependency (keeping rutis-types allowed), with a unit test covering both rejections and allowed deps.
  • Rebase sync: Updated xtask/check/Cargo.toml to rutis-types = "0.23.0" (matching build(rutis): upgrade the plugin runtime to 0.23 #1941), resolved ci.yml / scripts/ci-changes.mjs / docs/release/README.md with ci: require full Linux verification and macOS-native checks on pull requests #1921 (macos-native / macos_scripts).

Re-verified locally: cargo fmt --all -- --check --config error_on_line_overflow=true, cargo clippy --locked -p xtask-check -p xtask --all-targets -- -D warnings, cargo test --locked -p xtask-check (79 passed), cargo run --locked -p xtask-check, cargo run --locked -p xtask -- check, node --test scripts/ci-changes.test.mjs (10 passed), and node scripts/adr-check.mjs --base origin/main.

Ready for re-review!

@eric8810
eric8810 requested a review from yyhhyyyyyy November 20, 2026 12:01

@yyhhyyyyyy yyhhyyyyyy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Round 2 review of cf331c5. The PR extracts the pure static repository checks into xtask-check, routes Web sources, plugin pages, static generated graphs and xtask/check to a Linux static-checks job, and leaves the runtime-assembled catalog.md check in xtask.

Round-1 P2 fixed

The format gate now runs in the job that fires for xtask/check changes:

  • .github/workflows/ci.yml:94 adds cargo fmt --all -- --check --config error_on_line_overflow=true to the static-checks run block.
  • scripts/ci-changes.mjs:30 routes xtask/check/** to static, so classify returns static=true, rust=false for an xtask/check-only PR.
  • ci-ok needs static-checks at .github/workflows/ci.yml:411, so the job cannot be skipped when it is selected.

The static-checks job at this head ran its check step successfully, so the fix executes in the job that fires for these changes. Locally, rustfmt --check exits non-zero on an unformatted copy of boundaries.rs, and the classification simulation returns static=true, rust=false. verify still runs for these paths because the xtask group stays selected; it builds xtask and runs xtask check including catalog.md.

Round-1 P3 withdrawn

xtask/check/src/boundaries.rs:30-32 rejects a dim-* or rutis dependency of xtask-check and leaves rutis-types allowed, with a unit test at :106-112. Cargo metadata confirms the crate's only dependencies are proc-macro2, rutis-types, serde_json and syn. Withdraw the optional P3.

Optional P3 (inline, non-blocking)

docs/release/README.md:181 still says "Architecture pages checked by xtask", while the new sentence at line 183 correctly sends plugin pages and static generated graphs to static-checks (xtask-check) and only catalog.md to the runtime-assembled xtask check. Wording only; see the inline note.

Verification

  • node --test scripts/ci-changes.test.mjs: 10 passed.
  • cargo test --locked -p xtask-check: 79 passed.
  • cargo run --locked -p xtask-check and ... -- check: passed (743 modules, 4560 edges, 26 plugin documents, 97 comment links, 11 literal_main uses).
  • cargo run --locked -p xtask -- check: passed, including service catalog passed.
  • cargo fmt --all -- --check --config error_on_line_overflow=true: passed.
  • cargo clippy --locked -p xtask-check --all-targets -- -D warnings: passed.
  • cargo clippy --locked -p xtask --all-targets -- -D warnings: passed.
  • A cold CARGO_HOME run of cargo clippy --locked -p xtask-check, cargo test --locked -p xtask-check and cargo run --locked -p xtask-check passed, so the new --offline metadata call works after only the static job's dependencies are fetched.
  • The moved comment_links, literal_main, modules, npm and types files are byte-identical to origin/main. plugin_docs and boundaries match the extracted origin/main code apart from the path adjustments, the --locked --offline flags and the new xtask-check rule. xtask still exposes every command CI uses, and xtask check and xtask-check report the same checks.

CI at this head: changes, dependencies, static-checks, windows-cli and web pass; verify (linux) has passed build, lint and boundary steps and is running workspace tests; macos-native is queued; acp-registry is skipped. origin/main is the head's parent, so #1921 and #1941 are already in the base and git merge-tree --write-tree origin/main HEAD is clean. Open PRs #1952 and #1953 are empty drafts, so they do not overlap.

Verdict: APPROVE. The blocking P2 is fixed and verified in the job that fires for xtask/check changes; the round-1 P3 is fixed. The docs wording note is optional.

Comment thread docs/release/README.md
`ci.yml` runs on pull requests, pushes to `main`, and manual dispatch. A pull request runs the groups its changed paths need, as decided by `scripts/ci-changes.mjs`. A push to `main` runs only `changes` and `ci-ok` when its entire push range changes only documentation paths that select no check group. Architecture pages checked by `xtask` and the native storage format document retain the full main run, as do mixed pushes and pushes whose base cannot be compared. Manual dispatch selects every group. Every push to `main` runs its selected jobs to completion: a later push does not cancel them, so each merge has its own result and the `main CI` badge in the [README](../../README.md) reports the latest finished one.

CI builds the workspace, checks formatting and Clippy, runs workspace tests and boundary checks, runs the packaging/development script tests, and exercises the ignored actual CLI profile and public Node-backed flows. `ci-ok` passes when every selected gating job passes, so it is the check to require. CI builds without debug info (`CARGO_PROFILE_DEV_DEBUG=0`). The [build environment](../architecture/build.md) describes test artifact reuse, concurrency limits, and target deadlines. Cargo runs documentation tests with the same features, and ignored CLI and Node flows reuse the recorded binaries without package-scoped recompilation. Web source changes also run the `xtask` check, which reads them for branch id literals. Node-backed checks run for runtime, binding and service-contract paths, and CLI-only changes retain their ordinary and actual-profile flows. Evaluation tests use `xtask/eval-tests` for `xtask/` changes, and the wall-clock handoff runs for execution-related changes. PRs run `verify (linux)` for the selected groups. Rust changes also run `macos-native` on Apple Silicon, and changes affecting native packaging or code layout select its macOS script checks. Both jobs feed `ci-ok`. Full `main` pushes run `verify (macos)`, and manual dispatch runs full verification on both Linux and macOS. The `web` job runs on self-hosted Windows x64. It stages the frontend package, verifies generated declarations and bundled dependency notices, and runs the Web tests.
CI builds the workspace, checks formatting and Clippy, runs workspace tests and boundary checks, runs the packaging/development script tests, and exercises the ignored actual CLI profile and public Node-backed flows. `ci-ok` passes when every selected gating job passes, so it is the check to require. CI builds without debug info (`CARGO_PROFILE_DEV_DEBUG=0`). The [build environment](../architecture/build.md) describes test artifact reuse, concurrency limits, and target deadlines. Cargo runs documentation tests with the same features, and ignored CLI and Node flows reuse the recorded binaries without package-scoped recompilation. Web source changes, plugin pages and static generated graphs run the lightweight `static-checks` job (`xtask-check`) on Linux x64 without compiling business runtime crates, while `catalog.md` changes retain the runtime-assembled `xtask` check. Node-backed checks run for runtime, binding and service-contract paths, and CLI-only changes retain their ordinary and actual-profile flows. Evaluation tests use `xtask/eval-tests` for `xtask/` changes, and the wall-clock handoff runs for execution-related changes. PRs run `verify (linux)` for the selected groups. Rust changes also run `macos-native` on Apple Silicon, and changes affecting native packaging or code layout select its macOS script checks. Both jobs feed `ci-ok`. Full `main` pushes run `verify (macos)`, and manual dispatch runs full verification on both Linux and macOS. The `web` job runs on self-hosted Windows x64. It stages the frontend package, verifies generated declarations and bundled dependency notices, and runs the Web tests.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P3 (optional): the preceding sentence at line 181 still says "Architecture pages checked by xtask", but this sentence now sends plugin pages and static generated graphs to static-checks (xtask-check), leaving only catalog.md to the runtime-assembled xtask check.

Failure scenario: a maintainer reading this guide to find the job that failed for a plugin-page PR follows line 181 and inspects verify instead of static-checks.

Evidence: docs/release/README.md:181; scripts/ci-changes.mjs:5-6 (plugins|generated maps to static); .github/workflows/ci.yml:75-97.

Fix: say "Architecture pages that select a check group" or "Architecture pages checked by xtask or xtask-check".

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Still present at d50b2be. docs/release/README.md:181 still says architecture pages are checked by xtask; the merge of main did not change this paragraph. Optional P3, not blocking.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Still present at ab9ea4c, optional P3. docs/release/README.md:181 still says architecture pages are checked by xtask, while :183 sends plugin pages and static generated graphs to static-checks on pull requests. The sentence is scoped to pushes to main, where the full run still executes the xtask step, so it is not false. Non-blocking; naming both jobs would be clearer, and this can be closed if the current split is intended.

@eric8810

Copy link
Copy Markdown
Collaborator Author

Merged main to pick up #1958, which fixes the three scrollback TUI tests that failed verify (linux). No other changes; CI rerun is queued.

@yyhhyyyyyy yyhhyyyyyy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Round 3 review of d50b2be. The change keeps its scope: xtask-check owns the pure static checks, xtask delegates to it, and CI sends Web sources, plugin pages and static generated graphs to the Linux static-checks job while catalog.md keeps the runtime-assembled xtask check.

Head is an exact merge, not a rebase

d50b2be merges origin/main dbbd707 into the approved cf331c5. Content is preserved: git merge-tree --write-tree dbbd7079 cf331c5e returns exactly the head tree 9f0cb8c96575, so no conflict resolution changed either side, and git range-diff ffd3e116..cf331c5e dbbd7079..d50b2be3 reports cf331c5 unchanged. Main's ffd3e11..dbbd707 commits (#1943, #1960, #1895, #1958) do not touch ci.yml, scripts/ci-changes.mjs, xtask or AGENTS.md; their docs/release/README.md edit is at line 44, away from the open P3 at line 181.

Round-2 P2 is fixed and preserved

The format gate is in the job that fires for xtask/check changes: .github/workflows/ci.yml:75-97 defines static-checks with if: needs.changes.outputs.static == 'true', and its run block starts with cargo fmt --all -- --check --config error_on_line_overflow=true at :94. scripts/ci-changes.mjs:30 routes xtask/check/** to static and xtask, ci-ok needs static-checks at .github/workflows/ci.yml:411, and scripts/ci-changes.test.mjs:72 pins the classification.

Re-checked at this head

  • The split keeps the approved boundaries. git diff -M --summary dbbd7079..d50b2be3 shows five byte-identical renames into xtask/check/src/; plugin_docs.rs holds the moved document check, and xtask/src/plugins.rs:265-277 keeps graph writing and delegates block rewriting to xtask_check::plugin_docs::rewrite. xtask/src/main.rs:64-65 runs xtask_check::check_all then catalog::check, and :354 keeps graph writing through xtask_check::boundaries::write.
  • The lightweight boundary holds. xtask/check/src/boundaries.rs:30-31 rejects a dim-* or rutis dependency of xtask-check, with the test at :107-111; cargo tree -p xtask-check contains only pure-Rust crates and no dim-* or rutis package.
  • Static routing is complete. scripts/ci-changes.mjs:10-11 keeps generated/catalog.md on xtask and sends the other plugin and generated paths to static; :17 sends Web sources to web, static; :30 sends xtask/check to static, xtask. scripts/ci-changes.test.mjs:35-37,41-43,72 covers all three.
  • Coverage after main moved is unchanged. cargo run -p xtask-check passes 743 modules / 4560 edges, 26 plugin documents (including main's Permission.md text), 97 comment links, 11 unrelated literal_main uses, service declarations and plugin locks. cargo run -p xtask -- check also passes, including service catalog passed.
  • Gates: cargo fmt --all -- --check --config error_on_line_overflow=true, cargo clippy -p xtask-check --all-targets -- -D warnings, cargo clippy -p xtask --all-targets -- -D warnings and cargo test -p xtask-check (79 passed) pass. node --test scripts/ci-changes.test.mjs is 10 passed; scripts/tui-tmux.test.mjs and scripts/release.test.mjs are 48 passed. All runs used isolated HOME, TMPDIR, XDG dirs and CARGO_HOME under the review data dir, and left no processes.

Optional P3 (unchanged)

Problem: docs/release/README.md:181 still says "Architecture pages checked by xtask" while :183 sends plugin pages and static generated graphs to static-checks (xtask-check). Failure scenario: a maintainer looking up which job failed for a plugin-page PR checks verify instead of static-checks. The full-main-run outcome in the same sentence still holds, because a plugin-page push to main selects static and therefore keeps every group, so this is wording only. Evidence: docs/release/README.md:181, :183; scripts/ci-changes.mjs:11. Fix: say "Architecture pages checked by xtask or xtask-check". This is the existing thread, non-blocking.

Cross-PR

  • Merge-tree against origin/main is clean and equals the head tree.
  • #1949 and #1951 merge into this head cleanly.
  • #1952 conflicts textually in .github/workflows/ci.yml, docs/release/README.md and scripts/ci-changes.mjs. It keeps Web sources and plugin and generated paths on xtask, so its rebase must preserve this PR's static routing, and ci-ok must carry both static-checks and scripts.
  • #1953 merges cleanly, but its new active-gate budget table in docs/architecture/build.md has no static-checks row. Whichever lands second should record the gate (ADR 026 D4); the PR body already states the added runtime, compile dependencies and runner pool, and the passing static-checks job took 41 s end to end at this head.

CI

At d50b2be, changes, dependencies, static-checks, macos-native, web and windows-cli pass; verify (linux) is still running; acp-registry is skipped.

Verdict: APPROVE. The round-2 P2 is fixed and preserved, the merge changes no reviewed content, coverage is unchanged after main's move, and the only remaining note is the optional P3 wording.

@yyhhyyyyyy yyhhyyyyyy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Round 4 review of ab9ea4c. The goal is unchanged: xtask-check owns the pure static repository checks, xtask delegates to it, and CI routes Web sources, plugin pages and static generated graphs to the Linux static-checks job while catalog.md keeps the runtime-assembled xtask check.

Verdict: APPROVE.

Head is main plus the reviewed implementation, nothing else

git merge-tree --write-tree cfeccadc5432928995b1779ef27faf1302a1cc5d 04186cc3f returns tree a579d2cec7e774d68c5417e44f670c20d55a0fd7, equal to git rev-parse HEAD^{tree}: the merge applied without manual resolution. git diff --name-only origin/main HEAD lists exactly the PR's 21 files, so every non-PR file in the head tree is byte-identical to origin/main. The delta from round 3, d50b2be..ab9ea4c, changes exactly main's 122-file set dbbd707..cfeccad, and git log --oneline origin/main..HEAD contains only cf331c5 plus merge commits, so no branch-side code changed after round 3. git diff -M --summary origin/main...HEAD still shows the five 100 percent renames into xtask/check/src/.

Round-2 P2 is fixed and preserved

static-checks is defined at .github/workflows/ci.yml:75 with if: needs.changes.outputs.static == 'true' at :77, and its run block still starts with cargo fmt --all -- --check --config error_on_line_overflow=true at :94. scripts/ci-changes.mjs:30 still routes xtask/check/** to static and xtask, and ci-ok still needs static-checks at .github/workflows/ci.yml:404 (the line moved from 411 because #1949 and #1951 removed lines above it). scripts/ci-changes.test.mjs:35-37, :41-43 and :72 pin the classification.

No semantic conflict with main's recent merges

  • #1949: the release-stamped verify step is gone at head, and no file this PR changes mentions it; the ci.yml difference d50b2be..HEAD is exactly main's step removal and test target renames. Main's tui-e2e edits are outside this PR's files, and the AGENTS.md suite link still resolves.
  • #1951: every test target ci.yml now names exists: crates/dimcode/Cargo.toml:16,20,24,28 (cli_flow, cli_tui_flow, cli_session_flow, cli_daemon_flow), crates/dim-app-server/Cargo.toml:10,18, crates/dim-event-hub/Cargo.toml:13 and tests/integration/Cargo.toml:11. The routing table has no test-binary references, so the split cannot stale it.
  • #1962: after the web test prune, the static suite still passes on the pruned tree. literal_main scans web/src production files (xtask/check/src/literal_main.rs:262) and skips .test. files (:301-302), and the full run reports 743 modules, 4561 edges, 26 plugin documents, 97 comment links and 11 unrelated literal_main uses.
  • cargo run --locked -p xtask -- check also prints service catalog passed, so the runtime-assembled catalog.md check is intact after #1949's build changes.

Checks run

  • cargo fmt --all -- --check --config error_on_line_overflow=true: pass.
  • cargo clippy --locked -p xtask-check --all-targets -- -D warnings: pass.
  • cargo test --locked -p xtask-check: 79 passed, 0 failed.
  • cargo run --locked -p xtask-check: pass (743 modules and 4561 edges, 26 plugin documents, service declarations, plugin locks, 97 comment links, 11 unrelated literal_main uses).
  • cargo run --locked -p xtask -- check: pass, including service catalog passed.
  • cargo clippy --locked -p xtask --all-targets -- -D warnings: pass.
  • node --test scripts/ci-changes.test.mjs: 10 passed.
  • node --test scripts/*.test.mjs: 159 tests, 155 passed, 4 skipped, 0 failed.
  • node scripts/adr-check.mjs --base origin/main: ADR freeze passed: 21 changed files.
  • git diff --check origin/main...HEAD: clean.
  • cargo tree --locked -p xtask-check: external pure-Rust crates only, no dim-* and no rutis runtime crate.
  • git merge-tree against origin/main: clean and equal to the head tree.

All local runs used isolated HOME, TMPDIR, XDG dirs and CARGO_HOME under the review data dir with LC_ALL=en_US.UTF-8, and no processes remained.

CI

At ab9ea4c, changes, dependencies, static-checks (40s), macos-native, web and windows-cli pass. verify (linux) is still pending; acp-registry is skipped. I did not wait for verify.

Cross-PR

  • #1952 (head ba8b3f3) conflicts against this head in .github/workflows/ci.yml, docs/architecture/build.md, docs/release/README.md and scripts/ci-changes.mjs, and shares four files with this PR. Its ci-ok needs scripts and not static-checks (its ci.yml:406), and it keeps plugin, generated and Web paths on xtask (its scripts/ci-changes.mjs:12,22). Whichever lands second must combine the two routings and keep both entries in ci-ok.
  • #1953 (head 923aa33) conflicts in .github/workflows/ci.yml, docs/architecture/build.md, crates/dimcode/tests/cli_flow.rs and scripts/run-rust-test.mjs; only ci.yml, Cargo.toml and the README overlap this PR. Its Active-gate budgets table at 923aa339:docs/architecture/build.md:326-342 has no static-checks row; whichever lands second should record the new gate (ADR 026 D4). This PR's body already discloses the gate's runtime, compile dependencies and runner pool.
  • #1912 shares xtask/src/main.rs through a single session_data_value rename in configured_agent; it does not touch the moved checks and main.rs merges clean. #1900 and #1899 share xtask/src/plugins.rs (FsHost and ExecHost renames in GraphPlatform, which stays in that file) and merge clean. #1910 and #1909 share docs/design/branch-typescript.md and merge clean. #1881 and #1306 share only Cargo files.
  • #1963 and #1917 conflict only in main-side test files, not in this PR's files.

Optional P3 (unchanged, non-blocking)

The open thread's sentence at docs/release/README.md:181 is unchanged: "Architecture pages checked by xtask". It is scoped to pushes to main, where the full run still executes verify's xtask step, so it is not false, and :183 now names static-checks for the PR routing. Wording only; naming both jobs would match the routing more directly, and the thread can be closed if the current split is intended.

Notes

A tree-wide grep still finds pre-move paths in docs/design/rutis-0.19-upgrade.md:147 (and docs/zh/design/rutis-0.19-upgrade.md:131) and docs/design/thin-instances.md:290. These are historical or draft design documents, and I am not counting them as findings.

Resolved and withdrawn

  • Round-2 P2: fixed and preserved; the format gate is still first in the static-checks run block.
  • No other round 1 to 3 finding remains open. The only prior note is the optional README wording above.

Unverified

  • verify (linux) was pending when I finished; I did not wait for it.
  • I did not run the web or macOS suites locally; they cover main-side changes and are green or running in CI.
  • Nothing was published, commented, pushed or merged.

@eric8810
eric8810 merged commit 26ab50e into main Nov 21, 2026
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.

xtask/ci: separate pure static repository checks from workspace-coupled xtask commands

2 participants