refactor(doctor): T3 — 工具/运行时体检面进 Rust doctor bootstrap (#48) - #70
Conversation
T3 of the PS1 retirement campaign. `archive/check-code-intel-tools.ps1` drops from 409 lines to a 35-line forwarder; the tool/runtime health inventory it implemented now lives in `crates/code-intel-cli/src/doctor_bootstrap.rs`, surfaced as `code-intel doctor bootstrap`. The observation contract is unchanged: same `code-intel-doctor-bootstrap-observation.v1` schema, same `observation_only` authority, same `ok`/`missing` pair and wording, same `checks.*` shape. Installer and CI consumers need no adaptation. Ported behaviors include config parsing, repo-alias and reverse-path lookup, `sentruxPath` scope resolution, the python/python3 fallback, the `sentrux check --help` and `sentrux pro status` output matching (the tier pattern is hand-rolled — the crate carries no regex dependency — and stays case-insensitive to match PowerShell `-match`), the understand skill/plugin candidate paths, release-before-debug graph binary discovery, and the `CODE_INTEL_HOME` default-derivation comparison. Fixes a real defect in passing. `doctor_adapter` used to shell out to the PowerShell probe and, when `pwsh` or the script could not be launched, fall back to an in-process approximation that reported `graphProvider` presence as hardcoded `true` — masking exactly the drift doctor exists to surface. With one native probe there is no fallback path and no `pwsh` dependency on the kernel path. Also repairs a path-resolution bug in the E09 compatibility tooling, introduced when PR #68 moved PowerShell under `archive/`: `New-DoctorWrapperRetirementPacket.ps1` and `Test-DoctorWrapperRetirementPacket.ps1` resolved their repo-root-relative frozen inputs (`crates/*`, `orchestration/*`) against `archive/` and threw `Get-FileHash: Could not find a part of the path` before reaching any real check. Neither script is wired into CI, which is why it went unnoticed. The verifier now reports its designed verdict. Verification: - cargo test -p code-intel: 45 suites, 0 failed - cargo fmt -p code-intel -- --check: clean - new tests/doctor_bootstrap_cli.rs pins the schema, exit code, and a <=50-line cap on the forwarder; 10 unit tests cover the probe - test-doctor-repo-config-resolution.ps1 passes through the forwarder - test-regression-fixes.ps1: 49 passed (its two doctor graph-provider cases now drive the binary with --pipeline-root, since a scratch tree's fake binary must never be executed as the real CLI) - test-code-intel-pipeline.ps1 -RepoPath . -SkipRepowise: ok Not in scope: `Invoke-ProviderRuntimeInventory.ps1`, the second PowerShell file named by the ticket. Refs #48
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Warning Review limit reached
Next review available in: 38 seconds Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe doctor bootstrap health probe is implemented in Rust, exposed through ChangesDoctor bootstrap migration
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant CI as CI or release workflow
participant CLI as code-intel doctor bootstrap
participant Probe as Native Rust probe
participant Repo as Repository and config
participant Tools as Toolchain
CI->>CLI: Invoke with repository and requirement flags
CLI->>Probe: Parse options and run observation
Probe->>Repo: Resolve paths and inspect repository state
Probe->>Tools: Probe required tools and provider artifacts
Probe-->>CLI: Emit observation JSON or human output
CLI-->>CI: Return success or diagnostic exit code
Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (7)
crates/code-intel-cli/src/doctor_bootstrap.rs (4)
535-539: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCollapse the nested
if(Clippycollapsible_if).- if trimmed.len() < after.len() { - if trimmed.starts_with("pro") || (!require_pro && trimmed.starts_with("free")) { - return true; - } - } + if trimmed.len() < after.len() + && (trimmed.starts_with("pro") || (!require_pro && trimmed.starts_with("free"))) + { + return true; + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/code-intel-cli/src/doctor_bootstrap.rs` around lines 535 - 539, Collapse the nested conditions in the relevant doctor bootstrap logic into a single if statement, preserving the existing trimmed-length check and the `pro`/optional `free` prefix behavior that returns true.Source: Linters/SAST tools
150-162: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value
SENTRUX_AUTO_PROtruthiness matches an ad-hoc subset of casings.
"1" | "true" | "True" | "TRUE"accepts three of the eight casings oftrue;TRue/tRuesilently mean "not opted in". A case-insensitive compare removes the guesswork.- let require_pro_tier = matches!( - env::var("SENTRUX_AUTO_PRO").unwrap_or_default().as_str(), - "1" | "true" | "True" | "TRUE" - ); + let raw_pro_tier = env::var("SENTRUX_AUTO_PRO").unwrap_or_default(); + let raw_pro_tier = raw_pro_tier.trim(); + let require_pro_tier = raw_pro_tier == "1" || raw_pro_tier.eq_ignore_ascii_case("true");🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/code-intel-cli/src/doctor_bootstrap.rs` around lines 150 - 162, Simplify the SENTRUX_AUTO_PRO parsing used to initialize require_pro_tier so the value "true" is accepted case-insensitively, while preserving support for "1". Update the matches expression immediately before the sentrux_pro probe rather than changing matches_tier or probe_command_output.
495-517: 🩺 Stability & Availability | 🔵 TrivialNo timeout around the external
sentruxinvocations.
command.output()blocks until the child exits.sentrux pro statusin particular can reach out to a licensing backend; if it stalls,code-intel doctor bootstrapstalls with it, and CI has no bounded failure. The retired PowerShell path had the same shape, so this is not a regression — but now that the probe sits on the adapter's kernel path it is worth bounding (spawn + a wait-with-deadline, treating expiry asfound: falsewith anoutputnote).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/code-intel-cli/src/doctor_bootstrap.rs` around lines 495 - 517, Bound the external probe execution in the command-handling flow around Command::output, especially for sentrux status checks, by spawning the child and waiting with a deadline instead of blocking indefinitely. On timeout, terminate or reap the child and return JSON with found: false and an output note indicating the timeout; preserve the existing stdout/stderr matching behavior for completed processes and the existing spawn-error handling.
433-440: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
Option<&&Value>forces callers into double references.The extra indirection is why the unit test has to write
Some(&&entry.clone())(line 1027).Option<&Value>reads better and both call sites simplify.♻️ Proposed signature change
-fn resolve_sentrux_scope(repo_path: &Path, repo_config: Option<&&Value>) -> PathBuf { +fn resolve_sentrux_scope(repo_path: &Path, repo_config: Option<&Value>) -> PathBuf {Then at line 89 pass
repo_config(it is alreadyOption<&Value>, so.copied()on theas_ref()is unnecessary — just drop the.as_ref()), and in the test passSome(entry).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/code-intel-cli/src/doctor_bootstrap.rs` around lines 433 - 440, Change resolve_sentrux_scope to accept Option<&Value> instead of Option<&&Value>. Update the call site to pass repo_config directly without as_ref().copied(), and simplify the unit test argument from Some(&&entry.clone()) to Some(entry).crates/code-intel-cli/src/main.rs (1)
1605-1605: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
--pipeline-rootis accepted but undocumented.
run_rawparses--pipeline-root(and the CLI contract tests depend on it), yet the help line omits it. Either document it or note in the module docs that it is a test-only escape hatch, so the next reader does not treat the omission as a parser bug.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/code-intel-cli/src/main.rs` at line 1605, Update the bootstrap help text near run_raw to document the accepted --pipeline-root option, including its purpose and expected value; alternatively, explicitly identify it in the surrounding module documentation as a test-only escape hatch while preserving the existing parser and contract-test behavior.crates/code-intel-cli/tests/doctor_bootstrap_cli.rs (1)
203-219: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueThe forwarder assertions pass on comments alone.
code_linesalready strips#comments, buttext.contains("doctor")/contains("bootstrap")are checked against the whole file — a shim that merely mentions the command in its header comment satisfies both. Matching against the filtered code lines makes the test say what its message claims.♻️ Tighten the forwarder assertions
- let code_lines = text + let code: Vec<&str> = text .lines() .filter(|line| { let trimmed = line.trim(); !trimmed.is_empty() && !trimmed.starts_with('#') }) - .count(); + .collect(); + let code_lines = code.len(); assert!( code_lines <= 50, "{} has {code_lines} code lines; T3 caps the shim at 50", script.display() ); - assert!(text.contains("doctor"), "forwarder must invoke the binary"); - assert!( - text.contains("bootstrap"), - "forwarder must invoke the binary" - ); + let body = code.join("\n"); + assert!( + body.contains("doctor") && body.contains("bootstrap"), + "forwarder must invoke `code-intel doctor bootstrap`" + );🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/code-intel-cli/tests/doctor_bootstrap_cli.rs` around lines 203 - 219, Update the forwarder assertions in the test around code_lines so command checks inspect only non-empty, non-comment code lines rather than the raw text. Reuse the filtered code-line content for the “doctor” and “bootstrap” assertions, preserving the existing line-count limit and failure messages.archive/tools/compatibility/New-DoctorWrapperRetirementPacket.ps1 (1)
15-15: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winFrozen source set still omits the new authoritative probe implementation. The doctor behavior now lives in
crates/code-intel-cli/src/doctor_bootstrap.rs, but neither the generator's$frozenlist nor the verifier's$snapshotInputsincludes it, so the packet'ssnapshotIdentitywill not invalidate when the probe changes.
archive/tools/compatibility/New-DoctorWrapperRetirementPacket.ps1#L15-L15: addcrates/code-intel-cli/src/doctor_bootstrap.rsto$frozen(keep the order deliberate).archive/tools/compatibility/Test-DoctorWrapperRetirementPacket.ps1#L29-L33: add the same entry in the identical position to$snapshotInputs.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@archive/tools/compatibility/New-DoctorWrapperRetirementPacket.ps1` at line 15, The frozen source set must include the authoritative doctor probe implementation so snapshotIdentity changes when it is modified. In archive/tools/compatibility/New-DoctorWrapperRetirementPacket.ps1:15, add crates/code-intel-cli/src/doctor_bootstrap.rs to $frozen in the deliberate matching order; make the identical addition to $snapshotInputs in archive/tools/compatibility/Test-DoctorWrapperRetirementPacket.ps1:29-33.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/code-intel-cli/src/doctor_bootstrap.rs`:
- Around line 21-26: Gate or explicitly allow dead-code warnings for the
CLI-only surface in doctor_bootstrap.rs. Apply the same treatment used for the
existing CLI-only item to run_raw, fail, pipeline_root, and check_names, while
keeping Options, observe, and BOOTSTRAP_SCHEMA available to the embedded
doctor_adapter module.
---
Nitpick comments:
In `@archive/tools/compatibility/New-DoctorWrapperRetirementPacket.ps1`:
- Line 15: The frozen source set must include the authoritative doctor probe
implementation so snapshotIdentity changes when it is modified. In
archive/tools/compatibility/New-DoctorWrapperRetirementPacket.ps1:15, add
crates/code-intel-cli/src/doctor_bootstrap.rs to $frozen in the deliberate
matching order; make the identical addition to $snapshotInputs in
archive/tools/compatibility/Test-DoctorWrapperRetirementPacket.ps1:29-33.
In `@crates/code-intel-cli/src/doctor_bootstrap.rs`:
- Around line 535-539: Collapse the nested conditions in the relevant doctor
bootstrap logic into a single if statement, preserving the existing
trimmed-length check and the `pro`/optional `free` prefix behavior that returns
true.
- Around line 150-162: Simplify the SENTRUX_AUTO_PRO parsing used to initialize
require_pro_tier so the value "true" is accepted case-insensitively, while
preserving support for "1". Update the matches expression immediately before the
sentrux_pro probe rather than changing matches_tier or probe_command_output.
- Around line 495-517: Bound the external probe execution in the
command-handling flow around Command::output, especially for sentrux status
checks, by spawning the child and waiting with a deadline instead of blocking
indefinitely. On timeout, terminate or reap the child and return JSON with
found: false and an output note indicating the timeout; preserve the existing
stdout/stderr matching behavior for completed processes and the existing
spawn-error handling.
- Around line 433-440: Change resolve_sentrux_scope to accept Option<&Value>
instead of Option<&&Value>. Update the call site to pass repo_config directly
without as_ref().copied(), and simplify the unit test argument from
Some(&&entry.clone()) to Some(entry).
In `@crates/code-intel-cli/src/main.rs`:
- Line 1605: Update the bootstrap help text near run_raw to document the
accepted --pipeline-root option, including its purpose and expected value;
alternatively, explicitly identify it in the surrounding module documentation as
a test-only escape hatch while preserving the existing parser and contract-test
behavior.
In `@crates/code-intel-cli/tests/doctor_bootstrap_cli.rs`:
- Around line 203-219: Update the forwarder assertions in the test around
code_lines so command checks inspect only non-empty, non-comment code lines
rather than the raw text. Reuse the filtered code-line content for the “doctor”
and “bootstrap” assertions, preserving the existing line-count limit and failure
messages.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: bc5238c2-89dd-4615-b17d-f99f25cf54de
📒 Files selected for processing (14)
.github/workflows/ci.yml.github/workflows/release.ymlCHANGELOG.mdarchive/check-code-intel-tools.ps1archive/scripts/tests/test-regression-fixes.ps1archive/tools/compatibility/New-DoctorWrapperRetirementPacket.ps1archive/tools/compatibility/Test-DoctorWrapperRetirementPacket.ps1crates/code-intel-cli/src/doctor_adapter.rscrates/code-intel-cli/src/doctor_bootstrap.rscrates/code-intel-cli/src/main.rscrates/code-intel-cli/tests/doctor_bootstrap_cli.rsdocs/doctor-envelope.mdorchestration/facade-finalize-policy.v1.jsonorchestration/integrations.json
CI's self-scan caught a real regression in the previous commit: landing the native probe as one 1124-line file tripped the repo's own structural gate, `god_file_count 32 -> 33` (`god_file: loc > 800 || (functions > 25 && loc > 400)`), which cost 120 quality points and failed `run execute` with exit 10 on all three platforms. The probe is now four cohesive modules instead of one file: doctor_bootstrap/mod.rs envelope assembly, missing list, CLI surface doctor_bootstrap/config.rs pipeline.config.json and repo resolution doctor_bootstrap/paths.rs platform derivation and path resolution doctor_bootstrap/probe.rs tool presence and command-output probing No file is a god file and behavior is unchanged; the split also let several helpers grow real unit tests of their own (repo-alias fallback, rooted vs relative sentruxPath, reverse-lookup edge cases, trailing-separator trimming), so coverage went up rather than moving around. Two follow-on corrections the split required: - the registry entrypoint and toolchainDigestEvidence now name the four module files; `orchestrate --action Validate` rejected the stale single-file path, which is the manifest reconciliation check doing its job - `--config`/`--platform`/`--pipeline-root` argument parsing was rewritten as a flat match over (token, value) instead of nested closures Residual metric movement, recorded in .sentrux/rules.toml with evidence and baselined: coupling_score 45.26 -> 45.79, quality_signal 3607 -> 3603. The `[constraints]` thresholds are untouched. coupling_score is import_lines / file_count * 10, and this tree's average is held down by large PowerShell files carrying almost no import lines, so any idiomatic Rust module sits above it. Closing the gap would have meant dropping ~13 `use` lines for inline fully qualified paths — worse code in service of a line-counting metric. The real regression, the god file, was fixed rather than baselined; god_file_count and cycle_count are unchanged at 32 and 0. Verification: - code-intel run execute --repo . (the exact CI self-scan command): exit 0, outcome completed, every node verdict pass - code-intel sentrux gate .: No degradation detected - cargo test -p code-intel: 45 suites, 0 failed - cargo fmt -p code-intel -- --check: clean - orchestrate --action Validate: ok, 0 errors, registryAudit ok - test-regression-fixes.ps1: 49 passed; test-doctor-repo-config-resolution.ps1: PASS Refs #48
…creates Addresses CodeRabbit review feedback on PR #70. `doctor_bootstrap` compiles twice: once as the binary's own module and once through the `#[path]` include inside `doctor_adapter`, which several integration tests pull into their own crate roots. The adapter copy needs only `Options`, `observe` and `BOOTSTRAP_SCHEMA`, so the CLI surface has no caller there and every one of those items warned. The allowance goes on the `#[path]` module declaration rather than on the individual items: that declaration is what makes them unreachable, it is one place instead of seven, and `main.rs` declares the same module without it, so genuinely dead code still warns where the module is actually the binary's. `check_names` was deleted outright rather than allowed — it had no caller outside its own test, so the lint was right about that one. The assertion it served is now inline in the test that needed it. The reviewer's other note, a collapsible `if` in `matches_tier`, was already resolved by the module split in the previous commit; the predicate is a single `&&` chain in doctor_bootstrap/probe.rs now. Verification: zero warnings remain from the four doctor_bootstrap modules; cargo test 45 suites 0 failed; sentrux gate reports no degradation; run execute --repo . exits 0; cargo fmt --check clean. Refs #48
…cutable
CI's Doctor step failed on all four runners with `missing: ["pipeline
script", "pipeline config"]`. Root cause: `run_raw` defaulted the pipeline
root to `pipeline_root()`, which walks up from `std::env::current_exe()` in
search of `orchestration/integrations.json` — and
`install-code-intel-pipeline.ps1` copies that manifest into the bin directory
next to the installed binary. An installed `code-intel` therefore resolved its
own bin directory as the pipeline checkout and reported every repository-side
check absent:
"path": "/home/runner/.local/share/code-intel/bin/archive/run-code-intel.ps1"
That is correct behavior for capability manifest discovery — an installed
binary should use its installed manifest — but wrong for "which pipeline
checkout am I inspecting". The retired script never had the ambiguity: it
derived the root from `$PSCommandPath`, its own location inside the checkout.
The CLI now walks up from the working directory for the same marker and only
falls back to manifest discovery, so standing in a checkout resolves that
checkout. `--pipeline-root` still overrides, and the PowerShell forwarder
keeps passing it explicitly from its own location. `doctor_adapter` is
untouched and still uses manifest discovery, which is right for the kernel
path where the binary runs from the repository's own target directory.
CI keeps calling the subcommand without `--pipeline-root` on purpose, so the
default stays exercised rather than papered over by a flag.
Verified against the actual failure mode, not just unit tests: reinstalled the
pipeline so `code-intel` on PATH is the installed copy, then ran CI's exact
command from the checkout — `code-intel doctor bootstrap --repo-path .
--no-require-repowise --json` — which now exits 0 with `ok: true` and resolves
pipelineScript/config into the repository rather than the bin directory.
Also adds a regression test that plants a decoy `orchestration/integrations.json`
beside a fake install location, runs from a nested directory of the real
checkout with no `--pipeline-root`, and asserts the checkout wins.
Full pass: cargo test 45 suites 0 failed; sentrux gate no degradation;
run execute --repo . exit 0; cargo fmt --check clean;
test-doctor-repo-config-resolution.ps1 PASS; test-regression-fixes.ps1 49 passed.
Refs #48
T3: 工具/运行时体检面进 Rust
PS1 巨石退役战役的第三票,第一刀。
archive/check-code-intel-tools.ps1从 409 行降到 35 行代码(59 行含注释),体检逻辑全部进crates/code-intel-cli/src/doctor_bootstrap.rs,对外是新子命令code-intel doctor bootstrap。code-intel doctor bootstrap --repo-path . --no-require-repowise --json契约不变
输出仍是
code-intel-doctor-bootstrap-observation.v1,authority: observation_only,ok/missing这对字段连措辞和顺序都保留。checks.*形状不动,所以 installer 和 CI 消费方不用改。搬过来的行为:config 解析与 parseError、repo alias 查找与
-RepoPath反向查找、sentruxPathscope 解析、六个工具探测(python→python3 回退)、sentrux check --help与sentrux pro status的输出匹配、understand skill/plugin 候选路径、graphProvider 的 release→debug 优先级、CODE_INTEL_HOME与默认推导的比对。tier 匹配是手写的——这个 crate 不带 regex 依赖——并保持大小写不敏感,与 PowerShell
-match语义一致。顺手修掉一个真 bug
doctor_adapter原本 spawnpwsh跑 PS1 探针;当pwsh或脚本起不来时,回退到一个进程内近似实现,而那个实现把graphProvider的sourceFound/cargoFound/binaryFound硬编码成true。doctor 存在的全部意义就是暴露这类漂移,它却对自己撒谎。现在只有一份原生实现:没有回退路径,kernel 路径不再依赖
pwsh,跨平台答案一致。E09 兼容工具的路径 bug
PR #68 把 PowerShell 搬进
archive/后,New-DoctorWrapperRetirementPacket.ps1和Test-DoctorWrapperRetirementPacket.ps1的$RepoRoot落在archive/,但它们的 frozen 输入表混了两种相对基准——crates/*和orchestration/*是仓根相对的,却也被 join 到archive/下面,于是在跑到任何真实检查之前就抛Get-FileHash: Could not find a part of the path。两个脚本现在都把
crates/*/orchestration/*解析到$PipelineRepoRoot,其余解析到$RepoRoot。验证器因此能跑到它设计好的裁决了。这两个脚本不在任何 workflow 里(grep
Test-DoctorWrapperRetirementPacket只命中一篇 doc 和一份 evidence 记录),这就是它坏了没人发现的原因。验证
cargo test -p code-intelcargo fmt -p code-intel -- --checkorchestrate --action Validateok: true,0 errorstest-doctor-repo-config-resolution.ps1test-regression-fixes.ps1test-code-intel-pipeline.ps1 -RepoPath . -SkipRepowiseok: true新增
crates/code-intel-cli/tests/doctor_bootstrap_cli.rs(6 个契约测试)钉住 schema、observation_only、adapter 实际读的三个 pointer、CI 依赖的退出码,以及一条「forwarder 必须 ≤50 行代码」的守门断言——防止逻辑长回 PowerShell。probe 本身另有 10 个单元测试。test-regression-fixes.ps1里两个 doctor graph-provider 用例改成直调二进制并传--pipeline-root <scratch>:断言一字未改,但 scratch 树里那个假二进制不能被当成真 CLI 执行。toolchainDigests 在所有源码编辑完成后一次性重算,现在是三条(新增
doctor_bootstrap.rs)。出口对照(issue #48)
check-code-intel-tools.ps1的全部检查项Invoke-ProviderRuntimeInventory.ps1—— 本 PR 不含不在范围内
Invoke-ProviderRuntimeInventory.ps1(21.5K)是 issue #48 点名的第二个文件,留给下一刀。E09 retirement packet 还有一个更深的问题,与本 PR 无关且早于本分支:它守护的
invoke-code-intel.doctor.direct-production分支已被804e2f0 feat: make compiled CLI the primary entry删除——今天的archive/invoke-code-intel.ps1里doctor零命中。所以 packet 无法用它自己的生成器重新生成(生成器强制要求 live 文件里存在那三个 route marker),而且git diff --stat 42de063 e4e76d6显示它六个 frozen 输入在本分支存在之前就全部变过了。本 PR 只修它的路径 bug,不动那份冻结记录——把 packet 与已删除的分支对账需要 retirement gate 要求的审批证据,那是另一张票。Refs #48