diff --git a/.gitattributes b/.gitattributes index 5414973..a765441 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,6 @@ benchmarks/prospective-review-v1/*/licenses/* -text benchmarks/path-audit-v1/** -text benchmarks/cursor-native-v1/** -text +benchmarks/path-check-v2/** -text +benchmarks/path-check-v2/*.json whitespace=cr-at-eol +benchmarks/path-check-v2/collected/*.json whitespace=cr-at-eol diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f2bade..1e5f4be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,6 +123,31 @@ jobs: if-no-files-found: error retention-days: 7 + path_development: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-python@v7 + with: + python-version: "3.12" + - run: python -m pip install . + - name: Replay verified public source facts with the installed current build + shell: bash + run: | + python scripts/run_path_regression_check.py --python "$(which python)" \ + --output "$RUNNER_TEMP/path-regression.json" --markdown "$RUNNER_TEMP/path-regression.md" + - name: Retain completed path observations even when a contract fails + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: path-development-replay + path: | + ${{ runner.temp }}/path-regression.json + ${{ runner.temp }}/path-regression.md + if-no-files-found: warn + retention-days: 14 + score_history: if: github.event_name == 'pull_request' uses: ./.github/workflows/score-history.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fbf6e1..6c93907 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ ## Unreleased +- Avoid missing-path warnings for narrowly declared generated outputs while + retaining checks on generator paths, Markdown links, commands and credentials. +- Check single-backtick directory references with `./` or `../` and a trailing `/` against concrete + repository/scope bases. Require a directory; retain the extensionless-name + and package-suffix boundaries. +- Add an offline installed-build replay of the known Vitest generated-output + case and directory-removal controls, separate from new-source smoke and + external user feedback. The published v0.26.1 results remain unchanged. + ## v0.26.1 - Use public absolute URLs for the packaged overview's coverage and design links. diff --git a/README.md b/README.md index 7178fe2..e0e9f2d 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,13 @@ merged PR, where both scores stay 100. instruction usefulness, semantic correctness or safety. [Read the score contract and limitations.](https://github.com/LE0-Lin/AgentConfigScore/blob/main/docs/limitations.md) +[Read a public-source case study](https://github.com/LE0-Lin/AgentConfigScore/blob/main/docs/path-case-study.md): +a generated-file false positive, explicit directory checks, and a failing +development replay that caught a new warning before merge. The new path +behavior is currently unreleased source, with retained before/after evidence. +The [feedback-to-delivery map](https://github.com/LE0-Lin/AgentConfigScore/blob/main/docs/feedback-to-delivery.md) +connects a public maintainer request to implemented features and their limits. + ## What it helps you review | Change | Review evidence | diff --git a/README.simplified.md b/README.simplified.md index 2d8e3ee..a6433f9 100644 --- a/README.simplified.md +++ b/README.simplified.md @@ -1,5 +1,7 @@ # AgentConfigScore +[真实文档案例](docs/path-case-study.md):生成文件误报的修复、目录检查的新增覆盖,以及真实文档复跑如何拦住一次新误报。新路径逻辑目前在未发布源码中,报告保留修复前后的证据。 + [English](README.md) | 简体中文 | [繁體中文](README.traditional.md) 在合并前发现 AI 编程助手指令中的已知退化。 diff --git a/README.traditional.md b/README.traditional.md index 094cab1..c9db31e 100644 --- a/README.traditional.md +++ b/README.traditional.md @@ -1,5 +1,7 @@ # AgentConfigScore +[真實文件案例](docs/path-case-study.md):產生檔案誤報的修復、目錄檢查的新增涵蓋,以及真實文件重跑如何攔下一次新誤報。新路徑邏輯目前在未發佈原始碼中,報告保留修復前後的證據。 + [English](README.md) | [简体中文](README.simplified.md) | 繁體中文 在合併前發現 AI 程式開發助手指令中的已知退化。 diff --git a/benchmarks/README.md b/benchmarks/README.md index f07eacd..4f49ce5 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -20,6 +20,13 @@ not a complete attachment trace or independent accuracy estimate. None of these workflows claims that A 100 means semantic prompt quality. +The [path-fix development replay](path-check-v2/README.md) separately compares +the unchanged published v0.26.1 observations with the corrected source build. +It retains the generated-output fix, eight removal controls, an introduced +directory false positive caught before merge, and the subsequent passing run. +A separate fixed new-source registry produced zero eligible path candidates; +no fresh correctness estimate or external-user feedback is claimed. + ## AI comparison status **No independent AI comparison has been completed.** A repository script now diff --git a/benchmarks/path-check-v2/README.md b/benchmarks/path-check-v2/README.md new file mode 100644 index 0000000..cd91909 --- /dev/null +++ b/benchmarks/path-check-v2/README.md @@ -0,0 +1,114 @@ +# Path checks: bounded fixes and reproducible evidence + +This is **development evidence**, separate from external user feedback or +independent accuracy. The changed runtime is an unreleased source build. The +published v0.26.1 reports and its 474-case benchmark remain unchanged. + +## Actual problems addressed + +Vitest's pinned `AGENTS.md:201` explicitly says that +`docs/.vitepress/contributor-names.json` is generated by `pnpm docs:contributors`. +The [retained producer context](../path-audit-v1/posthoc-context.json) links that +command to `scripts/update-contributors.ts`, whose write target matches the +declared file. The original published scanner nevertheless warned about its +absence from the unbuilt Git checkout. + +The fix recognizes a complete, immediate generated-output declaration. It +still checks the generator's own path, actual Markdown links, dangerous commands +and credential shapes. It trusts the declared output role, not its truthfulness; +it does not build the project or interpret arbitrary prose. + +The earlier audit also exposed five misses when existing directory targets were +independently removed from verified path projections. Four use a quoted literal +with a trailing slash. The final rule requires an explicit `./` or `../` prefix +as well, so unprefixed spellings stay unresolved. Separate synthetic variants +add `./` before removing the target to test the explicit spelling. `test/unit`, which has no trailing slash, remains a +documented heuristic boundary. The [full grammar and scope](../../docs/limitations.md#plain-prose-path-references) +includes package ambiguity, aliases, examples and filesystem limits. + +The first installed Linux replay failed its acceptance gate: the new directory +check incorrectly treated Vitest's bare `dist/` package-export/build-output +reference at line 67 as a required root directory. A diagnostic rerun of that +failing implementation is retained in [first-attempt.json](first-attempt.json), +not recounted as a passing run. A +follow-up narrows the rule so bare build-output names remain unasserted, while +explicit root/package paths still receive checks. This parser change occurred +after the fresh collection, so later reports correctly show a source-freeze +mismatch; the collection is now development replay material. That intermediate +version detected 7/8 unchanged-text controls, but its whole-document observations +also added warnings for package `lib/` outputs and Husky's install-time directory. +The intermediate [broad-directory attempt](broad-directory-attempt.json) is +retained. The final rule uses explicit relative spellings instead of a growing +list of guessed output-directory exemptions. + +## Completed result + +The final installed Linux CI replay is identified in [artifact/source identities](evidence.json). +[Readable results](result.md), [full JSON](result.json) +and [artifact/source identities](evidence.json) are retained here. + +| Development observation | Published v0.26.1 | Changed source | +|---|---|---| +| Vitest's declared generated contributor file | Warning | No warning | +| Eight separately removed tracked targets, original wording | 3 detected | 3 detected | +| Original 16 selected natural occurrences | 0 flagged | 0 flagged | + +Four separate explicit-directory variants add `./` to the selected literal, +then remove the target. They are reported separately from unchanged-source +controls. The five original ambiguous directory spellings remain outside the +default rule. These are development fixtures and correlated occurrences, not a +real-world accuracy percentage or upstream defects. Whole-document observations +are retained so selected-case counts cannot hide new unselected warnings. + +## Replay, retain and inspect + +The runner preserves the original source text, Git identities, old findings and +unfavorable controls. It compares current installed-source observations with +the frozen v0.26.1 results, without rewriting the original audit. + +On Linux with a case-sensitive filesystem, from this checkout: + +```bash +python -m pip install . +python scripts/run_path_regression_check.py --python /absolute/path/to/python \ + --output path-regression.json --markdown path-regression.md +``` + +Both outputs must be new. The current installed build is identified by a complete +source fingerprint, because the unchanged version string does not distinguish +unreleased code from PyPI v0.26.1. Git-verified path names are materialized as +empty regular files, plus exact selected instruction bytes; this is not a full +checkout, native discovery or evidence about upstream program behavior. Nothing +from the upstream project is installed, built or executed. + +Exit 0 means known development contracts passed; 1 means the replay completed +but a contract failed; 2 means an operational failure. The fresh, unlabeled +source observations are excluded from this gate. Partial outputs after a write +failure do not constitute completed evidence. CI retains both files as the +`path-development-replay` artifact. + +## Separate new-source collection: no eligible path sample + +The parser was frozen in commit `4b8ebc0` before the fixed three-repository +[protocol](protocol.json) was used for read-only acquisition. The +[collection](collected/collection.json) retains all outcomes: + +- `astral-sh/uv`: reported license identifier fell outside the fixed allowlist; + excluded without concluding that it lacks an open-source license. +- `pydantic/pydantic`: a regular instruction document and verified tree were + collected, but the registered candidate grammar selected zero paths. +- `fastapi/fastapi`: neither registered root instruction filename was present. + +There are **zero eligible new path cases**. The exclusions were not replaced, +and no fresh correctness or accuracy result is claimed. Collected instruction +and license bytes remain unchanged. Later parser revisions may replay this +collection as development material; the report explicitly records whether the +parser still matches the original source freeze. + +## Evidence still missing + +No external maintainer has been asked to validate these interpretations. This +work establishes a reproducible fix to our scanner on public inputs, with +separate removal controls. Independent reference annotation, a matched AI +comparison and sustained use by external users remain unavailable. No amount +of replaying these known cases substitutes for those forms of evidence. diff --git a/benchmarks/path-check-v2/broad-directory-attempt.json b/benchmarks/path-check-v2/broad-directory-attempt.json new file mode 100644 index 0000000..ac4904d --- /dev/null +++ b/benchmarks/path-check-v2/broad-directory-attempt.json @@ -0,0 +1,956 @@ +{ + "schema_version": 1, + "status": "completed_development_replay", + "completed_at_utc": "2026-11-13T16:59:50.330866+00:00", + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "05aba10317dee1b606b72655c716afe4b84440e49951e9dbb28bc204bc378988", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "frozen_tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "d6b3b079d6a8ab0d870020abe5f6489b59536c5a6602e2083dfc80b0c97d1ed5", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "independent_accuracy_estimate": null, + "external_user_feedback": null, + "source_projection": "Git-verified names, empty non-instruction files", + "source_freeze_commit": "4b8ebc0", + "fresh_protocol_sha256": "f001a50db17286fbf085cc6d57038bde66ec216781e8085f0b14eec6d253b7e4", + "fresh_parser_matches_collection_freeze": false, + "frozen_result_sha256": "5a083ed967261acf79e1d0ba071c4ec76224581e1b50c51c5ee864c8a8c5fdec", + "runner_sha256_lf": "a5b9901fcecf3a05b7fe32eafea71e02f4c8f70a1c5731d492c9bc2639ac6260", + "known_natural_cases": [ + { + "id": "path-01", + "repository": "sveltejs/svelte", + "line": 5, + "destination": "./CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-02", + "repository": "sveltejs/svelte", + "line": 5, + "destination": "CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-03", + "repository": "sveltejs/svelte", + "line": 7, + "destination": "./.github/PULL_REQUEST_TEMPLATE.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-04", + "repository": "sveltejs/svelte", + "line": 7, + "destination": "PULL_REQUEST_TEMPLATE.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-05", + "repository": "pnpm/pnpm", + "line": 7, + "destination": "pnpm11/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-06", + "repository": "pnpm/pnpm", + "line": 8, + "destination": "pnpm/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-07", + "repository": "pnpm/pnpm", + "line": 8, + "destination": "./pnpm/AGENTS.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-08", + "repository": "pnpm/pnpm", + "line": 8, + "destination": "pnpm/AGENTS.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-09", + "repository": "vitest-dev/vitest", + "line": 22, + "destination": "packages/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-10", + "repository": "vitest-dev/vitest", + "line": 47, + "destination": "test/unit", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-11", + "repository": "vitest-dev/vitest", + "line": 67, + "destination": "dist/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-12", + "repository": "vitest-dev/vitest", + "line": 72, + "destination": "packages/vitest/src/runtime/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-13", + "repository": "facebook/react", + "line": 12, + "destination": "compiler/docs/rust-port/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-14", + "repository": "facebook/react", + "line": 12, + "destination": "compiler/crates/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-15", + "repository": "TanStack/query", + "line": 4, + "destination": "./CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-16", + "repository": "TanStack/query", + "line": 4, + "destination": "CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + } + ], + "known_controls": [ + { + "id": "control-01", + "repository": "sveltejs/svelte", + "target": "CONTRIBUTING.md", + "target_kind": "blob", + "line": 5, + "destination": "./CONTRIBUTING.md", + "frozen_flagged": true, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 5, + "message": "Referenced path does not exist: ./CONTRIBUTING.md" + } + ], + "projection": { + "omitted_target": "CONTRIBUTING.md", + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-02", + "repository": "sveltejs/svelte", + "target": ".github/PULL_REQUEST_TEMPLATE.md", + "target_kind": "blob", + "line": 7, + "destination": "./.github/PULL_REQUEST_TEMPLATE.md", + "frozen_flagged": true, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 7, + "message": "Referenced path does not exist: ./.github/PULL_REQUEST_TEMPLATE.md" + } + ], + "projection": { + "omitted_target": ".github/PULL_REQUEST_TEMPLATE.md", + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-03", + "repository": "pnpm/pnpm", + "target": "pnpm11", + "target_kind": "tree", + "line": 7, + "destination": "pnpm11/", + "frozen_flagged": false, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 7, + "message": "Referenced path does not exist: pnpm11/" + }, + { + "file": "AGENTS.md", + "line": 22, + "message": "Referenced path does not exist: pnpm11/" + }, + { + "file": "AGENTS.md", + "line": 34, + "message": "Referenced path does not exist: pnpm11/docs/" + }, + { + "file": "AGENTS.md", + "line": 46, + "message": "Referenced path does not exist: pnpm11/pnpm/" + }, + { + "file": "AGENTS.md", + "line": 47, + "message": "Referenced path does not exist: pnpm11/installing/" + }, + { + "file": "AGENTS.md", + "line": 48, + "message": "Referenced path does not exist: pnpm11/bins/" + }, + { + "file": "AGENTS.md", + "line": 49, + "message": "Referenced path does not exist: pnpm11/resolving/" + }, + { + "file": "AGENTS.md", + "line": 50, + "message": "Referenced path does not exist: pnpm11/fetching/" + }, + { + "file": "AGENTS.md", + "line": 51, + "message": "Referenced path does not exist: pnpm11/store/" + }, + { + "file": "AGENTS.md", + "line": 52, + "message": "Referenced path does not exist: pnpm11/lockfile/" + }, + { + "file": "AGENTS.md", + "line": 56, + "message": "Referenced path does not exist: pnpm11/cli/" + }, + { + "file": "AGENTS.md", + "line": 57, + "message": "Referenced path does not exist: pnpm11/config/" + }, + { + "file": "AGENTS.md", + "line": 58, + "message": "Referenced path does not exist: pnpm11/hooks/" + }, + { + "file": "AGENTS.md", + "line": 59, + "message": "Referenced path does not exist: pnpm11/cli/commands/src/completion/" + }, + { + "file": "AGENTS.md", + "line": 63, + "message": "Referenced path does not exist: pnpm11/network/" + }, + { + "file": "AGENTS.md", + "line": 64, + "message": "Referenced path does not exist: pnpm11/workspace/" + }, + { + "file": "AGENTS.md", + "line": 65, + "message": "Referenced path does not exist: pnpm11/exec/" + }, + { + "file": "AGENTS.md", + "line": 66, + "message": "Referenced path does not exist: pnpm11/engine/runtime/commands/" + }, + { + "file": "AGENTS.md", + "line": 67, + "message": "Referenced path does not exist: pnpm11/cache/" + }, + { + "file": "AGENTS.md", + "line": 68, + "message": "Referenced path does not exist: pnpm11/patching/" + }, + { + "file": "AGENTS.md", + "line": 69, + "message": "Referenced path does not exist: pnpm11/releasing/" + }, + { + "file": "AGENTS.md", + "line": 73, + "message": "Referenced path does not exist: pnpm11/fs/" + }, + { + "file": "AGENTS.md", + "line": 74, + "message": "Referenced path does not exist: pnpm11/crypto/" + }, + { + "file": "AGENTS.md", + "line": 75, + "message": "Referenced path does not exist: pnpm11/text/" + }, + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: pnpm11/pnpm/test/" + }, + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: lib/" + }, + { + "file": "AGENTS.md", + "line": 164, + "message": "Referenced path does not exist: pnpm11/fs/" + }, + { + "file": "AGENTS.md", + "line": 164, + "message": "Referenced path does not exist: pnpm11/crypto/" + }, + { + "file": "AGENTS.md", + "line": 164, + "message": "Referenced path does not exist: pnpm11/text/" + }, + { + "file": "AGENTS.md", + "line": 164, + "message": "Referenced path does not exist: pnpm11/object/" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: .husky/_/" + }, + { + "file": "AGENTS.md", + "line": 354, + "message": "Referenced path does not exist: pnpm11/docs/" + } + ], + "projection": { + "omitted_target": "pnpm11", + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm/CLAUDE.md", + "pnpm/GEMINI.md" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-04", + "repository": "pnpm/pnpm", + "target": "pnpm", + "target_kind": "tree", + "line": 8, + "destination": "pnpm/", + "frozen_flagged": false, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 8, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 8, + "message": "Referenced path does not exist: pnpm/" + }, + { + "file": "AGENTS.md", + "line": 12, + "message": "Referenced path does not exist: pnpm/" + }, + { + "file": "AGENTS.md", + "line": 22, + "message": "Referenced path does not exist: pnpm/" + }, + { + "file": "AGENTS.md", + "line": 30, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 34, + "message": "Referenced path does not exist: pnpm/docs/" + }, + { + "file": "AGENTS.md", + "line": 79, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 79, + "message": "Referenced path does not exist: pnpm/" + }, + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: lib/" + }, + { + "file": "AGENTS.md", + "line": 113, + "message": "Referenced path does not exist: ./pnpm/CONTRIBUTING.md" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: .husky/_/" + }, + { + "file": "AGENTS.md", + "line": 354, + "message": "Referenced path does not exist: pnpm/docs/" + }, + { + "file": "AGENTS.md", + "line": 357, + "message": "Referenced path does not exist: pnpm/npm/napi/index.d.ts" + }, + { + "file": "AGENTS.md", + "line": 396, + "message": "Referenced path does not exist: ./pnpm/CODE_STYLE_GUIDE.md" + } + ], + "projection": { + "omitted_target": "pnpm", + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm11/__fixtures__/has-outdated-deps-using-catalog-protocol/node_modules/is-negative", + "pnpm11/__fixtures__/has-outdated-deps-using-npm-alias/node_modules/is-negative-alias" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-05", + "repository": "pnpm/pnpm", + "target": "pnpm/AGENTS.md", + "target_kind": "blob", + "line": 8, + "destination": "./pnpm/AGENTS.md", + "frozen_flagged": true, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 8, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 30, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 79, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: lib/" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: .husky/_/" + } + ], + "projection": { + "omitted_target": "pnpm/AGENTS.md", + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm/CLAUDE.md", + "pnpm/GEMINI.md", + "pnpm11/__fixtures__/has-outdated-deps-using-catalog-protocol/node_modules/is-negative", + "pnpm11/__fixtures__/has-outdated-deps-using-npm-alias/node_modules/is-negative-alias" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-06", + "repository": "vitest-dev/vitest", + "target": "packages", + "target_kind": "tree", + "line": 22, + "destination": "packages/", + "frozen_flagged": false, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 22, + "message": "Referenced path does not exist: packages/" + }, + { + "file": "AGENTS.md", + "line": 72, + "message": "Referenced path does not exist: packages/vitest/src/runtime/" + }, + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: packages/" + }, + { + "file": "AGENTS.md", + "line": 144, + "message": "Referenced path does not exist: packages/web-worker/" + }, + { + "file": "AGENTS.md", + "line": 178, + "message": "Referenced path does not exist: packages/" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: packages/vitest/src/node/cli/cli-config.ts" + }, + { + "file": "AGENTS.md", + "line": 198, + "message": "Referenced path does not exist: packages/vitest/LICENSE.md" + }, + { + "file": "AGENTS.md", + "line": 199, + "message": "Referenced path does not exist: packages/vitest/src/node/cli/cli-config.ts" + } + ], + "projection": { + "omitted_target": "packages", + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-07", + "repository": "vitest-dev/vitest", + "target": "test/unit", + "target_kind": "tree", + "line": 47, + "destination": "test/unit", + "frozen_flagged": false, + "current_flagged": false, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 144, + "message": "Referenced path does not exist: test/unit/" + } + ], + "projection": { + "omitted_target": "test/unit", + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-08", + "repository": "vitest-dev/vitest", + "target": "packages/vitest/src/runtime", + "target_kind": "tree", + "line": 72, + "destination": "packages/vitest/src/runtime/", + "frozen_flagged": false, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 72, + "message": "Referenced path does not exist: packages/vitest/src/runtime/" + } + ], + "projection": { + "omitted_target": "packages/vitest/src/runtime", + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + } + ], + "known_generated_output": { + "line": 201, + "destination": "docs/.vitepress/contributor-names.json", + "repository": "vitest-dev/vitest", + "source_revision": "f4fdbcae08ec365f35d9e1866ce3e7d04880ea60", + "frozen_flagged": true, + "current_flagged": false, + "producer_context_git_verified": true + }, + "known_whole_document_observations": { + "sveltejs/svelte": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "05aba10317dee1b606b72655c716afe4b84440e49951e9dbb28bc204bc378988", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "pnpm/pnpm": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "05aba10317dee1b606b72655c716afe4b84440e49951e9dbb28bc204bc378988", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [ + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: lib/" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: .husky/_/" + } + ], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm/CLAUDE.md", + "pnpm/GEMINI.md", + "pnpm11/__fixtures__/has-outdated-deps-using-catalog-protocol/node_modules/is-negative", + "pnpm11/__fixtures__/has-outdated-deps-using-npm-alias/node_modules/is-negative-alias" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "vitest-dev/vitest": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "05aba10317dee1b606b72655c716afe4b84440e49951e9dbb28bc204bc378988", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "facebook/react": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "05aba10317dee1b606b72655c716afe4b84440e49951e9dbb28bc204bc378988", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "TanStack/query": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "05aba10317dee1b606b72655c716afe4b84440e49951e9dbb28bc204bc378988", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + "packages/angular-query-experimental/root.oxlint.config.ts", + "packages/angular-query-persist-client/root.oxlint.config.ts", + "packages/eslint-plugin-query/root.oxlint.config.ts", + "packages/lit-query/root.oxlint.config.ts", + "packages/lit-query/root.tsdown.config.js", + "packages/preact-query-devtools/root.oxlint.config.ts", + "packages/preact-query-devtools/root.tsdown.config.js", + "packages/preact-query-persist-client/root.oxlint.config.ts", + "packages/preact-query-persist-client/root.tsdown.config.js", + "packages/preact-query/root.oxlint.config.ts", + "packages/preact-query/root.tsdown.config.js", + "packages/query-async-storage-persister/root.oxlint.config.ts", + "packages/query-async-storage-persister/root.tsdown.config.js", + "packages/query-broadcast-client-experimental/root.oxlint.config.ts", + "packages/query-broadcast-client-experimental/root.tsdown.config.js", + "packages/query-codemods/root.oxlint.config.ts", + "packages/query-core/root.oxlint.config.ts", + "packages/query-core/root.tsdown.config.js", + "packages/query-devtools/root.oxlint.config.ts", + "packages/query-persist-client-core/root.oxlint.config.ts", + "packages/query-persist-client-core/root.tsdown.config.js", + "packages/query-sync-storage-persister/root.oxlint.config.ts", + "packages/query-sync-storage-persister/root.tsdown.config.js", + "packages/query-test-utils/root.oxlint.config.ts", + "packages/react-query-devtools/root.oxlint.config.ts", + "packages/react-query-devtools/root.tsdown.config.js", + "packages/react-query-next-experimental/root.oxlint.config.ts", + "packages/react-query-next-experimental/root.tsdown.config.js", + "packages/react-query-persist-client/root.oxlint.config.ts", + "packages/react-query-persist-client/root.tsdown.config.js", + "packages/react-query/root.oxlint.config.ts", + "packages/react-query/root.tsdown.config.js", + "packages/solid-query-devtools/root.oxlint.config.ts", + "packages/solid-query-persist-client/root.oxlint.config.ts", + "packages/solid-query/root.oxlint.config.ts", + "packages/svelte-query-devtools/root.oxlint.config.ts", + "packages/svelte-query-persist-client/root.oxlint.config.ts", + "packages/svelte-query/root.oxlint.config.ts", + "packages/vue-query-devtools/root.oxlint.config.ts", + "packages/vue-query-devtools/root.tsdown.config.js", + "packages/vue-query/root.oxlint.config.ts", + "packages/vue-query/root.tsdown.config.js" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + } + }, + "fresh_registry": [ + { + "repository": "astral-sh/uv", + "status": "excluded", + "reason": "license_outside_allowlist" + }, + { + "repository": "pydantic/pydantic", + "revision": "560f0f96a37d6913afdfddb2de22030ef08e68c3", + "status": "completed_source_smoke", + "selected_candidates": 0, + "source_url": "https://github.com/pydantic/pydantic/blob/560f0f96a37d6913afdfddb2de22030ef08e68c3/AGENTS.md", + "findings": [], + "candidates": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + "CONTRIBUTING.md", + "tests/pydantic_core" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "repository": "fastapi/fastapi", + "status": "excluded", + "reason": "registered_root_instruction_absent" + } + ], + "acceptance": { + "passed": true, + "scope": "known_development_contracts_only", + "failures": [] + } +} diff --git a/benchmarks/path-check-v2/collected/collection.json b/benchmarks/path-check-v2/collected/collection.json new file mode 100644 index 0000000..626d169 --- /dev/null +++ b/benchmarks/path-check-v2/collected/collection.json @@ -0,0 +1,64 @@ +{ + "schema_version": 1, + "status": "collected_unscored", + "collected_at_utc": "2026-11-13T13:17:53.662794+00:00", + "protocol_sha256": "f001a50db17286fbf085cc6d57038bde66ec216781e8085f0b14eec6d253b7e4", + "selected_cases": 0, + "repositories": [ + { + "repository": "astral-sh/uv", + "revision": "b19b0eab8b180952713c32a1562fe738ba6d6fcc", + "source_checks": [ + { + "path": "AGENTS.md", + "present": true + } + ], + "license_spdx": "NOASSERTION", + "status": "excluded", + "reason": "license_outside_allowlist" + }, + { + "repository": "pydantic/pydantic", + "revision": "560f0f96a37d6913afdfddb2de22030ef08e68c3", + "source_checks": [ + { + "path": "AGENTS.md", + "present": true + } + ], + "license_spdx": "MIT", + "status": "collected", + "instruction_path": "AGENTS.md", + "source_file": "sources/pydantic--pydantic.txt", + "source_sha256": "9364a0769496f3667a4da9a0f6d8ed08d9e549e3fcd756979f52775a2502e08f", + "source_blob_sha": "210125cc7db996036876b2a34033c156498a4960", + "source_url": "https://github.com/pydantic/pydantic/blob/560f0f96a37d6913afdfddb2de22030ef08e68c3/AGENTS.md", + "tree_file": "trees/pydantic--pydantic.json.gz", + "tree_sha256": "315ab3372d59dbd16164e32ecb8ffbb20bcaac7efc05fad2aeb929eeed1becc6", + "tree_object_sha": "b6d35e0b9a3a2e480b3cae869b649e3ff58edbf2", + "tree_entries": 3783, + "license_file": "licenses/pydantic--pydantic.txt", + "license_sha256": "a9e186f3ca16b5eef84318e7a701721351a00cb7b8ae3a4394b67b49e3529ef3", + "license_blob_sha": "488c6260c10f2e88fa1fae58a63fccec8d600cd1", + "license_url": "https://github.com/pydantic/pydantic/blob/560f0f96a37d6913afdfddb2de22030ef08e68c3/LICENSE", + "candidates": [] + }, + { + "repository": "fastapi/fastapi", + "revision": "445c570ba8fc0938724df60a3a6d37366322918d", + "source_checks": [ + { + "path": "AGENTS.md", + "present": false + }, + { + "path": "CLAUDE.md", + "present": false + } + ], + "status": "excluded", + "reason": "registered_root_instruction_absent" + } + ] +} diff --git a/benchmarks/path-check-v2/collected/licenses/pydantic--pydantic.txt b/benchmarks/path-check-v2/collected/licenses/pydantic--pydantic.txt new file mode 100644 index 0000000..488c626 --- /dev/null +++ b/benchmarks/path-check-v2/collected/licenses/pydantic--pydantic.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 to present Pydantic Services Inc. and individual contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/benchmarks/path-check-v2/collected/sources/pydantic--pydantic.txt b/benchmarks/path-check-v2/collected/sources/pydantic--pydantic.txt new file mode 100644 index 0000000..210125c --- /dev/null +++ b/benchmarks/path-check-v2/collected/sources/pydantic--pydantic.txt @@ -0,0 +1 @@ +Read and follow CONTRIBUTING.md, in particular the "Pull Requests", "Writing tests" and "Commit and push your changes" sections. diff --git a/benchmarks/path-check-v2/collected/trees/pydantic--pydantic.json.gz b/benchmarks/path-check-v2/collected/trees/pydantic--pydantic.json.gz new file mode 100644 index 0000000..7ab14cb Binary files /dev/null and b/benchmarks/path-check-v2/collected/trees/pydantic--pydantic.json.gz differ diff --git a/benchmarks/path-check-v2/evidence.json b/benchmarks/path-check-v2/evidence.json new file mode 100644 index 0000000..168020d --- /dev/null +++ b/benchmarks/path-check-v2/evidence.json @@ -0,0 +1,25 @@ +{ + "schema_version": 1, + "successful_run": { + "url": "https://github.com/LE0-Lin/AgentConfigScore/actions/runs/43470569481", + "artifact_id": 14060921208, + "source_commit": "0f7af0b63b39d3414c5a1a7266268e556d2a6552" + }, + "failing_diagnostic_run": { + "url": "https://github.com/LE0-Lin/AgentConfigScore/actions/runs/43467592113", + "artifact_id": 14058938235, + "source_commit": "d2028c0d432733a5ef9abf6a3f37316da307d6db" + }, + "broad_directory_run": { + "url": "https://github.com/LE0-Lin/AgentConfigScore/actions/runs/43468246857", + "artifact_id": 14058958947, + "source_commit": "4effd1c20d927faae684ff33b75a6d8f51276497" + }, + "reports": { + "first-attempt.json": "af394bb64f626e2e9369fd9e26389e027ec9d9e9e6c437bccb9065958e52551f", + "broad-directory-attempt.json": "41ddd90224836f599ca2ddf7f5669a20ad03cedbc40b8abba2b975f716779801", + "result.json": "25fe168d5b3c88f3c8c717be5ef2029812a95a7b0e72cd15fa845f0e5c6eef83", + "result.md": "5549aad27ad0454a7a4d529cb87d0eb5dd0015796c256239adc945597038ab1c" + }, + "status": "development_evidence_not_external_adoption" +} diff --git a/benchmarks/path-check-v2/first-attempt.json b/benchmarks/path-check-v2/first-attempt.json new file mode 100644 index 0000000..a68567a --- /dev/null +++ b/benchmarks/path-check-v2/first-attempt.json @@ -0,0 +1,979 @@ +{ + "schema_version": 1, + "status": "completed_development_replay", + "completed_at_utc": "2026-11-13T16:55:52.999509+00:00", + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "081ab8bf7d86dd248b4ed2f9eef409f71f45bb6353ce0df64913ccad56c9ec2f", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "frozen_tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "d6b3b079d6a8ab0d870020abe5f6489b59536c5a6602e2083dfc80b0c97d1ed5", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "independent_accuracy_estimate": null, + "external_user_feedback": null, + "source_projection": "Git-verified names, empty non-instruction files", + "source_freeze_commit": "4b8ebc0", + "fresh_protocol_sha256": "f001a50db17286fbf085cc6d57038bde66ec216781e8085f0b14eec6d253b7e4", + "fresh_parser_matches_collection_freeze": true, + "frozen_result_sha256": "5a083ed967261acf79e1d0ba071c4ec76224581e1b50c51c5ee864c8a8c5fdec", + "runner_sha256_lf": "a5b9901fcecf3a05b7fe32eafea71e02f4c8f70a1c5731d492c9bc2639ac6260", + "known_natural_cases": [ + { + "id": "path-01", + "repository": "sveltejs/svelte", + "line": 5, + "destination": "./CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-02", + "repository": "sveltejs/svelte", + "line": 5, + "destination": "CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-03", + "repository": "sveltejs/svelte", + "line": 7, + "destination": "./.github/PULL_REQUEST_TEMPLATE.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-04", + "repository": "sveltejs/svelte", + "line": 7, + "destination": "PULL_REQUEST_TEMPLATE.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-05", + "repository": "pnpm/pnpm", + "line": 7, + "destination": "pnpm11/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-06", + "repository": "pnpm/pnpm", + "line": 8, + "destination": "pnpm/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-07", + "repository": "pnpm/pnpm", + "line": 8, + "destination": "./pnpm/AGENTS.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-08", + "repository": "pnpm/pnpm", + "line": 8, + "destination": "pnpm/AGENTS.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-09", + "repository": "vitest-dev/vitest", + "line": 22, + "destination": "packages/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-10", + "repository": "vitest-dev/vitest", + "line": 47, + "destination": "test/unit", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-11", + "repository": "vitest-dev/vitest", + "line": 67, + "destination": "dist/", + "provisional_review_needed": false, + "current_flagged": true + }, + { + "id": "path-12", + "repository": "vitest-dev/vitest", + "line": 72, + "destination": "packages/vitest/src/runtime/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-13", + "repository": "facebook/react", + "line": 12, + "destination": "compiler/docs/rust-port/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-14", + "repository": "facebook/react", + "line": 12, + "destination": "compiler/crates/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-15", + "repository": "TanStack/query", + "line": 4, + "destination": "./CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-16", + "repository": "TanStack/query", + "line": 4, + "destination": "CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + } + ], + "known_controls": [ + { + "id": "control-01", + "repository": "sveltejs/svelte", + "target": "CONTRIBUTING.md", + "target_kind": "blob", + "line": 5, + "destination": "./CONTRIBUTING.md", + "frozen_flagged": true, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 5, + "message": "Referenced path does not exist: ./CONTRIBUTING.md" + } + ], + "projection": { + "omitted_target": "CONTRIBUTING.md", + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-02", + "repository": "sveltejs/svelte", + "target": ".github/PULL_REQUEST_TEMPLATE.md", + "target_kind": "blob", + "line": 7, + "destination": "./.github/PULL_REQUEST_TEMPLATE.md", + "frozen_flagged": true, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 7, + "message": "Referenced path does not exist: ./.github/PULL_REQUEST_TEMPLATE.md" + } + ], + "projection": { + "omitted_target": ".github/PULL_REQUEST_TEMPLATE.md", + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-03", + "repository": "pnpm/pnpm", + "target": "pnpm11", + "target_kind": "tree", + "line": 7, + "destination": "pnpm11/", + "frozen_flagged": false, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 7, + "message": "Referenced path does not exist: pnpm11/" + }, + { + "file": "AGENTS.md", + "line": 22, + "message": "Referenced path does not exist: pnpm11/" + }, + { + "file": "AGENTS.md", + "line": 34, + "message": "Referenced path does not exist: pnpm11/docs/" + }, + { + "file": "AGENTS.md", + "line": 46, + "message": "Referenced path does not exist: pnpm11/pnpm/" + }, + { + "file": "AGENTS.md", + "line": 47, + "message": "Referenced path does not exist: pnpm11/installing/" + }, + { + "file": "AGENTS.md", + "line": 48, + "message": "Referenced path does not exist: pnpm11/bins/" + }, + { + "file": "AGENTS.md", + "line": 49, + "message": "Referenced path does not exist: pnpm11/resolving/" + }, + { + "file": "AGENTS.md", + "line": 50, + "message": "Referenced path does not exist: pnpm11/fetching/" + }, + { + "file": "AGENTS.md", + "line": 51, + "message": "Referenced path does not exist: pnpm11/store/" + }, + { + "file": "AGENTS.md", + "line": 52, + "message": "Referenced path does not exist: pnpm11/lockfile/" + }, + { + "file": "AGENTS.md", + "line": 56, + "message": "Referenced path does not exist: pnpm11/cli/" + }, + { + "file": "AGENTS.md", + "line": 57, + "message": "Referenced path does not exist: pnpm11/config/" + }, + { + "file": "AGENTS.md", + "line": 58, + "message": "Referenced path does not exist: pnpm11/hooks/" + }, + { + "file": "AGENTS.md", + "line": 59, + "message": "Referenced path does not exist: pnpm11/cli/commands/src/completion/" + }, + { + "file": "AGENTS.md", + "line": 63, + "message": "Referenced path does not exist: pnpm11/network/" + }, + { + "file": "AGENTS.md", + "line": 64, + "message": "Referenced path does not exist: pnpm11/workspace/" + }, + { + "file": "AGENTS.md", + "line": 65, + "message": "Referenced path does not exist: pnpm11/exec/" + }, + { + "file": "AGENTS.md", + "line": 66, + "message": "Referenced path does not exist: pnpm11/engine/runtime/commands/" + }, + { + "file": "AGENTS.md", + "line": 67, + "message": "Referenced path does not exist: pnpm11/cache/" + }, + { + "file": "AGENTS.md", + "line": 68, + "message": "Referenced path does not exist: pnpm11/patching/" + }, + { + "file": "AGENTS.md", + "line": 69, + "message": "Referenced path does not exist: pnpm11/releasing/" + }, + { + "file": "AGENTS.md", + "line": 73, + "message": "Referenced path does not exist: pnpm11/fs/" + }, + { + "file": "AGENTS.md", + "line": 74, + "message": "Referenced path does not exist: pnpm11/crypto/" + }, + { + "file": "AGENTS.md", + "line": 75, + "message": "Referenced path does not exist: pnpm11/text/" + }, + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: pnpm11/pnpm/test/" + }, + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: lib/" + }, + { + "file": "AGENTS.md", + "line": 164, + "message": "Referenced path does not exist: pnpm11/fs/" + }, + { + "file": "AGENTS.md", + "line": 164, + "message": "Referenced path does not exist: pnpm11/crypto/" + }, + { + "file": "AGENTS.md", + "line": 164, + "message": "Referenced path does not exist: pnpm11/text/" + }, + { + "file": "AGENTS.md", + "line": 164, + "message": "Referenced path does not exist: pnpm11/object/" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: .husky/_/" + }, + { + "file": "AGENTS.md", + "line": 354, + "message": "Referenced path does not exist: pnpm11/docs/" + } + ], + "projection": { + "omitted_target": "pnpm11", + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm/CLAUDE.md", + "pnpm/GEMINI.md" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-04", + "repository": "pnpm/pnpm", + "target": "pnpm", + "target_kind": "tree", + "line": 8, + "destination": "pnpm/", + "frozen_flagged": false, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 8, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 8, + "message": "Referenced path does not exist: pnpm/" + }, + { + "file": "AGENTS.md", + "line": 12, + "message": "Referenced path does not exist: pnpm/" + }, + { + "file": "AGENTS.md", + "line": 22, + "message": "Referenced path does not exist: pnpm/" + }, + { + "file": "AGENTS.md", + "line": 30, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 34, + "message": "Referenced path does not exist: pnpm/docs/" + }, + { + "file": "AGENTS.md", + "line": 79, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 79, + "message": "Referenced path does not exist: pnpm/" + }, + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: lib/" + }, + { + "file": "AGENTS.md", + "line": 113, + "message": "Referenced path does not exist: ./pnpm/CONTRIBUTING.md" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: .husky/_/" + }, + { + "file": "AGENTS.md", + "line": 354, + "message": "Referenced path does not exist: pnpm/docs/" + }, + { + "file": "AGENTS.md", + "line": 357, + "message": "Referenced path does not exist: pnpm/npm/napi/index.d.ts" + }, + { + "file": "AGENTS.md", + "line": 396, + "message": "Referenced path does not exist: ./pnpm/CODE_STYLE_GUIDE.md" + } + ], + "projection": { + "omitted_target": "pnpm", + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm11/__fixtures__/has-outdated-deps-using-catalog-protocol/node_modules/is-negative", + "pnpm11/__fixtures__/has-outdated-deps-using-npm-alias/node_modules/is-negative-alias" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-05", + "repository": "pnpm/pnpm", + "target": "pnpm/AGENTS.md", + "target_kind": "blob", + "line": 8, + "destination": "./pnpm/AGENTS.md", + "frozen_flagged": true, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 8, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 30, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 79, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: lib/" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: .husky/_/" + } + ], + "projection": { + "omitted_target": "pnpm/AGENTS.md", + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm/CLAUDE.md", + "pnpm/GEMINI.md", + "pnpm11/__fixtures__/has-outdated-deps-using-catalog-protocol/node_modules/is-negative", + "pnpm11/__fixtures__/has-outdated-deps-using-npm-alias/node_modules/is-negative-alias" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-06", + "repository": "vitest-dev/vitest", + "target": "packages", + "target_kind": "tree", + "line": 22, + "destination": "packages/", + "frozen_flagged": false, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 22, + "message": "Referenced path does not exist: packages/" + }, + { + "file": "AGENTS.md", + "line": 67, + "message": "Referenced path does not exist: dist/" + }, + { + "file": "AGENTS.md", + "line": 72, + "message": "Referenced path does not exist: packages/vitest/src/runtime/" + }, + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: packages/" + }, + { + "file": "AGENTS.md", + "line": 144, + "message": "Referenced path does not exist: packages/web-worker/" + }, + { + "file": "AGENTS.md", + "line": 178, + "message": "Referenced path does not exist: packages/" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: packages/vitest/src/node/cli/cli-config.ts" + }, + { + "file": "AGENTS.md", + "line": 198, + "message": "Referenced path does not exist: packages/vitest/LICENSE.md" + }, + { + "file": "AGENTS.md", + "line": 199, + "message": "Referenced path does not exist: packages/vitest/src/node/cli/cli-config.ts" + } + ], + "projection": { + "omitted_target": "packages", + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-07", + "repository": "vitest-dev/vitest", + "target": "test/unit", + "target_kind": "tree", + "line": 47, + "destination": "test/unit", + "frozen_flagged": false, + "current_flagged": false, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 67, + "message": "Referenced path does not exist: dist/" + }, + { + "file": "AGENTS.md", + "line": 144, + "message": "Referenced path does not exist: test/unit/" + } + ], + "projection": { + "omitted_target": "test/unit", + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-08", + "repository": "vitest-dev/vitest", + "target": "packages/vitest/src/runtime", + "target_kind": "tree", + "line": 72, + "destination": "packages/vitest/src/runtime/", + "frozen_flagged": false, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 67, + "message": "Referenced path does not exist: dist/" + }, + { + "file": "AGENTS.md", + "line": 72, + "message": "Referenced path does not exist: packages/vitest/src/runtime/" + } + ], + "projection": { + "omitted_target": "packages/vitest/src/runtime", + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + } + ], + "known_generated_output": { + "line": 201, + "destination": "docs/.vitepress/contributor-names.json", + "repository": "vitest-dev/vitest", + "source_revision": "f4fdbcae08ec365f35d9e1866ce3e7d04880ea60", + "frozen_flagged": true, + "current_flagged": false, + "producer_context_git_verified": true + }, + "known_whole_document_observations": { + "sveltejs/svelte": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "081ab8bf7d86dd248b4ed2f9eef409f71f45bb6353ce0df64913ccad56c9ec2f", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "pnpm/pnpm": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "081ab8bf7d86dd248b4ed2f9eef409f71f45bb6353ce0df64913ccad56c9ec2f", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [ + { + "file": "AGENTS.md", + "line": 97, + "message": "Referenced path does not exist: lib/" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: .husky/_/" + } + ], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm/CLAUDE.md", + "pnpm/GEMINI.md", + "pnpm11/__fixtures__/has-outdated-deps-using-catalog-protocol/node_modules/is-negative", + "pnpm11/__fixtures__/has-outdated-deps-using-npm-alias/node_modules/is-negative-alias" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "vitest-dev/vitest": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "081ab8bf7d86dd248b4ed2f9eef409f71f45bb6353ce0df64913ccad56c9ec2f", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [ + { + "file": "AGENTS.md", + "line": 67, + "message": "Referenced path does not exist: dist/" + } + ], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "facebook/react": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "081ab8bf7d86dd248b4ed2f9eef409f71f45bb6353ce0df64913ccad56c9ec2f", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "TanStack/query": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "081ab8bf7d86dd248b4ed2f9eef409f71f45bb6353ce0df64913ccad56c9ec2f", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + "packages/angular-query-experimental/root.oxlint.config.ts", + "packages/angular-query-persist-client/root.oxlint.config.ts", + "packages/eslint-plugin-query/root.oxlint.config.ts", + "packages/lit-query/root.oxlint.config.ts", + "packages/lit-query/root.tsdown.config.js", + "packages/preact-query-devtools/root.oxlint.config.ts", + "packages/preact-query-devtools/root.tsdown.config.js", + "packages/preact-query-persist-client/root.oxlint.config.ts", + "packages/preact-query-persist-client/root.tsdown.config.js", + "packages/preact-query/root.oxlint.config.ts", + "packages/preact-query/root.tsdown.config.js", + "packages/query-async-storage-persister/root.oxlint.config.ts", + "packages/query-async-storage-persister/root.tsdown.config.js", + "packages/query-broadcast-client-experimental/root.oxlint.config.ts", + "packages/query-broadcast-client-experimental/root.tsdown.config.js", + "packages/query-codemods/root.oxlint.config.ts", + "packages/query-core/root.oxlint.config.ts", + "packages/query-core/root.tsdown.config.js", + "packages/query-devtools/root.oxlint.config.ts", + "packages/query-persist-client-core/root.oxlint.config.ts", + "packages/query-persist-client-core/root.tsdown.config.js", + "packages/query-sync-storage-persister/root.oxlint.config.ts", + "packages/query-sync-storage-persister/root.tsdown.config.js", + "packages/query-test-utils/root.oxlint.config.ts", + "packages/react-query-devtools/root.oxlint.config.ts", + "packages/react-query-devtools/root.tsdown.config.js", + "packages/react-query-next-experimental/root.oxlint.config.ts", + "packages/react-query-next-experimental/root.tsdown.config.js", + "packages/react-query-persist-client/root.oxlint.config.ts", + "packages/react-query-persist-client/root.tsdown.config.js", + "packages/react-query/root.oxlint.config.ts", + "packages/react-query/root.tsdown.config.js", + "packages/solid-query-devtools/root.oxlint.config.ts", + "packages/solid-query-persist-client/root.oxlint.config.ts", + "packages/solid-query/root.oxlint.config.ts", + "packages/svelte-query-devtools/root.oxlint.config.ts", + "packages/svelte-query-persist-client/root.oxlint.config.ts", + "packages/svelte-query/root.oxlint.config.ts", + "packages/vue-query-devtools/root.oxlint.config.ts", + "packages/vue-query-devtools/root.tsdown.config.js", + "packages/vue-query/root.oxlint.config.ts", + "packages/vue-query/root.tsdown.config.js" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + } + }, + "fresh_registry": [ + { + "repository": "astral-sh/uv", + "status": "excluded", + "reason": "license_outside_allowlist" + }, + { + "repository": "pydantic/pydantic", + "revision": "560f0f96a37d6913afdfddb2de22030ef08e68c3", + "status": "completed_source_smoke", + "selected_candidates": 0, + "source_url": "https://github.com/pydantic/pydantic/blob/560f0f96a37d6913afdfddb2de22030ef08e68c3/AGENTS.md", + "findings": [], + "candidates": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + "CONTRIBUTING.md", + "tests/pydantic_core" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "repository": "fastapi/fastapi", + "status": "excluded", + "reason": "registered_root_instruction_absent" + } + ], + "acceptance": { + "passed": false, + "scope": "known_development_contracts_only", + "failures": [ + "known_natural_negative_flagged:path-11" + ] + } +} diff --git a/benchmarks/path-check-v2/protocol.json b/benchmarks/path-check-v2/protocol.json new file mode 100644 index 0000000..93ed34b --- /dev/null +++ b/benchmarks/path-check-v2/protocol.json @@ -0,0 +1,47 @@ +{ + "schema_version": 1, + "name": "path-check-v2-fresh-source-smoke", + "registered_date": "2026-11-13", + "status": "fresh_source_smoke_not_independent_accuracy", + "tool_source_sha256": "081ab8bf7d86dd248b4ed2f9eef409f71f45bb6353ce0df64913ccad56c9ec2f", + "selection": "Fixed three-repository convenience registry after the known Vitest/pnpm development fixes and before fetching these root documents or running the changed scanner on them. First regular root AGENTS.md, then CLAUDE.md. First four distinct eligible candidates per repository, at most twelve. Keep all exclusions without replacement. Prior model training exposure and broader historical familiarity are unknown.", + "source_paths": [ + "AGENTS.md", + "CLAUDE.md" + ], + "target_cases": 12, + "per_repository": 4, + "maximum_source_bytes": 65536, + "maximum_tree_entries": 25000, + "allowed_licenses": [ + "MIT", + "Apache-2.0", + "BSD-3-Clause", + "BSD-2-Clause", + "ISC" + ], + "candidate_suffixes": [ + ".md", + ".json", + ".toml", + ".yml", + ".yaml", + ".ts", + ".tsx", + ".js", + ".jsx", + ".py", + ".rs", + ".go", + ".vue", + ".svelte" + ], + "reference_task": "Retain source and complete tracked-name facts, then report scanner observations. A missing tracked name alone is not a reference-positive label: generated output, examples, package roots and aliases can be ambiguous. Do not produce precision or recall without independent reference adjudication.", + "tool_scope": "Isolated complete selected root document, with exact source bytes and a Git-object-verified path-inventory projection of empty regular files. No native whole-repository equivalence, builds, upstream code execution, model review or maintainer contact.", + "reporting": "Known path-audit-v1 data are development reuse, separately reported from this fresh collection. Freeze parser identity before acquisition; any later parser change invalidates fresh-source freeze matching. No adoption, external user feedback, independent annotation or AI superiority claim.", + "repositories": [ + "astral-sh/uv", + "pydantic/pydantic", + "fastapi/fastapi" + ] +} diff --git a/benchmarks/path-check-v2/result.json b/benchmarks/path-check-v2/result.json new file mode 100644 index 0000000..fdfd6c3 --- /dev/null +++ b/benchmarks/path-check-v2/result.json @@ -0,0 +1,821 @@ +{ + "schema_version": 1, + "status": "completed_development_replay", + "completed_at_utc": "2026-11-13T17:13:28.695280+00:00", + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "eb83eb8abfeadd7d13a67e0cdcb0bdc83f648658ee8487458e38b88c632bab9d", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "frozen_tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "d6b3b079d6a8ab0d870020abe5f6489b59536c5a6602e2083dfc80b0c97d1ed5", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "independent_accuracy_estimate": null, + "external_user_feedback": null, + "source_projection": "Git-verified names, empty non-instruction files", + "source_freeze_commit": "4b8ebc0", + "fresh_protocol_sha256": "f001a50db17286fbf085cc6d57038bde66ec216781e8085f0b14eec6d253b7e4", + "fresh_parser_matches_collection_freeze": false, + "frozen_result_sha256": "5a083ed967261acf79e1d0ba071c4ec76224581e1b50c51c5ee864c8a8c5fdec", + "runner_sha256_lf": "7e1bfd8967525bd77e3aa5dec93b55025b374fdf7328ea8e846fd5131e2e8893", + "known_natural_cases": [ + { + "id": "path-01", + "repository": "sveltejs/svelte", + "line": 5, + "destination": "./CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-02", + "repository": "sveltejs/svelte", + "line": 5, + "destination": "CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-03", + "repository": "sveltejs/svelte", + "line": 7, + "destination": "./.github/PULL_REQUEST_TEMPLATE.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-04", + "repository": "sveltejs/svelte", + "line": 7, + "destination": "PULL_REQUEST_TEMPLATE.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-05", + "repository": "pnpm/pnpm", + "line": 7, + "destination": "pnpm11/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-06", + "repository": "pnpm/pnpm", + "line": 8, + "destination": "pnpm/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-07", + "repository": "pnpm/pnpm", + "line": 8, + "destination": "./pnpm/AGENTS.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-08", + "repository": "pnpm/pnpm", + "line": 8, + "destination": "pnpm/AGENTS.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-09", + "repository": "vitest-dev/vitest", + "line": 22, + "destination": "packages/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-10", + "repository": "vitest-dev/vitest", + "line": 47, + "destination": "test/unit", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-11", + "repository": "vitest-dev/vitest", + "line": 67, + "destination": "dist/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-12", + "repository": "vitest-dev/vitest", + "line": 72, + "destination": "packages/vitest/src/runtime/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-13", + "repository": "facebook/react", + "line": 12, + "destination": "compiler/docs/rust-port/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-14", + "repository": "facebook/react", + "line": 12, + "destination": "compiler/crates/", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-15", + "repository": "TanStack/query", + "line": 4, + "destination": "./CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + }, + { + "id": "path-16", + "repository": "TanStack/query", + "line": 4, + "destination": "CONTRIBUTING.md", + "provisional_review_needed": false, + "current_flagged": false + } + ], + "known_controls": [ + { + "id": "control-01", + "repository": "sveltejs/svelte", + "target": "CONTRIBUTING.md", + "target_kind": "blob", + "line": 5, + "destination": "./CONTRIBUTING.md", + "frozen_flagged": true, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 5, + "message": "Referenced path does not exist: ./CONTRIBUTING.md" + } + ], + "projection": { + "omitted_target": "CONTRIBUTING.md", + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-02", + "repository": "sveltejs/svelte", + "target": ".github/PULL_REQUEST_TEMPLATE.md", + "target_kind": "blob", + "line": 7, + "destination": "./.github/PULL_REQUEST_TEMPLATE.md", + "frozen_flagged": true, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 7, + "message": "Referenced path does not exist: ./.github/PULL_REQUEST_TEMPLATE.md" + } + ], + "projection": { + "omitted_target": ".github/PULL_REQUEST_TEMPLATE.md", + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-03", + "repository": "pnpm/pnpm", + "target": "pnpm11", + "target_kind": "tree", + "line": 7, + "destination": "pnpm11/", + "frozen_flagged": false, + "current_flagged": false, + "current_findings": [], + "projection": { + "omitted_target": "pnpm11", + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm/CLAUDE.md", + "pnpm/GEMINI.md" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-04", + "repository": "pnpm/pnpm", + "target": "pnpm", + "target_kind": "tree", + "line": 8, + "destination": "pnpm/", + "frozen_flagged": false, + "current_flagged": false, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 8, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 30, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 79, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 113, + "message": "Referenced path does not exist: ./pnpm/CONTRIBUTING.md" + }, + { + "file": "AGENTS.md", + "line": 357, + "message": "Referenced path does not exist: pnpm/npm/napi/index.d.ts" + }, + { + "file": "AGENTS.md", + "line": 396, + "message": "Referenced path does not exist: ./pnpm/CODE_STYLE_GUIDE.md" + } + ], + "projection": { + "omitted_target": "pnpm", + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm11/__fixtures__/has-outdated-deps-using-catalog-protocol/node_modules/is-negative", + "pnpm11/__fixtures__/has-outdated-deps-using-npm-alias/node_modules/is-negative-alias" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-05", + "repository": "pnpm/pnpm", + "target": "pnpm/AGENTS.md", + "target_kind": "blob", + "line": 8, + "destination": "./pnpm/AGENTS.md", + "frozen_flagged": true, + "current_flagged": true, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 8, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 30, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 79, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + } + ], + "projection": { + "omitted_target": "pnpm/AGENTS.md", + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm/CLAUDE.md", + "pnpm/GEMINI.md", + "pnpm11/__fixtures__/has-outdated-deps-using-catalog-protocol/node_modules/is-negative", + "pnpm11/__fixtures__/has-outdated-deps-using-npm-alias/node_modules/is-negative-alias" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-06", + "repository": "vitest-dev/vitest", + "target": "packages", + "target_kind": "tree", + "line": 22, + "destination": "packages/", + "frozen_flagged": false, + "current_flagged": false, + "current_findings": [ + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: packages/vitest/src/node/cli/cli-config.ts" + }, + { + "file": "AGENTS.md", + "line": 198, + "message": "Referenced path does not exist: packages/vitest/LICENSE.md" + }, + { + "file": "AGENTS.md", + "line": 199, + "message": "Referenced path does not exist: packages/vitest/src/node/cli/cli-config.ts" + } + ], + "projection": { + "omitted_target": "packages", + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-07", + "repository": "vitest-dev/vitest", + "target": "test/unit", + "target_kind": "tree", + "line": 47, + "destination": "test/unit", + "frozen_flagged": false, + "current_flagged": false, + "current_findings": [], + "projection": { + "omitted_target": "test/unit", + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "id": "control-08", + "repository": "vitest-dev/vitest", + "target": "packages/vitest/src/runtime", + "target_kind": "tree", + "line": 72, + "destination": "packages/vitest/src/runtime/", + "frozen_flagged": false, + "current_flagged": false, + "current_findings": [], + "projection": { + "omitted_target": "packages/vitest/src/runtime", + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + } + ], + "explicit_directory_variants": [ + { + "parent_control": "control-03", + "repository": "pnpm/pnpm", + "line": 7, + "original_destination": "pnpm11/", + "destination": "./pnpm11/", + "source_sha256": "0613294abb2b003da4be622502ff48a5183a7c2e97a85725fac60ff76b0568e8", + "variant_source_sha256": "86f161db1114f241a145fdaaef1ad0e386c4f041ebc8fc4850df14bc9169f515", + "synthetic_instruction_edit": "prefix ./ to the one quoted directory on this line", + "target_removed": "pnpm11", + "current_flagged": true, + "findings": [ + { + "file": "AGENTS.md", + "line": 7, + "message": "Referenced path does not exist: ./pnpm11/" + } + ] + }, + { + "parent_control": "control-04", + "repository": "pnpm/pnpm", + "line": 8, + "original_destination": "pnpm/", + "destination": "./pnpm/", + "source_sha256": "0613294abb2b003da4be622502ff48a5183a7c2e97a85725fac60ff76b0568e8", + "variant_source_sha256": "9be2b0b3adc6db24e27032cfd3a343e810e6de083feebcfb4b9ae010389fba77", + "synthetic_instruction_edit": "prefix ./ to the one quoted directory on this line", + "target_removed": "pnpm", + "current_flagged": true, + "findings": [ + { + "file": "AGENTS.md", + "line": 8, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 8, + "message": "Referenced path does not exist: ./pnpm/" + }, + { + "file": "AGENTS.md", + "line": 30, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 79, + "message": "Referenced path does not exist: ./pnpm/AGENTS.md" + }, + { + "file": "AGENTS.md", + "line": 113, + "message": "Referenced path does not exist: ./pnpm/CONTRIBUTING.md" + }, + { + "file": "AGENTS.md", + "line": 357, + "message": "Referenced path does not exist: pnpm/npm/napi/index.d.ts" + }, + { + "file": "AGENTS.md", + "line": 396, + "message": "Referenced path does not exist: ./pnpm/CODE_STYLE_GUIDE.md" + } + ] + }, + { + "parent_control": "control-06", + "repository": "vitest-dev/vitest", + "line": 22, + "original_destination": "packages/", + "destination": "./packages/", + "source_sha256": "27416758e516ecf031af0096eff7f66ae36e28070676b93707d0dc85f8d385aa", + "variant_source_sha256": "493938d19c50385fb3368c43c675b483c5bb978a4527003d8d3c067ad7bb6c63", + "synthetic_instruction_edit": "prefix ./ to the one quoted directory on this line", + "target_removed": "packages", + "current_flagged": true, + "findings": [ + { + "file": "AGENTS.md", + "line": 22, + "message": "Referenced path does not exist: ./packages/" + }, + { + "file": "AGENTS.md", + "line": 192, + "message": "Referenced path does not exist: packages/vitest/src/node/cli/cli-config.ts" + }, + { + "file": "AGENTS.md", + "line": 198, + "message": "Referenced path does not exist: packages/vitest/LICENSE.md" + }, + { + "file": "AGENTS.md", + "line": 199, + "message": "Referenced path does not exist: packages/vitest/src/node/cli/cli-config.ts" + } + ] + }, + { + "parent_control": "control-08", + "repository": "vitest-dev/vitest", + "line": 72, + "original_destination": "packages/vitest/src/runtime/", + "destination": "./packages/vitest/src/runtime/", + "source_sha256": "27416758e516ecf031af0096eff7f66ae36e28070676b93707d0dc85f8d385aa", + "variant_source_sha256": "e5d0349af92e7c8ab2f4b73ca3cc54cbc7ec446693c834c966f2eae8e8b9aba9", + "synthetic_instruction_edit": "prefix ./ to the one quoted directory on this line", + "target_removed": "packages/vitest/src/runtime", + "current_flagged": true, + "findings": [ + { + "file": "AGENTS.md", + "line": 72, + "message": "Referenced path does not exist: ./packages/vitest/src/runtime/" + } + ] + } + ], + "known_generated_output": { + "line": 201, + "destination": "docs/.vitepress/contributor-names.json", + "repository": "vitest-dev/vitest", + "source_revision": "f4fdbcae08ec365f35d9e1866ce3e7d04880ea60", + "frozen_flagged": true, + "current_flagged": false, + "producer_context_git_verified": true + }, + "known_whole_document_observations": { + "sveltejs/svelte": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "eb83eb8abfeadd7d13a67e0cdcb0bdc83f648658ee8487458e38b88c632bab9d", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "pnpm/pnpm": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "eb83eb8abfeadd7d13a67e0cdcb0bdc83f648658ee8487458e38b88c632bab9d", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + ".claude/skills", + "CLAUDE.md", + "pnpm/CLAUDE.md", + "pnpm/GEMINI.md", + "pnpm11/__fixtures__/has-outdated-deps-using-catalog-protocol/node_modules/is-negative", + "pnpm11/__fixtures__/has-outdated-deps-using-npm-alias/node_modules/is-negative-alias" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "vitest-dev/vitest": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "eb83eb8abfeadd7d13a67e0cdcb0bdc83f648658ee8487458e38b88c632bab9d", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + "test/e2e/project-references/packages/project-b/node_modules/project-a" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "facebook/react": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "eb83eb8abfeadd7d13a67e0cdcb0bdc83f648658ee8487458e38b88c632bab9d", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + "TanStack/query": { + "tool": { + "name": "AgentConfigScore", + "version": "0.26.1", + "source_fingerprint": { + "format": "acs-python-source-v1", + "sha256": "eb83eb8abfeadd7d13a67e0cdcb0bdc83f648658ee8487458e38b88c632bab9d", + "files": [ + "__init__.py", + "__main__.py", + "cli.py", + "config.py", + "doctor.py", + "entrypoint.py", + "feedback.py", + "gitdiff.py", + "guardrails.py", + "history.py", + "initializer.py", + "provenance.py", + "regression.py", + "rules.py", + "sarif.py", + "scanner.py", + "scopes.py" + ] + } + }, + "findings": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + "packages/angular-query-experimental/root.oxlint.config.ts", + "packages/angular-query-persist-client/root.oxlint.config.ts", + "packages/eslint-plugin-query/root.oxlint.config.ts", + "packages/lit-query/root.oxlint.config.ts", + "packages/lit-query/root.tsdown.config.js", + "packages/preact-query-devtools/root.oxlint.config.ts", + "packages/preact-query-devtools/root.tsdown.config.js", + "packages/preact-query-persist-client/root.oxlint.config.ts", + "packages/preact-query-persist-client/root.tsdown.config.js", + "packages/preact-query/root.oxlint.config.ts", + "packages/preact-query/root.tsdown.config.js", + "packages/query-async-storage-persister/root.oxlint.config.ts", + "packages/query-async-storage-persister/root.tsdown.config.js", + "packages/query-broadcast-client-experimental/root.oxlint.config.ts", + "packages/query-broadcast-client-experimental/root.tsdown.config.js", + "packages/query-codemods/root.oxlint.config.ts", + "packages/query-core/root.oxlint.config.ts", + "packages/query-core/root.tsdown.config.js", + "packages/query-devtools/root.oxlint.config.ts", + "packages/query-persist-client-core/root.oxlint.config.ts", + "packages/query-persist-client-core/root.tsdown.config.js", + "packages/query-sync-storage-persister/root.oxlint.config.ts", + "packages/query-sync-storage-persister/root.tsdown.config.js", + "packages/query-test-utils/root.oxlint.config.ts", + "packages/react-query-devtools/root.oxlint.config.ts", + "packages/react-query-devtools/root.tsdown.config.js", + "packages/react-query-next-experimental/root.oxlint.config.ts", + "packages/react-query-next-experimental/root.tsdown.config.js", + "packages/react-query-persist-client/root.oxlint.config.ts", + "packages/react-query-persist-client/root.tsdown.config.js", + "packages/react-query/root.oxlint.config.ts", + "packages/react-query/root.tsdown.config.js", + "packages/solid-query-devtools/root.oxlint.config.ts", + "packages/solid-query-persist-client/root.oxlint.config.ts", + "packages/solid-query/root.oxlint.config.ts", + "packages/svelte-query-devtools/root.oxlint.config.ts", + "packages/svelte-query-persist-client/root.oxlint.config.ts", + "packages/svelte-query/root.oxlint.config.ts", + "packages/vue-query-devtools/root.oxlint.config.ts", + "packages/vue-query-devtools/root.tsdown.config.js", + "packages/vue-query/root.oxlint.config.ts", + "packages/vue-query/root.tsdown.config.js" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + } + }, + "new_whole_document_warnings": [], + "fresh_registry": [ + { + "repository": "astral-sh/uv", + "status": "excluded", + "reason": "license_outside_allowlist" + }, + { + "repository": "pydantic/pydantic", + "revision": "560f0f96a37d6913afdfddb2de22030ef08e68c3", + "status": "completed_source_smoke", + "selected_candidates": 0, + "source_url": "https://github.com/pydantic/pydantic/blob/560f0f96a37d6913afdfddb2de22030ef08e68c3/AGENTS.md", + "findings": [], + "candidates": [], + "projection": { + "omitted_target": null, + "skipped_aliases_or_gitlinks": [ + "CONTRIBUTING.md", + "tests/pydantic_core" + ], + "non_instruction_file_contents": "empty placeholders, not upstream contents" + } + }, + { + "repository": "fastapi/fastapi", + "status": "excluded", + "reason": "registered_root_instruction_absent" + } + ], + "acceptance": { + "passed": true, + "scope": "known_development_contracts_only", + "failures": [] + } +} diff --git a/benchmarks/path-check-v2/result.md b/benchmarks/path-check-v2/result.md new file mode 100644 index 0000000..91b4227 --- /dev/null +++ b/benchmarks/path-check-v2/result.md @@ -0,0 +1,46 @@ +# Path-reference development replay + +Known development inputs; no independent accuracy estimate or external user adoption claim. + +| Known control | Literal | Frozen 0.26.1 | Current source | +|---|---|---|---| +| control-01 | `./CONTRIBUTING.md` | True | True | +| control-02 | `./.github/PULL_REQUEST_TEMPLATE.md` | True | True | +| control-03 | `pnpm11/` | False | False | +| control-04 | `pnpm/` | False | False | +| control-05 | `./pnpm/AGENTS.md` | True | True | +| control-06 | `packages/` | False | False | +| control-07 | `test/unit` | False | False | +| control-08 | `packages/vitest/src/runtime/` | False | False | + +Vitest's declared generated output: frozen warning **True**, current warning **False**. +Producer source was checked against the retained Git tree. Upstream code was never built or executed. + +Known target-removal controls detected: 3/8 frozen; 3/8 current. +Unprefixed directory names remain outside the default prose heuristic. These mutations are not natural upstream defects. + +## Separate explicit-directory variants + +Detected 4/4 synthetic variants after prefixing ./ to the selected literal, then removing its target. +Both the instruction spelling and target state change in these separate controls. They are not pooled with unchanged-text controls. + +## Separate fresh registry + +| Repository | Result | Selected candidates | +|---|---|---| +| astral-sh/uv | license_outside_allowlist | 0 | +| pydantic/pydantic | completed_source_smoke | 0 | +| fastapi/fastapi | registered_root_instruction_absent | 0 | + +The fixed fresh registry produced no eligible path candidates. It supplies no fresh correctness estimate; exclusions were not replaced. +The collected document's raw scanner observations remain in JSON, without human reference labels. + +## Reproduction identity + +Current source: `eb83eb8abfeadd7d13a67e0cdcb0bdc83f648658ee8487458e38b88c632bab9d`. +Frozen published source: `d6b3b079d6a8ab0d870020abe5f6489b59536c5a6602e2083dfc80b0c97d1ed5`. +The changed implementation is an unreleased source build even when its package version string still says 0.26.1. + +Parser matches the pre-collection freeze: False. +A later parser may replay these inputs as development data; a mismatch does not preserve first-use freshness. +Known development acceptance passed: True. diff --git a/docs/README.md b/docs/README.md index a8e4074..4c49bc9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -29,6 +29,7 @@ read the result, and troubleshoot a failing gate. ## Understanding findings - [Score contract and limitations](limitations.md) +- [Case study: generated-output warnings and explicit directory checks](path-case-study.md) (unreleased source) - [Regression input consistency and file-removal checks](regression-coverage.md) - [Runnable design lab: scores, baseline gates and caller overrides](../examples/regression-lab/README.md) (synthetic development example) - [Path-reference grammar and limits](limitations.md#plain-prose-path-references) @@ -41,6 +42,8 @@ Use `agent-config-score rules` for the installed version's actual catalog, and ## Development and evidence +- [Public maintainer feedback mapped to delivered features](feedback-to-delivery.md) + - [Release acceptance and localization sequence](release-readiness.md) - [Maintained benchmarks](../benchmarks/README.md) - [AI-comparison protocol and limitations](review-comparison.md) diff --git a/docs/feedback-to-delivery.md b/docs/feedback-to-delivery.md new file mode 100644 index 0000000..beed5b3 --- /dev/null +++ b/docs/feedback-to-delivery.md @@ -0,0 +1,33 @@ +# Public maintainer feedback and delivered behavior + +In [issue #46](https://github.com/LE0-Lin/AgentConfigScore/issues/46), +JasonLandbridge described four capabilities he would find useful. This is +public, externally authored **requirements feedback**. It establishes the +origin of a request. External installation, sustained use, measured time saved +and maintainer-confirmed effectiveness remain unverified. + +| Requested capability, paraphrased | Delivered surface | Verification and boundary | +|---|---|---| +| Check whether instruction-file references remain valid | `dead-path`, Markdown link resolution, repository/scope path checks | Released checks have deterministic tests. The [new path case study](path-case-study.md) adds a generated-output correction and explicit relative-directory handling in unreleased source. Generated and package-relative ambiguity remain bounded. | +| Give practical instruction-file guidance | [Advisory checklist](best-practices.md), [maintainer workflow](maintainer-workflow.md), opt-in [safeguard review](guardrail-suggestions.md) | Documentation and narrowly recognized review suggestions are available. They do not constitute a general semantic reviewer or a scored best-practice certification. | +| Surface prompt-injection concerns | The released `prompt-injection-override` warning and its conservative context handling | The rule targets explicit prior-instruction override phrases. It does not detect arbitrary injection attacks or enforce agent behavior. | +| Make review results visible on PRs | [Opt-in single-comment workflow](pr-comments.md), including generated setup via `init --pr-comment` | The repository's CI and integration tests validate the maintained recipe. A caller explicitly grants comment permission. Adoption by the requester's repository is not established. | + +## How to use this evidence + +The defensible project story is a concrete feedback loop: a public maintainer +requested review features; corresponding interfaces were implemented; the +project retained acceptance tests, versioned releases and limits; real source +inputs then exposed scanner errors that required further maintenance. + +The [path replay](../benchmarks/path-check-v2/README.md) makes one of those +maintenance changes inspectable without executing upstream commands or asking +another maintainer to confirm an obvious sentence. It preserves failed attempts +and the final conservative scope. It remains project-authored development +evidence. + +Independent reference labels, a matched AI comparison and externally observed +workflow outcomes are separate open evidence gaps. This document does not turn +a feature request, a GitHub star or a project-maintained test suite into a user +success metric. It makes the existing request and implemented response easy to +verify directly. diff --git a/docs/limitations.md b/docs/limitations.md index a5a9d81..fa68053 100644 --- a/docs/limitations.md +++ b/docs/limitations.md @@ -234,13 +234,36 @@ or after `merge target is`, `fork of`, `re-pushed to a branch in`, or form is also recognized. Merely mentioning GitHub or a repository does not exempt local paths. Other paraphrases and languages may still be misclassified. +A complete same-line declaration such as `` `docs/out.json` is generated by +`make docs` `` or `` `docs/out.json` is generated from `src/schema.ts`. `` exempts +only the output prose reference from an existence warning. `regenerated` and +`rewritten` are also recognized. The producer must be a closed, single-backtick +span; an optional short parenthesized note may follow it. Negated, conditional, +unfinished or extended clauses remain checked. The generator's own file path +and actual Markdown link destinations remain checked. This recognizes a declared +output role; it does not verify the producer, build the artifact, or establish +that the declaration is truthful. Command and credential rules remain active. + +Single-backtick directory references with an explicit `./` or `../` prefix and +a trailing `/`, such as `./packages/` and `../src/`, require a real directory under the repository root or an applicable +instruction-scope base. A regular file cannot satisfy them. Directory references +do not use the ambiguous package-suffix fallback. Unquoted directory prose and +unprefixed names such as `packages/` and extensionless names without a trailing +slash, such as `test/unit`, remain outside this heuristic; use an explicit +relative prefix and trailing slash or a Markdown link when an +existence check is intended. Branch prefixes, URLs, placeholders and out-of-root +paths remain excluded. These checks do not infer working-directory changes. +This avoids guessing whether unprefixed names denote package exports or +install/build outputs. `./dist/` and `./packages/client/dist/` opt into a +concrete existence check. + Package-relative suffix lookup includes existing paths under `build`, `dist`, `target` and `.next`; instruction discovery still skips those trees. Dependency and administration trees remain excluded from the suffix index, directory symlinks are not traversed, and external/broken symlink entries are excluded. Existence does not establish that a file is authoritative, generated correctly, -or intended by an ambiguous reference. Generated/untracked files not present in -the checkout can still be reported missing; filesystem case behavior remains +or intended by an ambiguous reference. Generated/untracked files without one of +the bounded output declarations can still be reported missing; filesystem case behavior remains host-dependent. These exemptions do not disable command or credential checks. Directory traversal errors while building the index stop the scan with an diff --git a/docs/path-case-study.md b/docs/path-case-study.md new file mode 100644 index 0000000..9a09cc0 --- /dev/null +++ b/docs/path-case-study.md @@ -0,0 +1,77 @@ +# A generated file should not become a broken-path warning + +This case shows a concrete scanner failure on a public project's instructions, +the correction, and a regression caught while implementing it. It is a +maintainer development case with reproducible source evidence; it does not +establish external adoption or independent detection accuracy. + +## The user's review problem + +An instruction file can mention checked-in source, a required directory, and a +file that appears only after a build. Reporting every absent name as a broken +reference makes a CI report noisy. Ignoring all paths near the word "generated" +could instead conceal a missing generator or an unrelated required source file. + +At [the pinned Vitest revision](https://github.com/vitest-dev/vitest/blob/f4fdbcae08ec365f35d9e1866ce3e7d04880ea60/AGENTS.md#L201), +the document declares that `docs/.vitepress/contributor-names.json` is generated +by `pnpm docs:contributors`. The published ACS v0.26.1 warns about that absent +output in an unbuilt checkout. The retained package script and producer source +confirm the exact write target; the audit never runs the upstream command. + +## Correction and an observed failure + +The changed scanner recognizes a bounded output declaration attached to that +single prose reference. It continues checking the generator's source path, +actual Markdown link destinations, dangerous commands and credentials. A +general generated-files heading does not exempt later references, and a +conditional or unfinished sentence does not satisfy the grammar. + +The same maintenance pass explores checks for quoted directories ending in `/`. +The first real-source replay then catches a regression in this new rule: +Vitest uses bare `dist/` as a package export/build-output location, and the +scanner incorrectly demands a root directory. The known-negative gate fails. +That failing report is retained. Bare output names are subsequently excluded; +explicit paths such as `./dist/` still request an existence check. A wider +inspection then finds package `lib/` outputs and Husky's install-time directory. +The final rule requires an explicit `./` or `../` prefix for directory prose; +unprefixed directory names stay unresolved instead of accumulating exemptions. + +## What the completed replay establishes + +| Check | Frozen published version | Changed source | +|---|---|---| +| Generated contributor file | Warning | Warning removed | +| Eight independently applied target-removal controls, original wording | 3 detected | 3 detected | +| Original 16 selected natural occurrences | 0 flagged | 0 flagged | + +Four separate controls explicitly prefix the directory literal with `./` before +removing its target. Both the wording and inventory change; those controls are +kept separate from the original eight. Unprefixed directory names remain outside +the conservative prose heuristic. Sixteen correlated selected occurrences +cannot establish general precision, and these development controls cannot +establish independent recall. + +The [raw results, failed attempt, source hashes and offline reproduction](../benchmarks/path-check-v2/README.md) +allow readers to inspect the unfavorable observations as well as the fixes. +The complete source suite and installed-package CI check other formats and +operating systems separately. The names-only replay itself uses Linux because +some retained repository trees require a case-sensitive filesystem. + +## Apply the result + +The implementation is currently **unreleased source**, separate from the +published v0.26.1 wheel. From a reviewed checkout, install with +`python -m pip install .` and run ordinary ACS scans/comparisons. A passing +result means the selected deterministic checks passed; the generated-output +declaration is not authenticated and no upstream build is executed. + +For a directory intended to exist at a concrete location, use `./` or `../` +with a trailing slash. For an output that may be absent before +a build, state its producer clearly. Actual Markdown links continue to require +their destinations. The [documented path grammar](limitations.md#plain-prose-path-references) +defines the exact supported forms and remaining ambiguity. + +This gives a user-reviewable engineering result: fewer known noisy warnings, +additional explicit directory coverage, and a demonstrated failing gate during +development. External users' sustained workflows and independently adjudicated +accuracy remain open validation work. diff --git a/docs/simplified/limitations.md b/docs/simplified/limitations.md index 944a2ba..4b15e40 100644 --- a/docs/simplified/limitations.md +++ b/docs/simplified/limitations.md @@ -80,6 +80,12 @@ v0.25.0+还检查简单的 `[指南][setup]`、`[setup][]` 引用式链接及图 ## 普通散文中的路径 +目录引用须同时具有明确的 `./` 或 `../` 前缀和末尾 `/`,如 `./packages/`、`../src/`,才检查适用仓库/指令作用域内的真实目录;普通文件不能满足目录引用,目录也不使用模糊后缀匹配。无前缀的 `packages/`、`dist/`、`.husky/_/` 及没有末尾斜杠的 `test/unit` 不推断,因为它们可能指包内位置或安装/构建产物。真正的 Markdown 目录链接仍按文档相对位置检查。 + +未发布源码增加两项有界处理:同一行紧邻路径、完整且闭合的 `` `docs/out.json` is generated by `make docs` ``(也支持 `generated from`、`regenerated`、`rewritten`)仅把产物视为可在构建后出现;生产者须为单反引号代码,末尾可带简短括号说明。生成器自身的文件路径、真正的 Markdown 链接、危险命令与凭据仍检查。不验证生成声明是否真实,不执行构建;否定、条件、未闭合或继续扩展的子句不豁免。 + +未加反引号的目录散文、分支、URL、示例占位符及越界路径继续排除。PyPI v0.26.1 的既有报告不因这些源码变更而重写。 + 反引号中的 `./`、`../` 文件路径按仓库根目录及适用的指令目录核对;嵌套 AGENTS 文件保留仓库内祖先目录的解释,其他格式也接受明确的文档相对路径。这些路径不会因无关包有相同后缀而通过。`.github` 等名称中的开头圆点会保留;所有解释都逃出仓库时,不访问外部路径,也不拿索引中的其他文件代替。真正的 Markdown 链接仍严格相对于文档目录。 无前缀的散文路径仍使用保守的包相对后缀匹配。两种模式都不推断命令的工作目录、不执行或跟踪 `cd` 指令,也不证明哪一种解释符合作者意图。 diff --git a/docs/traditional/limitations.md b/docs/traditional/limitations.md index f8a358c..fcb27b0 100644 --- a/docs/traditional/limitations.md +++ b/docs/traditional/limitations.md @@ -80,6 +80,12 @@ v0.25.0+也檢查簡單的 `[指南][setup]`、`[setup][]` 參照式連結及圖 ## 一般敘述中的路徑 +目錄引用須同時具有明確的 `./` 或 `../` 前綴與末尾 `/`,如 `./packages/`、`../src/`,才檢查適用儲存庫/指令作用域內的真實目錄;一般檔案不能滿足目錄引用,目錄也不使用模糊後綴匹配。無前綴的 `packages/`、`dist/`、`.husky/_/` 及沒有末尾斜杠的 `test/unit` 不推論,因為它們可能指套件內位置或安裝/建置產物。實際的 Markdown 目錄連結仍按文件相對位置檢查。 + +未發佈原始碼增加兩項有界處理:同一行緊鄰路徑、完整且閉合的 `` `docs/out.json` is generated by `make docs` ``(也支援 `generated from`、`regenerated`、`rewritten`)僅將產物視為可在建置後出現;產生者須為單反引號程式碼,末尾可帶簡短括號說明。產生器自身的檔案路徑、實際的 Markdown 連結、危險命令與認證資訊仍檢查。不驗證產生宣告是否真實,不執行建置;否定、條件、未閉合或繼續擴展的子句不豁免。 + +未加反引號的目錄敘述、分支、URL、範例佔位符及越界路徑繼續排除。PyPI v0.26.1 的既有報告不因這些原始碼變更而重寫。 + 反引號中的 `./`、`../` 檔案路徑依儲存庫根目錄及適用的指令目錄檢查;巢狀 AGENTS 檔保留儲存庫內祖先目錄的解釋,其他格式也接受明確的文件相對路徑。這些路徑不會因無關套件有相同後綴而通過。`.github` 等名稱的開頭圓點會保留;所有解釋都離開儲存庫時,不存取外部路徑,也不以索引中的其他檔案替代。實際的 Markdown 連結仍嚴格依文件目錄解析。 無前綴的敘述路徑仍使用保守的套件相對後綴匹配。兩種模式都不推論命令的工作目錄、不執行或追蹤 `cd` 指令,也不證明哪一種解釋符合作者意圖。 diff --git a/scripts/run_path_regression_check.py b/scripts/run_path_regression_check.py new file mode 100644 index 0000000..b195193 --- /dev/null +++ b/scripts/run_path_regression_check.py @@ -0,0 +1,239 @@ +"""Offline installed-tool replay: known path fixes and a separate fresh registry. + +Names-only Git projections; never execute or build upstream code. This is +development evidence, with no independent labels or external user feedback. +""" +from __future__ import annotations + +import argparse +from datetime import datetime, timezone +import gzip +import hashlib +import json +import os +from pathlib import Path +import sys +from tempfile import TemporaryDirectory + +import run_path_audit as audit +from run_pinned_tool_probe import verify_tree_objects + +ROOT = Path(__file__).resolve().parents[1] +FRESH = ROOT / "benchmarks/path-check-v2" + + +def fresh_inputs(base=FRESH): + protocol = audit.json_file(base / "protocol.json") + collection = audit.json_file(base / "collected/collection.json") + if collection["protocol_sha256"] != audit.digest((base / "protocol.json").read_bytes()): + raise ValueError("fresh protocol hash changed after collection") + trees = {} + for row in collection["repositories"]: + if row["status"] != "collected": + continue + for path_key, sha_key in (("source_file", "source_sha256"), ("tree_file", "tree_sha256"), + ("license_file", "license_sha256")): + raw = (base / "collected" / audit.portable(row[path_key])).read_bytes() + if audit.digest(raw) != row[sha_key]: + raise ValueError("fresh retained source hash mismatch") + tree = json.loads(gzip.decompress((base / "collected" / row["tree_file"]).read_bytes())) + if tree.get("truncated") is not False or len(tree["tree"]) > protocol["maximum_tree_entries"]: + raise ValueError("fresh complete bounded tree required") + verify_tree_objects(tree, row["tree_object_sha"]) + source = (base / "collected" / row["source_file"]).read_bytes() + index = {entry["path"]: entry for entry in tree["tree"]} + if (audit.blob_sha(source) != row["source_blob_sha"] + or index[row["instruction_path"]]["sha"] != row["source_blob_sha"]): + raise ValueError("fresh source Git identity mismatch") + trees[row["repository"]] = tree + return protocol, collection, trees + + +def check(python: Path): + _, _, collection, labels, trees = audit.verify_inputs(audit.BASE) + frozen = audit.json_file(audit.BASE / "result.json") + fresh_protocol, fresh_collection, fresh_trees = fresh_inputs() + expected_identity = fresh_protocol["tool_source_sha256"] + identity = None + + def scan(repo, tree, base, omitted=None): + nonlocal identity + data = audit.scan(python, tree, repo, base, omitted) + tool = data["tool"] + if (tool["source_fingerprint"]["sha256"] is None + or (identity is not None and tool != identity)): + raise ValueError("missing or mixed installed parser identity") + identity = tool + return data + + repos = {row["repository"]: row for row in collection["repositories"] if row["status"] == "collected"} + natural, snapshots = [], {} + for name, repo in repos.items(): + rows = [row for row in repo["candidates"] if row["selected"]] + if not rows: + continue + result = scan(repo, trees[name], audit.BASE) + snapshots[name] = result + for row in rows: + natural.append({"id": row["id"], "repository": name, "line": row["line"], + "destination": row["destination"], "provisional_review_needed": labels[row["id"]]["review_needed"], + "current_flagged": audit.flagged(result["findings"], row)}) + print("Known source replayed: " + name, flush=True) + + controls, explicit_variants = [], [] + for row in frozen["controls"]: + name = row["repository"] + result = scan(repos[name], trees[name], audit.BASE, row["target"]) + controls.append({key: row[key] for key in ("id", "repository", "target", "target_kind", "line", "destination")} + | {"frozen_flagged": row["tool_flagged"], "current_flagged": audit.flagged(result["findings"], row), + "current_findings": result["findings"], "projection": result["projection"]}) + print("Known control replayed: " + row["id"], flush=True) + if row["target_kind"] == "tree" and row["destination"].endswith("/"): + repo = repos[name] + source = (audit.BASE / "collected" / repo["source_file"]).read_bytes() + lines = source.decode("utf-8").splitlines(keepends=True) + literal = "`" + row["destination"] + "`" + if lines[row["line"] - 1].count(literal) != 1: + raise ValueError("explicit-path variant needs one exact literal on the original line") + destination = "./" + row["destination"] + lines[row["line"] - 1] = lines[row["line"] - 1].replace(literal, "`" + destination + "`", 1) + variant = "".join(lines).encode("utf-8") + with TemporaryDirectory(prefix="acs-explicit-path-variant-") as directory: + base = Path(directory) + (base / "collected").mkdir() + (base / "collected/variant.txt").write_bytes(variant) + changed = scan({**repo, "source_file": "variant.txt"}, trees[name], base, row["target"]) + explicit_variants.append({"parent_control": row["id"], "repository": name, + "line": row["line"], "original_destination": row["destination"], + "destination": destination, "source_sha256": audit.digest(source), + "variant_source_sha256": audit.digest(variant), + "synthetic_instruction_edit": "prefix ./ to the one quoted directory on this line", + "target_removed": row["target"], + "current_flagged": audit.flagged(changed["findings"], {**row, "destination": destination}), + "findings": changed["findings"]}) + + context = audit.json_file(audit.BASE / "posthoc-context.json") + vitest_tree = {entry["path"]: entry for entry in trees["vitest-dev/vitest"]["tree"]} + for row in context["files"]: + raw = row["content"].encode("utf-8") + if audit.digest(raw) != row["sha256"] or audit.blob_sha(raw) != vitest_tree[row["path"]]["sha"]: + raise ValueError("retained generator source evidence mismatch") + generated_case = {"line": 201, "destination": "docs/.vitepress/contributor-names.json"} + old = frozen["whole_document_path_findings_unscored_outside_selected_cases"]["vitest-dev/vitest"]["findings"] + generated = {**generated_case, "repository": "vitest-dev/vitest", "source_revision": context["revision"], + "frozen_flagged": audit.flagged(old, generated_case), + "current_flagged": audit.flagged(snapshots["vitest-dev/vitest"]["findings"], generated_case), + "producer_context_git_verified": True} + + fresh = [] + for repo in fresh_collection["repositories"]: + if repo["status"] != "collected": + fresh.append({"repository": repo["repository"], "status": "excluded", "reason": repo["reason"]}) + continue + tree = fresh_trees[repo["repository"]] + result = scan(repo, tree, FRESH) + selected = [row for row in repo["candidates"] if row["selected"]] + index = {entry["path"] for entry in tree["tree"]} + fresh.append({"repository": repo["repository"], "revision": repo["revision"], + "status": "completed_source_smoke", "selected_candidates": len(selected), + "source_url": repo["source_url"], "findings": result["findings"], + "candidates": [{**row, "literal_tracked_name_present": row["destination"].rstrip("/").removeprefix("./") in index, + "tool_flagged": audit.flagged(result["findings"], row), "reference_label": None} + for row in selected], "projection": result["projection"]}) + print("Fresh source replayed: " + repo["repository"], flush=True) + previous_snapshots = frozen["whole_document_path_findings_unscored_outside_selected_cases"] + new_warnings = [] + for name, result in snapshots.items(): + previous = {(row["line"], row["message"]) for row in previous_snapshots[name]["findings"]} + new_warnings.extend({"repository": name, **row} for row in result["findings"] + if (row["line"], row["message"]) not in previous) + return {"schema_version": 1, "status": "completed_development_replay", + "completed_at_utc": datetime.now(timezone.utc).isoformat(), "tool": identity, + "frozen_tool": frozen["tool"], "independent_accuracy_estimate": None, + "external_user_feedback": None, "source_projection": "Git-verified names, empty non-instruction files", + "source_freeze_commit": "4b8ebc0", "fresh_protocol_sha256": fresh_collection["protocol_sha256"], + "fresh_parser_matches_collection_freeze": identity["source_fingerprint"]["sha256"] == expected_identity, + "frozen_result_sha256": audit.digest((audit.BASE / "result.json").read_bytes()), + "runner_sha256_lf": hashlib.sha256(Path(__file__).read_text(encoding="utf-8").encode()).hexdigest(), + "known_natural_cases": natural, "known_controls": controls, "explicit_directory_variants": explicit_variants, + "known_generated_output": generated, + "known_whole_document_observations": snapshots, "new_whole_document_warnings": new_warnings, + "fresh_registry": fresh} + + +def acceptance(data): + """Known development contracts only; never score fresh unresolved inputs.""" + failures = [] + generated = data["known_generated_output"] + if generated["current_flagged"]: + failures.append("known_generated_output_warning_returned") + for row in data["known_controls"]: + explicit_directory = row["destination"].startswith(("./", "../")) and row["destination"].endswith("/") + if (row["target_kind"] == "blob" or explicit_directory) and not row["current_flagged"]: + failures.append("required_control_missed:" + row["id"]) + for row in data["explicit_directory_variants"]: + if not row["current_flagged"]: + failures.append("explicit_directory_variant_missed:" + row["parent_control"]) + for row in data["known_natural_cases"]: + if row["current_flagged"] and row["provisional_review_needed"] is False: + failures.append("known_natural_negative_flagged:" + row["id"]) + for row in data["new_whole_document_warnings"]: + # A new finding on these already reviewed documents requires explicit + # maintenance review, even when it is outside the selected 16 cases. + failures.append(f"new_unreviewed_path_warning:{row['repository']}:{row['line']}") + return {"passed": not failures, "scope": "known_development_contracts_only", "failures": failures} + + +def markdown(data): + rows = data["known_controls"] + lines = ["# Path-reference development replay", "", "Known development inputs; no independent accuracy estimate or external user adoption claim.", "", + "| Known control | Literal | Frozen 0.26.1 | Current source |", "|---|---|---|---|"] + for row in rows: + lines.append(f"| {row['id']} | `{row['destination']}` | {row['frozen_flagged']} | {row['current_flagged']} |") + generated = data["known_generated_output"] + lines += ["", f"Vitest's declared generated output: frozen warning **{generated['frozen_flagged']}**, current warning **{generated['current_flagged']}**.", + "Producer source was checked against the retained Git tree. Upstream code was never built or executed.", "", + f"Known target-removal controls detected: {sum(r['frozen_flagged'] for r in rows)}/{len(rows)} frozen; {sum(r['current_flagged'] for r in rows)}/{len(rows)} current.", + "Unprefixed directory names remain outside the default prose heuristic. These mutations are not natural upstream defects.", "", + "## Separate explicit-directory variants", "", + f"Detected {sum(r['current_flagged'] for r in data['explicit_directory_variants'])}/{len(data['explicit_directory_variants'])} synthetic variants after prefixing ./ to the selected literal, then removing its target.", + "Both the instruction spelling and target state change in these separate controls. They are not pooled with unchanged-text controls.", "", + "## Separate fresh registry", "", "| Repository | Result | Selected candidates |", "|---|---|---|"] + for row in data["fresh_registry"]: + lines.append(f"| {row['repository']} | {row.get('reason', row['status'])} | {row.get('selected_candidates', 0)} |") + lines += ["", "The fixed fresh registry produced no eligible path candidates. It supplies no fresh correctness estimate; exclusions were not replaced.", + "The collected document's raw scanner observations remain in JSON, without human reference labels.", "", + "## Reproduction identity", "", f"Current source: `{data['tool']['source_fingerprint']['sha256']}`.", + f"Frozen published source: `{data['frozen_tool']['source_fingerprint']['sha256']}`.", + "The changed implementation is an unreleased source build even when its package version string still says 0.26.1.", ""] + lines += [f"Parser matches the pre-collection freeze: {data['fresh_parser_matches_collection_freeze']}.", + "A later parser may replay these inputs as development data; a mismatch does not preserve first-use freshness.", + f"Known development acceptance passed: {data['acceptance']['passed']}.", ""] + return "\n".join(lines) + + +def main(argv=None): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--python", type=Path, required=True) + parser.add_argument("--output", type=Path, required=True) + parser.add_argument("--markdown", type=Path, required=True) + args = parser.parse_args(argv) + if os.name == "nt": + parser.error("Use a case-sensitive Linux filesystem for the complete tracked-name projections") + if args.output.exists() or args.markdown.exists(): + parser.error("Both report outputs must be new files") + try: + data = check(args.python.absolute()) + data["acceptance"] = acceptance(data) + with args.output.open("x", encoding="utf-8") as out: + out.write(json.dumps(data, indent=2, ensure_ascii=False) + "\n") + with args.markdown.open("x", encoding="utf-8") as out: + out.write(markdown(data)) + print(json.dumps({"known_development_acceptance": data["acceptance"]}), flush=True) + except (ValueError, OSError, KeyError) as error: + parser.exit(2, f"Path replay failed ({type(error).__name__}); partial outputs are not completed evidence.\n") + return 0 if data["acceptance"]["passed"] else 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/src/agent_config_score/scanner.py b/src/agent_config_score/scanner.py index 59a0511..fe6e9c8 100644 --- a/src/agent_config_score/scanner.py +++ b/src/agent_config_score/scanner.py @@ -918,10 +918,10 @@ def _normalized_line(line: str) -> str | None: return line -def _looks_like_repository_path(value: str) -> bool: +def _looks_like_repository_path(value: str, *, quoted_directory: bool = False) -> bool: """Reject code symbols, package names, URLs, and branch names before probing.""" normalized = value.replace("\\", "/") - if normalized.startswith("@") or normalized.endswith("/"): + if normalized.startswith("@") or (normalized.endswith("/") and not quoted_directory): return False if normalized.lower().startswith(NON_PATH_PREFIXES): return False @@ -936,6 +936,15 @@ def _looks_like_repository_path(value: str) -> bool: ): return False + # A single-backtick literal ending in a slash explicitly denotes a + # directory. Keep unquoted and extensionless names outside this heuristic. + if quoted_directory and normalized.endswith("/"): + # Unprefixed names can be package-relative or appear after install/build. + # Require an explicit document/repository-relative spelling rather than + # expanding a list of guesses about generated directory names. + return (normalized.startswith(("./", "../")) + and bool(re.fullmatch(r"(?:[A-Za-z0-9_.+@-]+/)+", normalized))) + name = PurePosixPath(normalized).name if name in PATH_BASENAMES: return True @@ -1130,6 +1139,13 @@ def _non_required_path_reference(text: str, match: re.Match, value: str) -> bool if re.match(r"^[ \t]*\([ \t]*if[ \t]+(?:it[ \t]+)?exists[ \t]*" r"(?:\)|[-:][^()\r\n]{1,120}\))", after, re.I): return True + # Declared generated output need not exist in an unbuilt checkout. Require + # a complete, immediate passive clause with a closed producer code span; + # do not let a distant 'generated' word exempt other references or links. + if re.fullmatch(r"[ \t]+is[ \t]+(?:generated|regenerated|rewritten)[ \t]+" + r"(?:by|from)[ \t]+`[^`\r\n]{1,160}`[ \t]*" + r"(?:\([^()\r\n]{1,160}\)[ \t]*)?[.!]?[ \t]*", after, re.I): + return True # A two-component GitHub slug may look like a source path (owner/tool.js). # Require a repository/remote role, not merely 'GitHub' somewhere nearby. slug = r"[A-Za-z0-9][A-Za-z0-9-]*/[A-Za-z0-9_.-]+" @@ -1170,7 +1186,10 @@ def _candidate_paths( continue if "://" in value or "|" in value or any(c in value for c in "*<>{}"): continue - if not _looks_like_repository_path(value): + quoted_directory = bool(m.group(1) and value.replace("\\", "/").endswith("/") + and text[m.start() - 1:m.start()] != "`" + and text[m.end():m.end() + 1] != "`") + if not _looks_like_repository_path(value, quoted_directory=quoted_directory): continue if _non_required_path_reference(text, m, value): continue @@ -1230,11 +1249,12 @@ def _candidate_exists( if target is None: continue checked = True - if target.exists(): + matches = target.is_dir() if candidate.endswith("/") else target.exists() + if matches: return True if not checked: return None - if not explicit_relative and repository_paths is not None: + if not explicit_relative and not candidate.endswith("/") and repository_paths is not None: # lstrip('./') removes characters, not a path prefix: it previously # erased the significant dot in .github and dots in parent traversals. normalized = PurePosixPath(candidate).as_posix() diff --git a/tests/test_generated_paths.py b/tests/test_generated_paths.py new file mode 100644 index 0000000..c926bdf --- /dev/null +++ b/tests/test_generated_paths.py @@ -0,0 +1,119 @@ +from pathlib import Path +import tempfile +import unittest + +from agent_config_score.scanner import analyze + + +FORMATS = ("AGENTS.md", "CLAUDE.md", "GEMINI.md", ".cursorrules", + ".github/copilot-instructions.md", ".cursor/rules/review.mdc") + + +class GeneratedPathTests(unittest.TestCase): + def scan(self, text, filename="AGENTS.md"): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + source = root / filename + source.parent.mkdir(parents=True, exist_ok=True) + source.write_text(text, encoding="utf-8") + return analyze(root) + + def dead(self, text, **kwargs): + return [(f.line, f.message) for f in self.scan(text, **kwargs).findings if f.code == "dead-path"] + + def test_explicit_generated_output_is_not_required_before_build(self): + text = ( + "- `docs/.vitepress/contributor-names.json` is generated by `pnpm docs:contributors`\n" + "- `docs/guide/cli-generated.md` is generated from `packages/vitest/src/node/cli/cli-config.ts` (it carries no banner saying so)\n" + "`docs/out.json` is regenerated by `make docs`.\n" + "`docs/out.json` IS GENERATED BY `make docs`!\n" + "`docs/out.json` is rewritten by `make docs`.\n" + ) + for filename in FORMATS: + with self.subTest(filename=filename): + self.assertEqual(self.dead(text, filename=filename), [ + (2, "Referenced path does not exist: packages/vitest/src/node/cli/cli-config.ts")]) + + def test_generated_words_and_incomplete_clauses_do_not_hide_required_files(self): + lines = ["Generated files: read `docs/missing.json`.", + "`docs/missing.json` is not generated by `make docs`.", + "`docs/missing.json` is generated by a script.", + "`docs/missing.json` is generated by `make docs` but must already exist.", + "`docs/missing.json` is generated by `make docs", + "`docs/missing.json` is generated.", + "`docs/missing.json` may be generated by `make docs`."] + self.assertEqual([line for line, _ in self.dead("\n".join(lines))], list(range(1, len(lines) + 1))) + + def test_exemption_does_not_cross_lines_or_hide_other_references(self): + self.assertEqual([line for line, _ in self.dead( + "`docs/out.json`\nis generated by `make docs`.\n" + "Read `src/missing.py`; `docs/out.json` is generated by `make docs`.\n")], [1, 3]) + + def test_markdown_destinations_are_checked_even_when_described_as_generated(self): + self.assertEqual(self.dead("[Output](docs/out.json) is generated by `make docs`.\n"), + [(1, "Referenced path does not exist: docs/out.json")]) + + def test_generated_context_does_not_exempt_command_or_secret_checks(self): + report = self.scan("`docs/out.json` is generated by `rm -rf cache`.\n" + "`docs/out.json` is generated by `make docs`.\n" + "TOKEN=ghp_" + "A" * 36 + "\n") + self.assertFalse(any(f.code == "dead-path" for f in report.findings)) + self.assertTrue(any(f.code == "rm-rf" for f in report.findings)) + self.assertTrue(any(f.code == "github-token" for f in report.findings)) + + +class DirectoryPathTests(unittest.TestCase): + def scan(self, text, directories=(), files=(), filename="AGENTS.md"): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + for name in directories: + (root / name).mkdir(parents=True, exist_ok=True) + for name in files: + target = root / name + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(b"content") + source = root / filename + source.parent.mkdir(parents=True, exist_ok=True) + source.write_text(text, encoding="utf-8") + return [f.line for f in analyze(root).findings if f.code == "dead-path"] + + def test_quoted_trailing_slash_directories_are_checked_across_formats(self): + for filename in FORMATS: + with self.subTest(filename=filename): + self.assertEqual(self.scan("CLI: `./pnpm11/`.\nSource: `./packages/vitest/src/runtime/`.\n", + filename=filename), [1, 2]) + self.assertEqual(self.scan("CLI: `./pnpm11/`.\n", directories=("pnpm11",), filename=filename), []) + + def test_regular_file_cannot_satisfy_directory_reference(self): + self.assertEqual(self.scan("CLI: `./pnpm11/`.\n", files=("pnpm11",)), [1]) + + def test_bare_build_outputs_do_not_assert_root_directory_existence(self): + for name in ("build", "dist", "target", ".next"): + with self.subTest(name=name): + self.assertEqual(self.scan(f"Package exports point at `{name}/`.\n"), []) + self.assertEqual(self.scan(f"Read `./{name}/`.\n"), [1]) + self.assertEqual(self.scan(f"Read `packages/client/{name}/`.\n"), []) + self.assertEqual(self.scan(f"Read `./packages/client/{name}/`.\n"), [1]) + self.assertEqual(self.scan(f"Read `./{name}/`.\n", directories=(name,)), []) + + def test_directory_does_not_use_ambiguous_suffix_fallback(self): + self.assertEqual(self.scan("Source: `./src/`.\n", directories=("packages/client/src",)), [1]) + + def test_explicit_and_nested_directory_bases(self): + self.assertEqual(self.scan("Read `./src/`.\n", filename="packages/client/AGENTS.md", + directories=("packages/client/src",)), []) + self.assertEqual(self.scan("Read `../src/`.\n", filename="packages/client/docs/AGENTS.md", + directories=("packages/client/src",)), []) + + def test_unquoted_extensionless_branch_and_example_names_remain_out_of_scope(self): + self.assertEqual(self.scan("Use src/.\nUse `test/unit`.\nBranch: `feature/change/`.\n" + "Remote: `https://host.test/src/`.\nImport `@scope/package/`.\n" + "Example: `src/foo/`.\nOutside: `../../outside/`.\n"), []) + + def test_optional_and_generated_directory_contexts_remain_local(self): + self.assertEqual(self.scan("Use `./dist/` (if exists), then read `./src/`.\n" + "`./dist/` is generated by `make build`.\n"), [1]) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_path_regression_check.py b/tests/test_path_regression_check.py new file mode 100644 index 0000000..b904508 --- /dev/null +++ b/tests/test_path_regression_check.py @@ -0,0 +1,74 @@ +import importlib.util +import hashlib +import json +from pathlib import Path +import sys +import unittest + + +ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(ROOT / "scripts")) +SPEC = importlib.util.spec_from_file_location("path_regression_check", ROOT / "scripts/run_path_regression_check.py") +CHECK = importlib.util.module_from_spec(SPEC) +SPEC.loader.exec_module(CHECK) + + +class PathRegressionCheckTests(unittest.TestCase): + def data(self): + return {"known_generated_output": {"current_flagged": False}, + "known_controls": [{"id": "directory", "target_kind": "tree", "destination": "./src/", "current_flagged": True}, + {"id": "file", "target_kind": "blob", "destination": "guide.md", "current_flagged": True}, + {"id": "unresolved-name", "target_kind": "tree", "destination": "test/unit", "current_flagged": False}], + "explicit_directory_variants": [{"parent_control": "variant", "current_flagged": True}], + "new_whole_document_warnings": [], + "known_natural_cases": [{"id": "negative", "provisional_review_needed": False, "current_flagged": False}]} + + def test_known_development_gate_retains_limit_without_requiring_miss(self): + data = self.data() + self.assertTrue(CHECK.acceptance(data)["passed"]) + data["known_controls"][2]["current_flagged"] = True + self.assertTrue(CHECK.acceptance(data)["passed"]) + + def test_returning_generated_false_positive_or_missing_required_control_fails(self): + for kind in ("generated", "directory", "file", "negative", "variant", "unselected"): + with self.subTest(kind=kind): + data = self.data() + if kind == "generated": + data["known_generated_output"]["current_flagged"] = True + elif kind == "negative": + data["known_natural_cases"][0]["current_flagged"] = True + elif kind == "variant": + data["explicit_directory_variants"][0]["current_flagged"] = False + elif kind == "unselected": + data["new_whole_document_warnings"].append({"repository": "owner/project", "line": 97}) + else: + data["known_controls"][0 if kind == "directory" else 1]["current_flagged"] = False + self.assertFalse(CHECK.acceptance(data)["passed"]) + + def test_fresh_collection_is_verified_without_inventing_positive_labels(self): + protocol, collection, trees = CHECK.fresh_inputs() + self.assertEqual(protocol["status"], "fresh_source_smoke_not_independent_accuracy") + self.assertEqual(collection["selected_cases"], 0) + self.assertEqual(len(trees), 1) + self.assertEqual(len(collection["repositories"]), 3) + self.assertTrue(all("review_needed" not in row for row in collection["repositories"])) + + def test_retained_reports_preserve_failures_and_separate_variant_counts(self): + evidence = json.loads((CHECK.FRESH / "evidence.json").read_text(encoding="utf-8")) + for name, digest in evidence["reports"].items(): + self.assertEqual(hashlib.sha256((CHECK.FRESH / name).read_bytes()).hexdigest(), digest) + result = json.loads((CHECK.FRESH / "result.json").read_text(encoding="utf-8")) + self.assertEqual(CHECK.acceptance(result), result["acceptance"]) + self.assertTrue(result["acceptance"]["passed"]) + self.assertFalse(result["fresh_parser_matches_collection_freeze"]) + self.assertEqual(sum(r["current_flagged"] for r in result["known_controls"]), 3) + self.assertEqual(len(result["explicit_directory_variants"]), 4) + self.assertTrue(all(r["current_flagged"] for r in result["explicit_directory_variants"])) + self.assertEqual(result["new_whole_document_warnings"], []) + failed = json.loads((CHECK.FRESH / "first-attempt.json").read_text(encoding="utf-8")) + self.assertFalse(failed["acceptance"]["passed"]) + self.assertIn("known_natural_negative_flagged:path-11", failed["acceptance"]["failures"]) + + +if __name__ == "__main__": + unittest.main()