Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ jobs:

- name: Doctor
shell: pwsh
run: .\archive\check-code-intel-tools.ps1 -RepoPath . -RequireRepowise:$false
# T3 (#48): the tool/runtime probe is native now; the PowerShell entry
# point is a thin forwarder onto this same subcommand.
run: code-intel doctor bootstrap --repo-path . --no-require-repowise

- name: GitHub research contract tests
shell: pwsh
Expand Down Expand Up @@ -530,7 +532,8 @@ jobs:

- name: Doctor
shell: pwsh
run: ./archive/check-code-intel-tools.ps1 -RepoPath . -RequireRepowise:$false -Json
# T3 (#48): native probe; the PowerShell entry point now forwards here.
run: code-intel doctor bootstrap --repo-path . --no-require-repowise --json

- name: Hospital fail-closed contract tests
shell: pwsh
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ jobs:
- name: Doctor
shell: pwsh
# Runners don't install repowise; smoke runs on the lite fallback
# (same as ci.yml). RequireRepowise defaults to $true since 0.2.0.
run: .\archive\check-code-intel-tools.ps1 -RepoPath . -RequireRepowise:$false
# (same as ci.yml). The probe requires repowise by default, hence the
# explicit opt-out. Native since T3 (#48).
run: code-intel doctor bootstrap --repo-path . --no-require-repowise

- name: GitHub research contract tests
shell: pwsh
Expand Down
16 changes: 8 additions & 8 deletions .sentrux/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
},
"metrics": {
"complex_fn_count": 12,
"coupling_score": 45.26,
"cross_module_edges": 1041,
"coupling_score": 45.79,
"cross_module_edges": 1076,
"cycle_count": 0,
"files": 230,
"functions": 3117,
"files": 235,
"functions": 3181,
"god_file_count": 32,
"max_complexity": 162,
"quality_signal": 3607,
"total_import_edges": 1041
"quality_signal": 3603,
"total_import_edges": 1076
},
"savedAt": 1785242084,
"savedAt": 1785396251,
"schema": "code-intel-sentrux-baseline.v2",
"scope": ".",
"sourceCommit": "1512c9d5777cf683daa6c95c4c8415164af93cf3"
"sourceCommit": "4be192665d5339ae47a2c80306ac2cc097cb56d1"
}
31 changes: 23 additions & 8 deletions .sentrux/rules.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,30 @@
# no god files, coupling grade B) is tracked modernization debt
# (issue #14, "Remaining tracked debt").
#
# Measured ratchet evidence (sentrux-native 2.0.0, 2026-07-27, security-004
# Measured ratchet evidence (sentrux-native 2.0.0, 2026-07-30, T3 doctor
# tree, recorded together with .sentrux/baseline.json in the same commit):
# max_complexity 162 (archive/scripts/tests/test-code-intel-pipeline.ps1),
# god_file_count 29, coupling_score 45.33, cycle_count 0.
# The 45.13 -> 45.33 coupling and 3968 -> 3967 quality movement is the cost
# of the shared tool_path resolver module (security-004, #33): one new module
# imported by six call sites replaces bare Command::new("rg"/"git") names, so
# the added import edges are the fix working as intended, not drift. God files
# and cycles did not move.
# coupling_score 45.26 -> 45.79, quality_signal 3607 -> 3603,
# god_file_count 32 (unchanged), cycle_count 0 (unchanged).
# Cause: T3 (#48) replaced 409 lines of archive/check-code-intel-tools.ps1
# with a native Rust probe split across four cohesive modules
# (doctor_bootstrap/{mod,config,paths,probe}.rs) plus one integration test
# file. Import edges went 1041 -> 1076 over 230 -> 235 files.
#
# Why the movement is accepted rather than engineered away: coupling_score is
# import_lines / file_count * 10, and this tree's 45.26 average is held down by
# large PowerShell files that carry almost no import lines. Any idiomatic Rust
# module — roughly four to six `use`/`mod` lines — sits above that average, so
# adding well-factored Rust always pushes the ratio up. Reaching 45.26 here
# would have required dropping ~13 `use` lines in favour of inline fully
# qualified paths: worse code, chosen only to move a line-counting metric.
# What was NOT accepted: the first cut of this work landed the probe as one
# 1124-line file, which tripped god_file_count 32 -> 33 (quality -120). That
# is a real regression and was fixed by the module split above, not baselined.
# Prior entry (2026-07-27, security-004): 45.13 -> 45.33 coupling and
# 3968 -> 3967 quality was the cost of the shared tool_path resolver module
# (#33): one new module imported by six call sites replaces bare
# Command::new("rg"/"git") names, so the added import edges are the fix
# working as intended, not drift. God files and cycles did not move.
# Prior entry (2026-07-26): 45.07 -> 45.13 / 3969 -> 3968 was the ast-grep
# internalization conformance suite cost.
# The previous B / 70 / no-god thresholds were never green under any engine:
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- **The doctor bootstrap probe is native Rust** (issue #48, T3 of the PS1
retirement campaign). `code-intel doctor bootstrap` now computes the
tool/runtime health inventory that `archive/check-code-intel-tools.ps1` used
to implement in 409 lines of PowerShell; the script is a ~35-line thin
forwarder retained for the installer and rollback paths. The observation it
emits keeps the `code-intel-doctor-bootstrap-observation.v1` schema, the
`observation_only` authority, and the same `ok`/`missing` pair, so installer
and CI consumers are unchanged.

```bash
code-intel doctor bootstrap --repo-path . --no-require-repowise --json
```

CI and release workflows call the binary directly. Running the forwarder on a
machine without the binary is now reported as a `code-intel binary` entry in
`missing` (exit 1) rather than as a crash.

### Fixed

- **The doctor capability no longer answers from a stub when `pwsh` is
absent.** The adapter previously shelled out to the PowerShell probe and, on
failure to launch it, fell back to an in-process approximation that reported
`graphProvider` presence as hardcoded `true` — masking exactly the drift the
doctor exists to surface. With one native probe there is no fallback path and
no `pwsh` dependency on the kernel path.

## [0.7.0-beta.2] — 2026-07-30

### Changed — action required
Expand Down
Loading
Loading