@stsepelin/checktrail 0.1.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +42 -0
- package/LICENSE +21 -0
- package/README.md +355 -0
- package/SECURITY.md +46 -0
- package/dist/src/actionlint-evidence.d.ts +2 -0
- package/dist/src/actionlint-evidence.js +166 -0
- package/dist/src/actionlint-inputs.d.ts +5 -0
- package/dist/src/actionlint-inputs.js +123 -0
- package/dist/src/actionlint-runner.d.ts +1 -0
- package/dist/src/actionlint-runner.js +122 -0
- package/dist/src/actionlint.d.ts +19 -0
- package/dist/src/actionlint.js +80 -0
- package/dist/src/adapters.d.ts +49 -0
- package/dist/src/adapters.js +430 -0
- package/dist/src/architecture.d.ts +107 -0
- package/dist/src/architecture.js +230 -0
- package/dist/src/clang-evidence.d.ts +2 -0
- package/dist/src/clang-evidence.js +194 -0
- package/dist/src/clang-protocol.d.ts +3 -0
- package/dist/src/clang-protocol.js +25 -0
- package/dist/src/clang-runner.d.ts +1 -0
- package/dist/src/clang-runner.js +159 -0
- package/dist/src/clang.d.ts +44 -0
- package/dist/src/clang.js +197 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +338 -0
- package/dist/src/config.d.ts +33 -0
- package/dist/src/config.js +140 -0
- package/dist/src/contract-schema.d.ts +85 -0
- package/dist/src/contract-schema.js +56 -0
- package/dist/src/contract-worker.d.ts +1 -0
- package/dist/src/contract-worker.js +123 -0
- package/dist/src/contracts.d.ts +22 -0
- package/dist/src/contracts.js +123 -0
- package/dist/src/django-evidence.d.ts +2 -0
- package/dist/src/django-evidence.js +100 -0
- package/dist/src/django-runner.d.ts +1 -0
- package/dist/src/django-runner.js +80 -0
- package/dist/src/django.d.ts +9 -0
- package/dist/src/django.js +50 -0
- package/dist/src/dotnet-compiler.d.ts +1 -0
- package/dist/src/dotnet-compiler.js +87 -0
- package/dist/src/dotnet-evidence.d.ts +2 -0
- package/dist/src/dotnet-evidence.js +127 -0
- package/dist/src/dotnet-runner.d.ts +1 -0
- package/dist/src/dotnet-runner.js +167 -0
- package/dist/src/dotnet.d.ts +65 -0
- package/dist/src/dotnet.js +120 -0
- package/dist/src/engine.d.ts +19 -0
- package/dist/src/engine.js +239 -0
- package/dist/src/environment.d.ts +6 -0
- package/dist/src/environment.js +36 -0
- package/dist/src/eslint-evidence.d.ts +2 -0
- package/dist/src/eslint-evidence.js +98 -0
- package/dist/src/eslint-runner.d.ts +1 -0
- package/dist/src/eslint-runner.js +61 -0
- package/dist/src/eslint.d.ts +2 -0
- package/dist/src/eslint.js +40 -0
- package/dist/src/evidence.d.ts +2 -0
- package/dist/src/evidence.js +313 -0
- package/dist/src/external-adapter.d.ts +164 -0
- package/dist/src/external-adapter.js +265 -0
- package/dist/src/external-evidence.d.ts +2 -0
- package/dist/src/external-evidence.js +127 -0
- package/dist/src/external-runner.d.ts +1 -0
- package/dist/src/external-runner.js +122 -0
- package/dist/src/fastapi-evidence.d.ts +2 -0
- package/dist/src/fastapi-evidence.js +126 -0
- package/dist/src/fastapi-runner.d.ts +1 -0
- package/dist/src/fastapi-runner.js +84 -0
- package/dist/src/fastapi.d.ts +10 -0
- package/dist/src/fastapi.js +52 -0
- package/dist/src/fetch-pack.d.ts +16 -0
- package/dist/src/fetch-pack.js +154 -0
- package/dist/src/finding-policy-schema.d.ts +146 -0
- package/dist/src/finding-policy-schema.js +70 -0
- package/dist/src/finding-policy.d.ts +62 -0
- package/dist/src/finding-policy.js +206 -0
- package/dist/src/git-selection.d.ts +3 -0
- package/dist/src/git-selection.js +229 -0
- package/dist/src/go-directives.d.ts +1 -0
- package/dist/src/go-directives.js +32 -0
- package/dist/src/go-scope.d.ts +11 -0
- package/dist/src/go-scope.js +122 -0
- package/dist/src/golangci-evidence.d.ts +2 -0
- package/dist/src/golangci-evidence.js +92 -0
- package/dist/src/golangci-runner.d.ts +1 -0
- package/dist/src/golangci-runner.js +124 -0
- package/dist/src/golangci.d.ts +2 -0
- package/dist/src/golangci.js +35 -0
- package/dist/src/guidance.d.ts +98 -0
- package/dist/src/guidance.js +247 -0
- package/dist/src/index.d.ts +31 -0
- package/dist/src/index.js +16 -0
- package/dist/src/inventory.d.ts +4 -0
- package/dist/src/inventory.js +94 -0
- package/dist/src/java-compiler.d.ts +1 -0
- package/dist/src/java-compiler.js +110 -0
- package/dist/src/java-evidence.d.ts +2 -0
- package/dist/src/java-evidence.js +114 -0
- package/dist/src/java-runner.d.ts +1 -0
- package/dist/src/java-runner.js +79 -0
- package/dist/src/java.d.ts +25 -0
- package/dist/src/java.js +102 -0
- package/dist/src/jest-evidence.d.ts +2 -0
- package/dist/src/jest-evidence.js +117 -0
- package/dist/src/jest-runner.d.ts +1 -0
- package/dist/src/jest-runner.js +46 -0
- package/dist/src/jest.d.ts +2 -0
- package/dist/src/jest.js +36 -0
- package/dist/src/junit.d.ts +18 -0
- package/dist/src/junit.js +157 -0
- package/dist/src/laravel-evidence.d.ts +2 -0
- package/dist/src/laravel-evidence.js +175 -0
- package/dist/src/laravel-runner.d.ts +1 -0
- package/dist/src/laravel-runner.js +168 -0
- package/dist/src/laravel.d.ts +8 -0
- package/dist/src/laravel.js +50 -0
- package/dist/src/local-tool.d.ts +1 -0
- package/dist/src/local-tool.js +19 -0
- package/dist/src/mcp.d.ts +14 -0
- package/dist/src/mcp.js +362 -0
- package/dist/src/mutation.d.ts +118 -0
- package/dist/src/mutation.js +370 -0
- package/dist/src/mypy-evidence.d.ts +2 -0
- package/dist/src/mypy-evidence.js +63 -0
- package/dist/src/mypy.d.ts +2 -0
- package/dist/src/mypy.js +59 -0
- package/dist/src/node-reporter.d.ts +1 -0
- package/dist/src/node-reporter.js +28 -0
- package/dist/src/nuxt-evidence.d.ts +2 -0
- package/dist/src/nuxt-evidence.js +160 -0
- package/dist/src/nuxt-protocol.d.ts +52 -0
- package/dist/src/nuxt-protocol.js +29 -0
- package/dist/src/nuxt-runner.d.ts +1 -0
- package/dist/src/nuxt-runner.js +165 -0
- package/dist/src/nuxt.d.ts +24 -0
- package/dist/src/nuxt.js +105 -0
- package/dist/src/output.d.ts +3 -0
- package/dist/src/output.js +48 -0
- package/dist/src/phpstan-evidence.d.ts +2 -0
- package/dist/src/phpstan-evidence.js +81 -0
- package/dist/src/phpstan.d.ts +2 -0
- package/dist/src/phpstan.js +51 -0
- package/dist/src/phpunit-evidence.d.ts +2 -0
- package/dist/src/phpunit-evidence.js +53 -0
- package/dist/src/phpunit.d.ts +2 -0
- package/dist/src/phpunit.js +58 -0
- package/dist/src/pint-evidence.d.ts +2 -0
- package/dist/src/pint-evidence.js +79 -0
- package/dist/src/pint-runner.d.ts +1 -0
- package/dist/src/pint-runner.js +53 -0
- package/dist/src/pint.d.ts +2 -0
- package/dist/src/pint.js +37 -0
- package/dist/src/playwright-evidence.d.ts +2 -0
- package/dist/src/playwright-evidence.js +127 -0
- package/dist/src/playwright-reporter.d.ts +10 -0
- package/dist/src/playwright-reporter.js +37 -0
- package/dist/src/playwright-runner.d.ts +1 -0
- package/dist/src/playwright-runner.js +61 -0
- package/dist/src/playwright.d.ts +2 -0
- package/dist/src/playwright.js +35 -0
- package/dist/src/policy-pack.d.ts +21 -0
- package/dist/src/policy-pack.js +41 -0
- package/dist/src/pytest-evidence.d.ts +2 -0
- package/dist/src/pytest-evidence.js +116 -0
- package/dist/src/pytest-runner.d.ts +1 -0
- package/dist/src/pytest-runner.js +48 -0
- package/dist/src/pytest.d.ts +2 -0
- package/dist/src/pytest.js +25 -0
- package/dist/src/report-validation.d.ts +129 -0
- package/dist/src/report-validation.js +27 -0
- package/dist/src/review.d.ts +270 -0
- package/dist/src/review.js +349 -0
- package/dist/src/ruby.d.ts +2 -0
- package/dist/src/ruby.js +25 -0
- package/dist/src/ruff-evidence.d.ts +2 -0
- package/dist/src/ruff-evidence.js +99 -0
- package/dist/src/ruff.d.ts +2 -0
- package/dist/src/ruff.js +40 -0
- package/dist/src/runner.d.ts +8 -0
- package/dist/src/runner.js +117 -0
- package/dist/src/runtime-inventory.d.ts +112 -0
- package/dist/src/runtime-inventory.js +200 -0
- package/dist/src/rust-dep-info.d.ts +1 -0
- package/dist/src/rust-dep-info.js +46 -0
- package/dist/src/rust-evidence.d.ts +2 -0
- package/dist/src/rust-evidence.js +157 -0
- package/dist/src/rust-runner.d.ts +1 -0
- package/dist/src/rust-runner.js +161 -0
- package/dist/src/rust.d.ts +7 -0
- package/dist/src/rust.js +39 -0
- package/dist/src/sarif.d.ts +86 -0
- package/dist/src/sarif.js +113 -0
- package/dist/src/schemas.d.ts +393 -0
- package/dist/src/schemas.js +222 -0
- package/dist/src/staticcheck-evidence.d.ts +2 -0
- package/dist/src/staticcheck-evidence.js +75 -0
- package/dist/src/swift.d.ts +2 -0
- package/dist/src/swift.js +20 -0
- package/dist/src/task-store.d.ts +37 -0
- package/dist/src/task-store.js +349 -0
- package/dist/src/tool-versions.d.ts +3 -0
- package/dist/src/tool-versions.js +260 -0
- package/dist/src/types.d.ts +157 -0
- package/dist/src/types.js +37 -0
- package/dist/src/typescript-build-evidence.d.ts +2 -0
- package/dist/src/typescript-build-evidence.js +86 -0
- package/dist/src/typescript-build-runner.d.ts +1 -0
- package/dist/src/typescript-build-runner.js +132 -0
- package/dist/src/typescript-build.d.ts +2 -0
- package/dist/src/typescript-build.js +41 -0
- package/dist/src/typescript.d.ts +2 -0
- package/dist/src/typescript.js +54 -0
- package/dist/src/validation-task-worker.d.ts +1 -0
- package/dist/src/validation-task-worker.js +205 -0
- package/dist/src/validation-tasks-protocol.d.ts +69 -0
- package/dist/src/validation-tasks-protocol.js +57 -0
- package/dist/src/validation-tasks.d.ts +11 -0
- package/dist/src/validation-tasks.js +144 -0
- package/dist/src/vitest-evidence.d.ts +2 -0
- package/dist/src/vitest-evidence.js +112 -0
- package/dist/src/vitest-runner.d.ts +1 -0
- package/dist/src/vitest-runner.js +48 -0
- package/dist/src/vitest.d.ts +2 -0
- package/dist/src/vitest.js +36 -0
- package/dist/src/vue-router-capture.d.ts +42 -0
- package/dist/src/vue-router-capture.js +87 -0
- package/dist/src/vue-router-evidence.d.ts +2 -0
- package/dist/src/vue-router-evidence.js +126 -0
- package/dist/src/vue-router-protocol.d.ts +63 -0
- package/dist/src/vue-router-protocol.js +44 -0
- package/dist/src/vue-router-runner.d.ts +1 -0
- package/dist/src/vue-router-runner.js +88 -0
- package/dist/src/vue-router.d.ts +23 -0
- package/dist/src/vue-router.js +108 -0
- package/dist/src/vue-tsc-runner.d.ts +1 -0
- package/dist/src/vue-tsc-runner.js +24 -0
- package/dist/src/workspace.d.ts +7 -0
- package/dist/src/workspace.js +53 -0
- package/docs/ACCEPTANCE.md +56 -0
- package/docs/ACTIONLINT.md +112 -0
- package/docs/ARCHITECTURE-POLICY.md +82 -0
- package/docs/ARCHITECTURE.md +122 -0
- package/docs/CLANG.md +113 -0
- package/docs/CLIENTS.md +109 -0
- package/docs/CONTRACTS.md +73 -0
- package/docs/DEPENDENCIES.md +42 -0
- package/docs/DJANGO.md +70 -0
- package/docs/DOTNET.md +114 -0
- package/docs/ENVIRONMENTS.md +52 -0
- package/docs/ESLINT.md +68 -0
- package/docs/EVALUATION.md +124 -0
- package/docs/EXECUTION.md +250 -0
- package/docs/EXTERNAL-ADAPTERS.md +170 -0
- package/docs/EXTERNAL-EVALUATION.md +155 -0
- package/docs/EXTERNAL-RUFF-EVALUATION.md +85 -0
- package/docs/FASTAPI.md +73 -0
- package/docs/FINDING-POLICY.md +67 -0
- package/docs/GO-RACE.md +19 -0
- package/docs/GO-SCOPE.md +63 -0
- package/docs/GOLANGCI-LINT.md +64 -0
- package/docs/GUIDANCE.md +46 -0
- package/docs/IMPACT-MEASUREMENT.md +97 -0
- package/docs/INSTALLATION.md +102 -0
- package/docs/JAVA.md +79 -0
- package/docs/JEST.md +36 -0
- package/docs/JUNIT.md +31 -0
- package/docs/LANGUAGES.md +113 -0
- package/docs/LARAVEL.md +111 -0
- package/docs/MCP-COMPATIBILITY.md +68 -0
- package/docs/MUTATIONS.md +93 -0
- package/docs/MYPY.md +37 -0
- package/docs/NATIVE-CI.md +96 -0
- package/docs/NUXT.md +123 -0
- package/docs/PACK-DISTRIBUTION.md +98 -0
- package/docs/PERFORMANCE.md +71 -0
- package/docs/PEST.md +36 -0
- package/docs/PHPSTAN.md +48 -0
- package/docs/PHPUNIT.md +32 -0
- package/docs/PINT.md +41 -0
- package/docs/PLAN.md +265 -0
- package/docs/PLAYWRIGHT.md +73 -0
- package/docs/POLICY-PACKS.md +106 -0
- package/docs/PRIOR-WORKFLOW-EVALUATION.md +116 -0
- package/docs/PUBLICATION.md +28 -0
- package/docs/PYTEST.md +51 -0
- package/docs/RELEASE.md +115 -0
- package/docs/RENAMING.md +55 -0
- package/docs/REVIEW-EXCHANGE.md +136 -0
- package/docs/RUBY.md +50 -0
- package/docs/RUFF.md +39 -0
- package/docs/RUNTIME-INVENTORY.md +56 -0
- package/docs/RUST.md +74 -0
- package/docs/SARIF.md +64 -0
- package/docs/STATUS.md +530 -0
- package/docs/SWIFT.md +48 -0
- package/docs/TASK-STORAGE.md +141 -0
- package/docs/TOOL-IDENTITY.md +30 -0
- package/docs/TYPESCRIPT-BUILD.md +55 -0
- package/docs/VALIDATION-TASKS.md +119 -0
- package/docs/VITEST.md +36 -0
- package/docs/VUE-ROUTER.md +130 -0
- package/docs/VUE-TSC.md +26 -0
- package/docs/WORKSPACES.md +81 -0
- package/docs/licenses/nodable-entities-3.0.0.txt +21 -0
- package/docs/measurements/client-claude-before-schema-fix-darwin-arm64-node26.json +60 -0
- package/docs/measurements/client-claude-darwin-arm64-node26.json +55 -0
- package/docs/measurements/client-codex-darwin-arm64-node26.json +175 -0
- package/docs/measurements/evaluation-corpus-repo-verifier.json +332 -0
- package/docs/measurements/evaluation-darwin-arm64-node26.json +1236 -0
- package/docs/measurements/evaluation-linux-arm64-node22.json +1236 -0
- package/docs/measurements/external-eslint-darwin-arm64-node26.json +11866 -0
- package/docs/measurements/external-eslint-linux-arm64-node22.json +11866 -0
- package/docs/measurements/external-eslint-preservation.json +1527 -0
- package/docs/measurements/external-ruff-darwin-arm64-node26.json +1031 -0
- package/docs/measurements/external-ruff-linux-arm64-node22.json +1031 -0
- package/docs/measurements/hosted-ci-52ba415.json +1005 -0
- package/docs/measurements/impact-darwin-arm64-node26.json +6685 -0
- package/docs/measurements/impact-linux-arm64-node22.json +6690 -0
- package/docs/measurements/performance-darwin-arm64-node26.json +845 -0
- package/docs/measurements/performance-linux-arm64-node22.json +845 -0
- package/docs/measurements/required-native-profiles.json +500 -0
- package/package.json +72 -0
- package/packs/actionlint.json +8 -0
- package/packs/cpp.json +8 -0
- package/packs/dotnet.json +8 -0
- package/packs/go.json +7 -0
- package/packs/java.json +8 -0
- package/packs/javascript-node.json +7 -0
- package/packs/nuxt.json +7 -0
- package/packs/php-pest.json +7 -0
- package/packs/php-phpunit.json +7 -0
- package/packs/python-pytest.json +7 -0
- package/packs/ruby.json +7 -0
- package/packs/rust.json +7 -0
- package/packs/swift.json +7 -0
- package/packs/vue-router.json +7 -0
- package/packs/vue.json +11 -0
- package/schemas/actionlint-config.schema.json +19 -0
- package/schemas/architecture-policy.schema.json +51 -0
- package/schemas/architecture-report.schema.json +123 -0
- package/schemas/architecture-summary.schema.json +82 -0
- package/schemas/clang-database.schema.json +23 -0
- package/schemas/config.schema.json +69 -0
- package/schemas/contract-bundle.schema.json +78 -0
- package/schemas/contract-report.schema.json +114 -0
- package/schemas/contract-summary.schema.json +72 -0
- package/schemas/dependency-graph.schema.json +65 -0
- package/schemas/django-config.schema.json +16 -0
- package/schemas/dotnet-config.schema.json +60 -0
- package/schemas/external-manifest.schema.json +97 -0
- package/schemas/external-reference.schema.json +10 -0
- package/schemas/external-request.schema.json +56 -0
- package/schemas/external-result.schema.json +111 -0
- package/schemas/fastapi-config.schema.json +27 -0
- package/schemas/finding-baseline.schema.json +92 -0
- package/schemas/finding-comparison-summary.schema.json +95 -0
- package/schemas/finding-comparison.schema.json +121 -0
- package/schemas/guidance-context.schema.json +34 -0
- package/schemas/guidance-report.schema.json +176 -0
- package/schemas/guidance-summary.schema.json +68 -0
- package/schemas/java-config.schema.json +24 -0
- package/schemas/junit.schema.json +69 -0
- package/schemas/laravel-config.schema.json +11 -0
- package/schemas/mutation-recipe.schema.json +31 -0
- package/schemas/mutation-report.schema.json +238 -0
- package/schemas/mutation-summary.schema.json +98 -0
- package/schemas/nuxt-config.schema.json +51 -0
- package/schemas/plan-summary.schema.json +63 -0
- package/schemas/plan.schema.json +244 -0
- package/schemas/policy-pack.schema.json +41 -0
- package/schemas/report-summary.schema.json +100 -0
- package/schemas/report.schema.json +463 -0
- package/schemas/review-assessment.schema.json +133 -0
- package/schemas/review-context-summary.schema.json +31 -0
- package/schemas/review-context.schema.json +254 -0
- package/schemas/review-receipt-summary.schema.json +104 -0
- package/schemas/review-receipt.schema.json +271 -0
- package/schemas/review-selection.schema.json +30 -0
- package/schemas/runtime-comparison-summary.schema.json +68 -0
- package/schemas/runtime-comparison.schema.json +127 -0
- package/schemas/runtime-inventory.schema.json +99 -0
- package/schemas/vue-router-config.schema.json +67 -0
- package/server.json +47 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# External Ruff integration evaluation
|
|
2
|
+
|
|
3
|
+
This cohort checks whether the verifier preserves native Ruff diagnostics on
|
|
4
|
+
externally authored Python fixtures. It does not measure general review quality
|
|
5
|
+
or independently validate Ruff's own rules. The selected fixtures and expected
|
|
6
|
+
snapshots come from Ruff's own test suite.
|
|
7
|
+
|
|
8
|
+
The [declared plan](../scripts/external-ruff-plan.json) freezes the verifier and
|
|
9
|
+
lockfile before source/snapshot inspection. It selects the primary non-preview
|
|
10
|
+
fixture for F401 (unused imports), F821 (undefined names) and F841 (unused local
|
|
11
|
+
variables), with a fixed upstream commit and explicit extraction exclusions.
|
|
12
|
+
Filename resolution from the upstream tree is recorded in that plan. No case was
|
|
13
|
+
replaced after its result was known.
|
|
14
|
+
|
|
15
|
+
## Results and limits
|
|
16
|
+
|
|
17
|
+
The [macOS report](measurements/external-ruff-darwin-arm64-node26.json) and
|
|
18
|
+
[Linux report](measurements/external-ruff-linux-arm64-node22.json) retain the
|
|
19
|
+
expected diagnostics, observations and independently recomputable comparisons.
|
|
20
|
+
Both native Ruff and the frozen verifier match all expected primary diagnostics
|
|
21
|
+
in the three selected files: 15 F401, 13 F821 and 16 F841. Neither run has missing
|
|
22
|
+
or unexpected diagnostics, incomplete results or excluded files.
|
|
23
|
+
|
|
24
|
+
These are three whole files containing mixed constructs, not 44 independent
|
|
25
|
+
labeled programs. There is no separate clean-file denominator. No population
|
|
26
|
+
false-positive rate or confidence interval follows from this sample. Rule code,
|
|
27
|
+
filename, line and start column are compared; message prose, end positions and
|
|
28
|
+
suggested fixes are not. The verifier's normalized findings preserve rule, file
|
|
29
|
+
and line; the harness checks columns using the retained native JSON output.
|
|
30
|
+
|
|
31
|
+
The worker receives only the source root, never the expected diagnostics. Each
|
|
32
|
+
system's operation must preserve the source fingerprint. Native/worker order
|
|
33
|
+
alternates between files. `wallMs` includes process startup and native execution;
|
|
34
|
+
`engineMs` excludes worker import/startup. Preparation and cleanup are outside the
|
|
35
|
+
measurement. Caches, scheduling and platform differences are uncontrolled, so
|
|
36
|
+
these timings are observations rather than a representative overhead estimate.
|
|
37
|
+
No model was called; model tokens and provider cost are zero. Machine and human
|
|
38
|
+
costs are not measured. A prior review-workflow comparison remains separate work.
|
|
39
|
+
|
|
40
|
+
## Reproduction
|
|
41
|
+
|
|
42
|
+
Inputs are pinned by commit, byte length and SHA-256 in the
|
|
43
|
+
[input manifest](../scripts/external-ruff-inputs.json). The preparation helper
|
|
44
|
+
fetches only those public files, verifies every download before creating its
|
|
45
|
+
output directory, and keeps the complete upstream license alongside the files.
|
|
46
|
+
The source and snapshots remain ignored local inputs; public reports contain
|
|
47
|
+
only diagnostic metadata and hashes. Ruff's upstream LICENSE includes its MIT
|
|
48
|
+
license and third-party notices; retain the entire file when reproducing.
|
|
49
|
+
|
|
50
|
+
From a checkout with the declared runtime artifacts and lockfile:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
node scripts/prepare-external-ruff.mjs .checktrail
|
|
54
|
+
node scripts/measure-external-ruff.mjs /prepared/input-directory /prepared/ruff
|
|
55
|
+
node scripts/verify-external-ruff-container.mjs /prepared/input-directory /prepared/linux/ruff
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Preparation needs network access; measurement downloads and installs nothing.
|
|
59
|
+
Use Ruff 0.16.8. The executable must be named `ruff`. This frozen verifier also
|
|
60
|
+
requires `python3` for tool identity; the harness checks that prerequisite before
|
|
61
|
+
measuring any cases. The binary itself can run without Python. An initial
|
|
62
|
+
container lacking Python was rejected during harness preparation and is not
|
|
63
|
+
counted as a code-validation outcome.
|
|
64
|
+
|
|
65
|
+
The macOS executable came from the upstream `ruff-aarch64-apple-darwin.tar.gz`
|
|
66
|
+
release archive, verified against its published SHA-256
|
|
67
|
+
`0ffa53899f2970d24f14fbed8d8265c87180b159b7100794d97a1527dc60fa79`.
|
|
68
|
+
Both reports record their actual executable hashes, runtime versions and harness
|
|
69
|
+
identity. The Linux wrapper uses local immutable image
|
|
70
|
+
`sha256:50acdf79e4b3fcfafb4151579ac00b097382f64190481a1d69399efea05c9fed`,
|
|
71
|
+
prepared using [external-tools.Dockerfile](../scripts/external-tools.Dockerfile).
|
|
72
|
+
It disables networking and mounts the checkout, inputs and Ruff binary read-only.
|
|
73
|
+
The image is local evidence, not a published reproducible image or hosted CI run.
|
|
74
|
+
|
|
75
|
+
The harness rejects a runtime or lockfile that differs from the declaration,
|
|
76
|
+
checks input and harness identities again after measurement, and fails on worker
|
|
77
|
+
crashes rather than interpreting them as code results. Malformed process evidence
|
|
78
|
+
is incomplete; unsupported snapshot contracts remain excluded rows for both
|
|
79
|
+
systems. Tests exercise location/identifier boundaries, duplicate diagnostics,
|
|
80
|
+
incomplete/excluded denominators and reconciliation of both recorded reports.
|
|
81
|
+
|
|
82
|
+
A later verifier revision cannot be silently substituted into this frozen
|
|
83
|
+
cohort. Reuse after implementation changes is regression evidence and must be
|
|
84
|
+
labeled accordingly. See [the ESLint cohort](EXTERNAL-EVALUATION.md) for the
|
|
85
|
+
separate earlier freeze and its preserved artifact.
|
package/docs/FASTAPI.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# FastAPI route inventory profile
|
|
2
|
+
|
|
3
|
+
The opt-in `python.fastapi-routes` check imports an explicitly configured local
|
|
4
|
+
application, enters its native lifespan, captures the flat route table after
|
|
5
|
+
startup, exits the lifespan, and checks exact duplicate protocol/method/path
|
|
6
|
+
registrations. The verified profile is FastAPI 0.141.1 with Starlette 1.6.0 on
|
|
7
|
+
Python 3.12.13 in an isolated Linux container. Other framework versions are
|
|
8
|
+
unavailable until their collector behavior is verified.
|
|
9
|
+
|
|
10
|
+
Select the check in `checktrail.json` and provide this project-local file:
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{
|
|
14
|
+
"schemaVersion": 1,
|
|
15
|
+
"module": "app",
|
|
16
|
+
"attribute": "app",
|
|
17
|
+
"assembly": "catalog-api",
|
|
18
|
+
"environment": "isolated-test"
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Save it as `checktrail.fastapi.json`. `module` must resolve to exactly one
|
|
23
|
+
inventoried Python module or package in that project. `attribute` is a simple
|
|
24
|
+
attribute name, not an expression or a factory invocation. The value must be a
|
|
25
|
+
FastAPI application. Planning validates this configuration without importing it.
|
|
26
|
+
|
|
27
|
+
Execution requires normal operator trust. Import and lifespan code can access
|
|
28
|
+
networks, services and files; configure an isolated test environment and supply
|
|
29
|
+
required environment names through the existing operator permissions. The
|
|
30
|
+
environment label in this profile is descriptive, not a sandbox guarantee. The
|
|
31
|
+
engine does not install packages, run an HTTP server or send HTTP requests.
|
|
32
|
+
|
|
33
|
+
The supported concrete route classes are native FastAPI `APIRoute` and
|
|
34
|
+
`APIWebSocketRoute`, and Starlette `Route` and `WebSocketRoute`. Framework default
|
|
35
|
+
documentation/OpenAPI routes are included, not inferred from application source.
|
|
36
|
+
At least one FastAPI HTTP/WebSocket application route is required. Mounts,
|
|
37
|
+
host-based routing, custom route classes and other arrangements outside this flat
|
|
38
|
+
profile make the capture incomplete. Any known exact duplicate still fails while
|
|
39
|
+
the incomplete runtime collection remains visible.
|
|
40
|
+
|
|
41
|
+
HTTP and WebSocket identities are distinct, even for an HTTP method literally
|
|
42
|
+
named `WEBSOCKET`. Methods and paths match exactly: different HTTP methods, path
|
|
43
|
+
suffixes and trailing slashes are not collapsed. This detects exact duplicate
|
|
44
|
+
registrations only; it does not resolve overlapping path patterns, redirects,
|
|
45
|
+
host constraints or precedence between parameterized and literal routes.
|
|
46
|
+
|
|
47
|
+
Detailed check results include a `runtime` artifact compatible with
|
|
48
|
+
`compareRuntimeInventories`. Capture preserves registration order, multiplicity,
|
|
49
|
+
route names, handler identities, schema visibility and dependency callable
|
|
50
|
+
identities. Each dependency list is a deterministic depth-first traversal. It does
|
|
51
|
+
not include dependency arguments, security scopes, response models, middleware
|
|
52
|
+
state or handler bodies; changes to those require other checks. Completeness
|
|
53
|
+
refers to this declared projection of the flat route table, not all application
|
|
54
|
+
behavior. Summary output omits the inventory and raw application logs.
|
|
55
|
+
|
|
56
|
+
The collector reconciles native route counts with per-entry registration indices
|
|
57
|
+
before accepting an artifact. Unsupported callables, import/startup/shutdown
|
|
58
|
+
failures, malformed evidence and execution limits prevent a pass. Normal stdout
|
|
59
|
+
from application startup/shutdown is redirected to the bounded stderr log so it
|
|
60
|
+
cannot corrupt the structured output. Source and policy fingerprints are verified
|
|
61
|
+
after execution by the shared engine. Check scope names the import entry file;
|
|
62
|
+
this is runtime assembly inspection, not type or syntax checking of all Python.
|
|
63
|
+
|
|
64
|
+
Native fixtures verify correct routes, duplicate registrations, HTTP/WebSocket
|
|
65
|
+
near misses, framework defaults, startup-added duplicates, successful cleanup,
|
|
66
|
+
shutdown failure, a documentation-only app and unsupported mounts. Parser tests
|
|
67
|
+
exercise source/assembly identity, native registration accounting and incomplete
|
|
68
|
+
evidence. Reproduce prepared Linux tests with
|
|
69
|
+
`node scripts/verify-framework-container.mjs`; the pinned preparation requirements
|
|
70
|
+
are in `scripts/framework-tools.requirements.txt`. Hosted CI remains unexecuted.
|
|
71
|
+
|
|
72
|
+
References: [FastAPI lifespan events](https://fastapi.tiangolo.com/advanced/events/),
|
|
73
|
+
[Starlette routing](https://www.starlette.io/routing/).
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Exact finding policy
|
|
2
|
+
|
|
3
|
+
Baselines and exceptions reconcile normalized source findings against a supplied
|
|
4
|
+
validation report. They do not change that report. `outcome` describes policy
|
|
5
|
+
reconciliation; `validationOutcome` retains native validation. A comparison can
|
|
6
|
+
pass while native analysis still fails on explicitly accepted findings.
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
checktrail create-baseline --root /path/to/project --input report.json \
|
|
10
|
+
--owner maintainer --reason "Tracked compatibility work" --detailed > baseline.json
|
|
11
|
+
checktrail compare-findings --root /path/to/project --input report.json \
|
|
12
|
+
--baseline baseline.json --previous-baseline prior-baseline.json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
All input paths are relative to the configured root and use bounded reads with
|
|
16
|
+
path-escape rejection. These commands execute no project code and write only to
|
|
17
|
+
stdout. Baseline creation requires a detailed, internally consistent report with
|
|
18
|
+
conclusive checks and source evidence. The default creation output is a summary;
|
|
19
|
+
`--detailed` emits the artifact. Comparison exits 0 for passed, 1 for failed and
|
|
20
|
+
2 for incomplete. Preserve the validation command's own exit status separately.
|
|
21
|
+
|
|
22
|
+
The library exports `createFindingBaseline(report, {owner, reason, kind?,
|
|
23
|
+
expiresAt?})` and `compareFindings(report, baseline, {previousBaseline?, now?})`.
|
|
24
|
+
Use `kind: "exception"` for explicit exceptions and an ISO UTC `expiresAt` when
|
|
25
|
+
needed. Every entry requires an owner and reason. Expiration at or before the
|
|
26
|
+
comparison clock fails. The CLI currently creates baseline entries; use the
|
|
27
|
+
library or edit the schema-validated artifact to attach exception metadata.
|
|
28
|
+
|
|
29
|
+
An identity includes the exact check, project, native rule, repository-relative
|
|
30
|
+
file, line, severity and SHA-256 of the JSON-encoded diagnostic message. The ID
|
|
31
|
+
hashes that ordered identity. Patterns are never expanded: an asterisk matches
|
|
32
|
+
only a literal asterisk. Moving a finding or changing its message produces a new
|
|
33
|
+
identity and makes the previous entry stale. Identical repeated findings retain
|
|
34
|
+
an exact occurrence count. Forged IDs and duplicate entries are rejected.
|
|
35
|
+
|
|
36
|
+
Each baseline entry is matched, stale, expired, changed in occurrence count, or
|
|
37
|
+
unverified. Those five counts sum to the number of baseline entries. `current`
|
|
38
|
+
and `new` count finding occurrences; `expanded` and `modified` count entries
|
|
39
|
+
relative to a supplied previous baseline. Explicit maximum entry and exception
|
|
40
|
+
counts are enforced. With a previous baseline, added identities, changed review
|
|
41
|
+
metadata and raised limits fail. Removing an entry is allowed, but any surviving
|
|
42
|
+
finding then becomes new. The previous artifact is operator supplied; the engine
|
|
43
|
+
does not fetch it from Git or attest its provenance.
|
|
44
|
+
|
|
45
|
+
Only parsers that establish complete native analysis expose
|
|
46
|
+
`findingsComplete: true` for a failed check. Scope omissions, compile/loading
|
|
47
|
+
errors, unparsed failures and older reports without the marker cannot be waived.
|
|
48
|
+
Test failures cannot be converted into source exceptions. Missing checks and
|
|
49
|
+
unknown tool identities prevent reconciliation from passing. A known policy
|
|
50
|
+
failure takes precedence over incompleteness, while unverified counts remain
|
|
51
|
+
visible. Stale entries fail even when another finding still fails the same check.
|
|
52
|
+
|
|
53
|
+
`sourceVerified` means the supplied report records matching before/after source
|
|
54
|
+
fingerprints without a source error. It does **not** mean comparison inspected
|
|
55
|
+
current files, nor that an imported artifact is authentic. Obtain a fresh run
|
|
56
|
+
when freshness matters. Fingerprint exclusions still apply.
|
|
57
|
+
|
|
58
|
+
MCP `finding_comparison` accepts a retained `runId`, local `baseline` and optional
|
|
59
|
+
`previousBaseline`. It cannot change root, trust, detail mode or clock. Summary
|
|
60
|
+
output omits finding identities, paths and messages; detailed output includes
|
|
61
|
+
entry IDs and statuses. The bounded in-memory report store still expires on
|
|
62
|
+
restart. Baseline files are local policy artifacts and can contain project paths.
|
|
63
|
+
|
|
64
|
+
Synthetic tests cover native ESLint findings, partial repairs, near-miss IDs,
|
|
65
|
+
occurrence counts, stale/expired entries, limits, expansion, missing/partial
|
|
66
|
+
evidence, CLI artifacts and MCP boundaries. Baselines do not claim semantic
|
|
67
|
+
equivalence when source or native diagnostic wording changes.
|
package/docs/GO-RACE.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Go race checking
|
|
2
|
+
|
|
3
|
+
Select `go.test-race` explicitly. It runs `go test -race -json -count=1 ./...`
|
|
4
|
+
with cgo enabled, automatic toolchain/dependency downloads disabled, and module
|
|
5
|
+
edits disabled. The race detector writes to captured stderr and keeps its failing
|
|
6
|
+
exit status. Native JSON evidence still requires completed, non-skipped tests.
|
|
7
|
+
Defaults remain gofmt, vet and ordinary uncached tests; race instrumentation adds
|
|
8
|
+
cost and requires the operator to select this check.
|
|
9
|
+
|
|
10
|
+
The native fixture runs two workers repeatedly updating one shared counter. The
|
|
11
|
+
unprotected version must fail with an actual `DATA RACE` diagnostic; atomic
|
|
12
|
+
updates must pass and yield the exact combined count. A passing run cannot
|
|
13
|
+
establish freedom from races on paths it did not execute. Native package/file evidence now makes excluded source and untested packages
|
|
14
|
+
incomplete; see [Go scope](GO-SCOPE.md). A build/OS matrix is not implemented.
|
|
15
|
+
|
|
16
|
+
A supported Go race platform and C compiler are required. Compilation and runtime
|
|
17
|
+
errors are retained in detailed output; no compiler, library or toolchain is
|
|
18
|
+
installed automatically. See the official [Go race detector documentation](https://go.dev/doc/articles/race_detector)
|
|
19
|
+
for requirements and runtime coverage limits.
|
package/docs/GO-SCOPE.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Go scope and Staticcheck
|
|
2
|
+
|
|
3
|
+
`go.vet`, `go.test`, `go.test-race` and `go.staticcheck` first run native
|
|
4
|
+
`go list -json ./...`. A passing result requires the union of native Go, cgo and
|
|
5
|
+
internal/external test source files to exactly match the inventoried Go files.
|
|
6
|
+
Malformed package output, missing packages, duplicate/unexpected files and load
|
|
7
|
+
errors prevent completeness. Real diagnostic/test failures retain their failure
|
|
8
|
+
status even when scope is incomplete.
|
|
9
|
+
|
|
10
|
+
Files excluded by build tags, OS/architecture suffixes or Go directory conventions
|
|
11
|
+
remain unverified. The current policy has no build-matrix or per-file exception
|
|
12
|
+
contract, so such projects are conservatively incomplete. This includes intentional
|
|
13
|
+
`testdata` Go files if they are inventoried but not compiled. Do not treat that as
|
|
14
|
+
a source defect or remove valid platform-specific code to obtain a passing run.
|
|
15
|
+
|
|
16
|
+
Test checks additionally require a passing native test in every selected package.
|
|
17
|
+
An untested package, or one containing only skipped tests, cannot borrow evidence
|
|
18
|
+
from a tested sibling. This proves package participation, not statement/branch
|
|
19
|
+
coverage or assertion quality. Formatting still checks all inventoried Go files
|
|
20
|
+
directly and does not require package selection.
|
|
21
|
+
|
|
22
|
+
Go commands use `GOPROXY=off`, `GOTOOLCHAIN=local`, `GOFLAGS=-mod=readonly`,
|
|
23
|
+
`GOWORK=off`, `GOENV=off` and an empty `GOCACHEPROG`. This keeps module validation
|
|
24
|
+
independent of a surrounding workspace, persisted Go settings and custom cache
|
|
25
|
+
programs. Cross-module workspace builds need a separate explicit profile. Native
|
|
26
|
+
compiler/analyzer caches may be used; test result caching remains disabled.
|
|
27
|
+
Dependencies and toolchains must be prepared separately.
|
|
28
|
+
|
|
29
|
+
## Staticcheck
|
|
30
|
+
|
|
31
|
+
Select `go.staticcheck` explicitly. It requires the installed `staticcheck`
|
|
32
|
+
executable on the operator PATH. It runs with JSON diagnostics, all checks,
|
|
33
|
+
test analysis, failure for all diagnostics, and surfaced ignored diagnostics.
|
|
34
|
+
The command-level check selection overrides project `checks = ["-all"]`; inline
|
|
35
|
+
ignored findings are retained as notes and still fail validation. Configured
|
|
36
|
+
exact finding exceptions and baseline reconciliation are available separately in
|
|
37
|
+
`FINDING-POLICY.md`; native source-suppression interpretation remains tool-specific.
|
|
38
|
+
|
|
39
|
+
Normalized diagnostics carry native rule IDs and root-relative file/line evidence
|
|
40
|
+
and can be exported to SARIF. Compiler diagnostics fail without inventing a source
|
|
41
|
+
finding; malformed configuration/runtime errors are incomplete. Successful empty
|
|
42
|
+
diagnostic output requires complete native package evidence and tool identity.
|
|
43
|
+
|
|
44
|
+
Native evidence currently covers Go 1.27.1 and Staticcheck 2026.2.1 (module v0.8.1)
|
|
45
|
+
on macOS arm64. Synthetic fixtures include a discarded pure-function result, its
|
|
46
|
+
returned-value fix, disabled rule configuration, inline suppression, malformed
|
|
47
|
+
configuration, excluded files, package test participation and native race checks.
|
|
48
|
+
Hosted CI and other OS/tool combinations still require their own runs.
|
|
49
|
+
|
|
50
|
+
Prepare the pinned development tool explicitly:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
mkdir -p .checktrail/go-tools/bin
|
|
54
|
+
GOBIN="$PWD/.checktrail/go-tools/bin" go install honnef.co/go/tools/cmd/staticcheck@v0.8.1
|
|
55
|
+
npm run build
|
|
56
|
+
node --test dist/test/go-scope.test.js dist/test/staticcheck.test.js
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Preparation may download dependencies. Validation never performs that installation.
|
|
60
|
+
|
|
61
|
+
References: [Go package listing](https://pkg.go.dev/cmd/go#hdr-List_packages_or_modules),
|
|
62
|
+
[Staticcheck CLI](https://staticcheck.dev/docs/running-staticcheck/cli/),
|
|
63
|
+
[Staticcheck source](https://github.com/dominikh/go-tools/tree/v0.8.1).
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Configured golangci-lint profile
|
|
2
|
+
|
|
3
|
+
Select `go.golangci-lint` with exactly one project-local `.golangci.yml`,
|
|
4
|
+
`.golangci.yaml` or `.golangci.json`. This initial profile verifies golangci-lint
|
|
5
|
+
2.13.2 and supports selection of `errcheck`, `govet`, `ineffassign`, `staticcheck`
|
|
6
|
+
and `unused`, using their native defaults. Choose `standard` or `none` for the
|
|
7
|
+
default group, with explicit enable/disable lists. The always-on native type
|
|
8
|
+
checker does not count as an enabled configured linter.
|
|
9
|
+
|
|
10
|
+
```yaml
|
|
11
|
+
version: "2"
|
|
12
|
+
linters:
|
|
13
|
+
default: none
|
|
14
|
+
enable: [govet, staticcheck, unused]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Other linters, nonempty custom settings, formatters and Go build-version/tag
|
|
18
|
+
profiles are incomplete until separately verified. This is deliberately a
|
|
19
|
+
constrained profile, not support for every golangci-lint configuration. YAML
|
|
20
|
+
duplicates, unsupported tags and excessive aliases are rejected. Planning only
|
|
21
|
+
discovers the local config and source; parsing/native execution occurs with trust.
|
|
22
|
+
|
|
23
|
+
The wrapper creates a temporary native configuration retaining linter selection.
|
|
24
|
+
It disables fixes, change-only filtering, exclusion presets/paths/rules, generated
|
|
25
|
+
file exclusion, issue-count limits and line deduplication. It forces test analysis,
|
|
26
|
+
read-only module resolution, absolute JSON locations and no extra output files.
|
|
27
|
+
Output and native analyzer cache use a fresh temporary directory, removed after
|
|
28
|
+
normal completion. Existing project config and output paths are not rewritten.
|
|
29
|
+
Native Go source accounting follows [the shared contract](GO-SCOPE.md).
|
|
30
|
+
|
|
31
|
+
Native `nolint` and Staticcheck ignore directives are currently unsupported and
|
|
32
|
+
make the check incomplete. The wrapper scans Go comment boundaries, including
|
|
33
|
+
quoted/raw-string handling; matching text in strings or unrelated comments does
|
|
34
|
+
not count as a suppression. A future exception policy must reconcile actual
|
|
35
|
+
findings before these directives can be accepted. Tests and native tools remain
|
|
36
|
+
trusted executable code, without a sandbox guarantee.
|
|
37
|
+
|
|
38
|
+
Passing requires native JSON, at least one supported configured linter, no
|
|
39
|
+
diagnostics or warnings, and complete package/file evidence. Diagnostics become
|
|
40
|
+
normalized findings and fail. Unknown/duplicate active linters, omitted source,
|
|
41
|
+
malformed evidence, runtime/configuration errors or missing tools are incomplete.
|
|
42
|
+
|
|
43
|
+
Native synthetic tests cover a discarded return value and its fix; clean source;
|
|
44
|
+
configured issue filtering/fixing/output paths; no active linters; rejected custom
|
|
45
|
+
settings; real and literal suppression text; excluded Go source; and malformed
|
|
46
|
+
YAML. The suite verifies original source bytes and absent output artifacts.
|
|
47
|
+
Current evidence is Go 1.27.1 / golangci-lint 2.13.2 on macOS arm64.
|
|
48
|
+
|
|
49
|
+
Development preparation is separate from validation:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
mkdir -p .checktrail/go-tools/bin
|
|
53
|
+
GOBIN="$PWD/.checktrail/go-tools/bin" go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.2
|
|
54
|
+
npm run build
|
|
55
|
+
node --test dist/test/golangci.test.js
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Preparation may download dependencies. Consumer validation requires an installed
|
|
59
|
+
binary on the operator PATH and never installs it. The hosted profile passed
|
|
60
|
+
at `52ba415`; see `NATIVE-CI.md`.
|
|
61
|
+
|
|
62
|
+
References: [CLI](https://golangci-lint.run/docs/configuration/cli/),
|
|
63
|
+
[configuration](https://golangci-lint.run/docs/configuration/file/),
|
|
64
|
+
[verified source version](https://github.com/golangci/golangci-lint/tree/v2.13.2).
|
package/docs/GUIDANCE.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Advisory review guidance
|
|
2
|
+
|
|
3
|
+
`guidance`, `retrieveGuidance()` and MCP `review_guidance` retrieve built-in review
|
|
4
|
+
questions. They do not run project code, call a model, fetch references, inspect
|
|
5
|
+
behavior or produce automated findings. Every response has `channel: advisory`
|
|
6
|
+
and `automatedCoverage: false`; it has no validation outcome. An empty selection
|
|
7
|
+
means no catalogue trigger matched, not that the project needs no review.
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
node dist/src/cli.js guidance --root examples/javascript
|
|
11
|
+
node dist/src/cli.js guidance --root examples/javascript --topic package-consumers --detailed
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Normal CLI/MCP retrieval plans the project without execution and selects questions
|
|
15
|
+
by exact check IDs. Explicit topics add guidance. Each item matches if at least
|
|
16
|
+
one check or topic matches; overlap returns the item once. Selection is ordered
|
|
17
|
+
by the bundled catalogue. It is a deterministic lookup, not relevance ranking or
|
|
18
|
+
source-code analysis. The catalogue's content digest and each item's version
|
|
19
|
+
identify the actual guidance used.
|
|
20
|
+
|
|
21
|
+
Available topics: `test-lifecycle`, `analysis-scope`, `package-consumers`,
|
|
22
|
+
`python-imports`, `framework-assembly`, `execution-depth`. Guidance contains public
|
|
23
|
+
references for further reading; those references are not claims that a selected
|
|
24
|
+
project has a defect. Framework-specific references can illustrate a question
|
|
25
|
+
whose application must be checked against the actual framework.
|
|
26
|
+
|
|
27
|
+
Library callers can supply `{ schemaVersion: 1, checks: [], topics: [] }` directly.
|
|
28
|
+
CLI `--input context.json` uses the same bounded schema and cannot be combined
|
|
29
|
+
with `--topic`. Such inputs are declarations, not evidence that checks ran.
|
|
30
|
+
Unknown well-formed check IDs match nothing; unknown topics, duplicate identifiers,
|
|
31
|
+
unknown keys and oversized contexts fail. Input is capped at 16 KiB, 100 check IDs
|
|
32
|
+
and 16 topics. No repository-supplied prose or executable guidance packs are loaded.
|
|
33
|
+
|
|
34
|
+
Summary output includes the public question text, IDs, versions and references.
|
|
35
|
+
It omits context and matched triggers. Detailed output includes both. Neither
|
|
36
|
+
projection includes source excerpts, file paths or logs. Which questions were
|
|
37
|
+
selected can still reveal aspects of a project's tooling.
|
|
38
|
+
|
|
39
|
+
Native CLI and MCP tests verify execution-free retrieval, exact prefix/suffix
|
|
40
|
+
boundaries, deterministic selection, non-mutable catalogue state and output
|
|
41
|
+
controls. These are retrieval correctness tests. They do not establish improved
|
|
42
|
+
review quality, defect detection rates or equivalence to another review workflow.
|
|
43
|
+
|
|
44
|
+
For a selected-source context and an externally produced assessment, use the
|
|
45
|
+
separate [review exchange](REVIEW-EXCHANGE.md). It reuses this catalogue but does
|
|
46
|
+
not convert guidance or reviewer prose into automated findings.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Measuring Git selection impact
|
|
2
|
+
|
|
3
|
+
The impact harness compares a full validation run with Git-selected validation on
|
|
4
|
+
the same source snapshot and project policy. It measures whether failing checks
|
|
5
|
+
are retained, which checks are omitted, disagreement between shared checks and
|
|
6
|
+
the actual execution cost. This is a post-implementation synthetic development
|
|
7
|
+
evaluation, not held-out evidence or a proof that a consumer's graph is complete.
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm run build
|
|
11
|
+
node scripts/measure-impact.mjs > impact.json
|
|
12
|
+
node scripts/verify-impact-container.mjs > impact-linux.json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Run these measurements sequentially without other test/build workloads. The
|
|
16
|
+
container helper requires prepared, digest-pinned Node and Composer images; it
|
|
17
|
+
copies the Node executable into private temporary storage and mounts it read-only
|
|
18
|
+
alongside the checkout. The Composer image supplies Git. Measurement containers
|
|
19
|
+
have external networking disabled. No project or dependency installation occurs
|
|
20
|
+
during the measured operations.
|
|
21
|
+
|
|
22
|
+
## Cases and checks
|
|
23
|
+
|
|
24
|
+
`scripts/impact-corpus.json` freezes original case labels and expected selection
|
|
25
|
+
before measurement. `scripts/impact-fixture.mjs` creates temporary repositories
|
|
26
|
+
with fictional identities and a native Node test in each project:
|
|
27
|
+
|
|
28
|
+
- `core` exports a value; `service` re-exports it; `web` consumes that export.
|
|
29
|
+
Service and web assertions check the value. Core only asserts its numeric type,
|
|
30
|
+
deliberately making consumer coverage necessary for detecting a wrong number.
|
|
31
|
+
- `utility` has an independent value contract.
|
|
32
|
+
- `other` reads a root settings file and an unowned shared module, exercising
|
|
33
|
+
conservative global fallback when either input changes.
|
|
34
|
+
|
|
35
|
+
Cases cover a broken and valid producer edit, a leaf assertion defect, an
|
|
36
|
+
independent defect, simultaneous changed owners, an explicitly incomplete graph,
|
|
37
|
+
root/unowned changes, no changes and a deliberately misdeclared graph. Dependency
|
|
38
|
+
edges are ordered against the transitive chain so closure must revisit them.
|
|
39
|
+
The engine receives only the root and immutable synthetic base commit; expected
|
|
40
|
+
labels are never passed to the worker.
|
|
41
|
+
|
|
42
|
+
Every case first runs an unchanged full baseline and requires every native test to
|
|
43
|
+
pass. After applying the edit, the harness runs fresh full and selected workers in
|
|
44
|
+
alternating order, with repeated pairs. It verifies exact project sets, outcomes,
|
|
45
|
+
positive test counts and named native assertion failures. An unrelated runtime
|
|
46
|
+
failure does not count as the intended contract defect. Source and policy
|
|
47
|
+
fingerprints must match across each pair, and source plus harness/runtime/corpus
|
|
48
|
+
identities must remain unchanged throughout measurement.
|
|
49
|
+
|
|
50
|
+
## What the observations mean
|
|
51
|
+
|
|
52
|
+
The [macOS/Node 26 observations](measurements/impact-darwin-arm64-node26.json) and
|
|
53
|
+
[Linux/Node 22 observations](measurements/impact-linux-arm64-node22.json) agree on
|
|
54
|
+
selection and assertion outcomes in this corpus. Correct declarations retained
|
|
55
|
+
the observed failing consumers. The explicit incomplete declaration retained the
|
|
56
|
+
full run. Global and unowned changes also retained full validation.
|
|
57
|
+
|
|
58
|
+
The deliberately misdeclared graph omitted the service-to-core dependency while
|
|
59
|
+
asserting `complete: true`. Git selection ran only core and passed; full validation
|
|
60
|
+
found the service and web assertions failing. The measurement retains this case
|
|
61
|
+
and its missed failures in a separate group. This demonstrates a real limitation:
|
|
62
|
+
selection relies on the maintainer's declared dependency graph and does not infer
|
|
63
|
+
or verify every native import. Use full validation when that assertion cannot be
|
|
64
|
+
supported. No confidence in graph completeness follows from a passing selected run.
|
|
65
|
+
|
|
66
|
+
Each summary reconciles full failures into retained failures, omitted failures and
|
|
67
|
+
changed results among checks run by both modes. Unexpected failures and incomplete
|
|
68
|
+
check executions are reported separately. All expected case/repetition pairs must
|
|
69
|
+
exist exactly once; malformed, missing or duplicate observations fail validation.
|
|
70
|
+
Raw check/test/assertion evidence remains alongside the aggregates. Replacing
|
|
71
|
+
transitive closure with a single edge pass was manually verified to omit web and
|
|
72
|
+
fail the native consumer regression; the original code was restored and the test
|
|
73
|
+
passed again. Snapshot tests
|
|
74
|
+
recompute metrics and match the frozen corpus instead of trusting copied totals.
|
|
75
|
+
|
|
76
|
+
## Timing and provenance
|
|
77
|
+
|
|
78
|
+
Reports record raw full/selected wall time, worker engine time, engine CPU and peak
|
|
79
|
+
RSS, native Node/Git identities, source/policy fingerprints and hashes of the corpus,
|
|
80
|
+
harness, compiled engine artifacts and package lock. The report omits source text,
|
|
81
|
+
raw native logs, absolute paths and temporary worktree identities. SHA-256 identifies
|
|
82
|
+
the measured build; it does not attest a publisher or pin every system library.
|
|
83
|
+
|
|
84
|
+
`wallMs` includes fresh worker startup/import and native execution. `engineMs` starts
|
|
85
|
+
after worker imports. Engine CPU/RSS excludes native child resource use. Fixture
|
|
86
|
+
creation, baseline preparation and cleanup are outside paired timings; baseline
|
|
87
|
+
run measurements are stored separately. Git inspection has an execution cost, so
|
|
88
|
+
fewer checks do not by themselves demonstrate reduced latency. The fixtures have
|
|
89
|
+
small tests and are not representative of production suites.
|
|
90
|
+
|
|
91
|
+
Repetitions are repeated observations of the same defects, not additional
|
|
92
|
+
independent defect cases. Summary retention fractions use check executions and
|
|
93
|
+
show their denominators; timing ratios are descriptive sums, not confidence
|
|
94
|
+
intervals or promised speedups. Filesystem caches and host scheduling remain
|
|
95
|
+
uncontrolled. macOS/Linux observations are separate environment profiles, not an
|
|
96
|
+
isolated operating-system comparison. No prior private workflow, model tokens,
|
|
97
|
+
provider cost or independent held-out corpus is measured here.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Install the preview
|
|
2
|
+
|
|
3
|
+
The first preview version is `0.1.0-alpha.1`, intended for npm's `next` tag.
|
|
4
|
+
Check the [npm package page](https://www.npmjs.com/package/@stsepelin/checktrail)
|
|
5
|
+
for availability. The registry commands below require that version to be published;
|
|
6
|
+
before publication, use the source checkout or a reviewed local tarball.
|
|
7
|
+
|
|
8
|
+
Use Node.js 22 or newer on macOS or Linux. Windows execution is not supported.
|
|
9
|
+
Install each project's compilers, linters and test runners separately; Checktrail
|
|
10
|
+
does not download them. Missing tools produce incomplete results.
|
|
11
|
+
|
|
12
|
+
## CLI
|
|
13
|
+
|
|
14
|
+
Install the exact version once:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install --global --ignore-scripts @stsepelin/checktrail@0.1.0-alpha.1
|
|
18
|
+
checktrail --version
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
From the project you want to inspect:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
checktrail plan --root "$PWD" --detailed
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Planning only reads files. To execute checks on a project you trust:
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
checktrail run --root "$PWD" --trust-project --detailed
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Exit `0` means the selected checks passed, `1` means at least one failed, and `2`
|
|
34
|
+
means evidence is incomplete, execution is untrusted, or input is invalid. A passing
|
|
35
|
+
result covers only the checks and files listed in the report. Native checks run
|
|
36
|
+
with your user privileges; the tool is not a sandbox.
|
|
37
|
+
|
|
38
|
+
## Claude Code
|
|
39
|
+
|
|
40
|
+
From the project directory, register a read-only server scoped to that project:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
claude mcp add --transport stdio --scope local checktrail -- \
|
|
44
|
+
checktrail serve --root "$PWD"
|
|
45
|
+
claude mcp get checktrail
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Restart the client if it is already running. Ask it to call `validation_plan` to
|
|
49
|
+
inspect the selected checks. The tested Claude Code surface is connection and
|
|
50
|
+
tool discovery; model-driven tool use is not part of the recorded measurement.
|
|
51
|
+
|
|
52
|
+
## Codex CLI
|
|
53
|
+
|
|
54
|
+
From the project directory:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
codex mcp add checktrail -- checktrail serve --root "$PWD"
|
|
58
|
+
codex mcp get checktrail
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The server configuration is saved in your Codex configuration. Its root is the
|
|
62
|
+
absolute directory captured when you run this command. Use a different server
|
|
63
|
+
name for another project rather than expecting the root to follow your working
|
|
64
|
+
directory. Restart an existing client session to load the configuration.
|
|
65
|
+
|
|
66
|
+
Both clients need `checktrail` on their PATH. If the client cannot find it,
|
|
67
|
+
use the absolute executable path reported by `command -v checktrail` in place
|
|
68
|
+
of the second `checktrail` in the registration command. The first is the server
|
|
69
|
+
name. Existing client policies may restrict which MCP servers can run.
|
|
70
|
+
|
|
71
|
+
## Enable validation execution
|
|
72
|
+
|
|
73
|
+
The examples above disable execution. To run tests and tools, remove the read-only
|
|
74
|
+
entry (`claude mcp remove --scope local checktrail` or
|
|
75
|
+
`codex mcp remove checktrail`) and repeat its registration command with
|
|
76
|
+
`--allow-execution` after the root argument. Only enable this for a trusted project.
|
|
77
|
+
An MCP tool call cannot grant itself this permission.
|
|
78
|
+
|
|
79
|
+
Summary output is the default. Add `--detailed` to the server command only when
|
|
80
|
+
the client may receive file paths, commands and raw diagnostics. An MCP client
|
|
81
|
+
may forward the returned information to its model provider.
|
|
82
|
+
|
|
83
|
+
Validation uses asynchronous calls and supports cancellation. Standard MCP Tasks
|
|
84
|
+
is not advertised; the durable worker is a separate library API. See
|
|
85
|
+
[client coverage](CLIENTS.md) and [MCP compatibility](MCP-COMPATIBILITY.md).
|
|
86
|
+
|
|
87
|
+
## Before npm publication
|
|
88
|
+
|
|
89
|
+
Build the public source checkout:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
git clone https://github.com/stsepelin/checktrail.git
|
|
93
|
+
cd checktrail
|
|
94
|
+
npm ci --ignore-scripts
|
|
95
|
+
npm run build
|
|
96
|
+
node dist/src/cli.js plan --root examples/javascript --detailed
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For a reviewed local package, replace the registry package argument in the install
|
|
100
|
+
command with the absolute path to its `.tgz` file. The package's release review
|
|
101
|
+
supplies its SHA-256; verify it before installing. This installs the same CLI and
|
|
102
|
+
MCP entry point without requiring npm publication.
|