From ce4cbdcb29e5f09d0b304fe3ee7ca5bddd111110 Mon Sep 17 00:00:00 2001 From: Zhibo Lin <147509942+LE0-Lin@users.noreply.github.com> Date: Mon, 16 Nov 2026 20:45:13 +0800 Subject: [PATCH] Prepare 0.27.0 with strict installed self-use release gates --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 11 ++++++ CHANGELOG.md | 2 + CITATION.cff | 4 +- README.md | 6 +-- README.simplified.md | 10 ++--- README.traditional.md | 10 ++--- docs/README.md | 2 +- docs/deletion-approval-bypass.md | 2 +- docs/feedback-to-delivery.md | 4 +- docs/limitations.md | 8 ++-- docs/maintainer-workflow.md | 2 +- docs/pr-comments.md | 6 +-- docs/reference.md | 4 +- docs/releases/v0.27.0.md | 59 ++++++++++++++++++++++++++++++ docs/self-use-check.md | 15 ++++++-- docs/simplified/limitations.md | 2 +- docs/traditional/limitations.md | 2 +- docs/verification-reporting.md | 2 +- pyproject.toml | 2 +- scripts/run_self_acceptance.py | 21 ++++++++--- src/agent_config_score/__init__.py | 2 +- tests/test_release_workflow.py | 3 ++ 23 files changed, 137 insertions(+), 44 deletions(-) create mode 100644 docs/releases/v0.27.0.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bcbb475..19e3e48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,7 +109,7 @@ jobs: python "$GITHUB_WORKSPACE/scripts/run_approval_demo.py" \ --python "$wheel_python" --output-dir "$RUNNER_TEMP/approval-demo" python "$GITHUB_WORKSPACE/scripts/run_self_acceptance.py" \ - --python "$wheel_python" --ref "$GITHUB_SHA" \ + --python "$wheel_python" --ref "$GITHUB_SHA" --require-current-fixes \ --output "$RUNNER_TEMP/self-use-acceptance.json" - name: Retain self-use acceptance and observed semantic limitations if: always() diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c7cefe5..ea83738 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -166,10 +166,21 @@ jobs: --python "$wheel_python" --output "$RUNNER_TEMP/cursor-coverage-demo.json" python "$GITHUB_WORKSPACE/scripts/run_approval_demo.py" \ --python "$wheel_python" --output-dir "$RUNNER_TEMP/release-approval-demo" + python "$GITHUB_WORKSPACE/scripts/run_self_acceptance.py" \ + --python "$wheel_python" --ref "$GITHUB_SHA" --require-current-fixes \ + --output "$RUNNER_TEMP/release-self-use.json" if [[ "$RUNNER_OS" == "Linux" ]]; then "$wheel_python" "$GITHUB_WORKSPACE/scripts/run_path_regression_check.py" --python "$wheel_python" \ --output "$RUNNER_TEMP/release-path-replay.json" --markdown "$RUNNER_TEMP/release-path-replay.md" fi + - name: Retain release self-use evidence + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: release-self-use-${{ matrix.os }} + path: ${{ runner.temp }}/release-self-use.json + if-no-files-found: error + retention-days: 14 - name: Retain release path evidence if: runner.os == 'Linux' uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c39a56..cf4cc3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +## v0.27.0 + - Add privacy-minimized `new-rule-counts` Action output and an optional PR comment breakdown with at most five rule types, a remaining-types count, repair/recheck commands, and explicit review guidance when a gate passes diff --git a/CITATION.cff b/CITATION.cff index c307c30..94176fc 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,8 +2,8 @@ cff-version: 1.2.0 message: "If you use AgentConfigScore in research, please cite this software." title: "AgentConfigScore: deterministic lint and regression checks for AI coding-agent instructions" type: software -version: 0.26.2 -date-released: 2026-11-15 +version: 0.27.0 +date-released: 2026-11-16 authors: - family-names: Lin given-names: Zhibo diff --git a/README.md b/README.md index 2602f94..d8bd135 100644 --- a/README.md +++ b/README.md @@ -94,10 +94,10 @@ covers setup, exits and troubleshooting. ## Release status -v0.26.2 Beta includes local lint, baseline-governed regression checks, auditable +v0.27.0 Beta includes local lint, baseline-governed regression checks, auditable exceptions, reports, safeguard review and opt-in Cursor attachment/coverage analysis. The Cursor profile is a bounded static prediction with explicit -unknowns. See the [release and upgrade notes](https://github.com/LE0-Lin/AgentConfigScore/blob/main/docs/releases/v0.26.2.md). +unknowns. See the [release and upgrade notes](https://github.com/LE0-Lin/AgentConfigScore/blob/main/docs/releases/v0.27.0.md). ## Cursor attachment changes @@ -115,7 +115,7 @@ For a declared API-only task: From a repository checkout, install the package and run the synthetic example: ```bash -python -m pip install --upgrade "agent-config-score==0.26.2" +python -m pip install --upgrade "agent-config-score==0.27.0" agent-config-score scope compare \ examples/cursor-scope-impact/base examples/cursor-scope-impact/narrowed \ --target src/api/service.py --fail-on-lost-directives --fail-on-unknown diff --git a/README.simplified.md b/README.simplified.md index 9d56170..c99fd1f 100644 --- a/README.simplified.md +++ b/README.simplified.md @@ -54,7 +54,7 @@ agent-config-score diff ## 发布版本 -v0.26.2 Beta 包含本地检查、基线回归门禁、可审计豁免、报告、删除保护审核,以及可选的 Cursor 加载与逐文件覆盖分析。Cursor 功能是有明确未知状态的静态预测。[发布与升级说明(英文)](docs/releases/v0.26.2.md)。 +v0.27.0 Beta 包含本地检查、基线回归门禁、可审计豁免、报告、删除保护审核,以及可选的 Cursor 加载与逐文件覆盖分析。Cursor 功能是有明确未知状态的静态预测。[发布与升级说明(英文)](docs/releases/v0.27.0.md)。 ## Cursor 加载变化审核 @@ -65,7 +65,7 @@ v0.26.2 Beta 包含本地检查、基线回归门禁、可审计豁免、报告 在源码仓库目录中运行合成示例: ```bash -python -m pip install --upgrade "agent-config-score==0.26.2" +python -m pip install --upgrade "agent-config-score==0.27.0" agent-config-score scope compare \ examples/cursor-scope-impact/base examples/cursor-scope-impact/narrowed \ --target src/api/service.py --fail-on-lost-directives --fail-on-unknown @@ -144,10 +144,10 @@ jobs: - uses: actions/checkout@v7 with: fetch-depth: 0 - - uses: LE0-Lin/AgentConfigScore@v0.26.2 + - uses: LE0-Lin/AgentConfigScore@v0.27.0 ``` -固定 `@v0.26.2` 有利于复现;`@v0` 是会随后续版本更新的滚动引用。PR 评论属于[可选集成(英文)](docs/pr-comments.md),扫描器默认不替你发评论。 +固定 `@v0.27.0` 有利于复现;`@v0` 是会随后续版本更新的滚动引用。PR 评论属于[可选集成(英文)](docs/pr-comments.md),扫描器默认不替你发评论。 ## 支持的指令文件 @@ -171,4 +171,4 @@ jobs: 图中的三次评分由 `agent-config-score history` 读取。[历史工作流(英文)](docs/score-history.md) -项目采用 [MIT 协议](LICENSE)。[发布与升级说明](docs/releases/v0.26.2.md)目前为英文。 +项目采用 [MIT 协议](LICENSE)。[发布与升级说明](docs/releases/v0.27.0.md)目前为英文。 diff --git a/README.traditional.md b/README.traditional.md index 6246805..ab7dfc8 100644 --- a/README.traditional.md +++ b/README.traditional.md @@ -54,7 +54,7 @@ agent-config-score diff ## 發布版本 -v0.26.2 Beta 包含本機檢查、基準回歸檢查、可稽核例外、報告、刪除保護審閱,以及選用的 Cursor 載入與逐檔覆蓋分析。Cursor 功能是具有明確未知狀態的靜態預測。[發布與升級說明(英文)](docs/releases/v0.26.2.md)。 +v0.27.0 Beta 包含本機檢查、基準回歸檢查、可稽核例外、報告、刪除保護審閱,以及選用的 Cursor 載入與逐檔覆蓋分析。Cursor 功能是具有明確未知狀態的靜態預測。[發布與升級說明(英文)](docs/releases/v0.27.0.md)。 ## Cursor 載入變化審閱 @@ -65,7 +65,7 @@ v0.26.2 Beta 包含本機檢查、基準回歸檢查、可稽核例外、報告 在原始碼儲存庫目錄中執行合成範例: ```bash -python -m pip install --upgrade "agent-config-score==0.26.2" +python -m pip install --upgrade "agent-config-score==0.27.0" agent-config-score scope compare \ examples/cursor-scope-impact/base examples/cursor-scope-impact/narrowed \ --target src/api/service.py --fail-on-lost-directives --fail-on-unknown @@ -144,10 +144,10 @@ jobs: - uses: actions/checkout@v7 with: fetch-depth: 0 - - uses: LE0-Lin/AgentConfigScore@v0.26.2 + - uses: LE0-Lin/AgentConfigScore@v0.27.0 ``` -固定使用 `@v0.26.2` 較容易重現;`@v0` 是會隨後續版本更新的滾動參照。PR 留言是[選用整合(英文)](docs/pr-comments.md),檢查工具預設不會替你留言。 +固定使用 `@v0.27.0` 較容易重現;`@v0` 是會隨後續版本更新的滾動參照。PR 留言是[選用整合(英文)](docs/pr-comments.md),檢查工具預設不會替你留言。 ## 支援的指令檔 @@ -171,4 +171,4 @@ jobs: 圖中的三次評分由 `agent-config-score history` 讀取。[歷史工作流程(英文)](docs/score-history.md) -專案採用 [MIT 授權](LICENSE)。[發布與升級說明](docs/releases/v0.26.2.md)目前為英文。 +專案採用 [MIT 授權](LICENSE)。[發布與升級說明](docs/releases/v0.27.0.md)目前為英文。 diff --git a/docs/README.md b/docs/README.md index 37326f6..e1a3e7d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -35,7 +35,7 @@ read the result, and troubleshoot a failing gate. - [Path-reference grammar and limits](limitations.md#plain-prose-path-references) - [Instruction context and prohibition scopes](instruction-context.md) - [False success-reporting checks](verification-reporting.md) -- [Explicit destructive-action approval bypass](deletion-approval-bypass.md) (unreleased source) +- [Explicit destructive-action approval bypass](deletion-approval-bypass.md) (v0.27.0+) - [Bulk environment-transfer checks](environment-upload.md) Use `agent-config-score rules` for the installed version's actual catalog, and diff --git a/docs/deletion-approval-bypass.md b/docs/deletion-approval-bypass.md index 9ba19a0..db0955c 100644 --- a/docs/deletion-approval-bypass.md +++ b/docs/deletion-approval-bypass.md @@ -1,6 +1,6 @@ # Explicit deletion approval bypass -**Available in unreleased source; not in published v0.26.2.** +**Available in v0.27.0+.** `deletion-approval-bypass` flags a complete, affirmative prose directive that combines a destructive target with an explicit approval bypass. It is an diff --git a/docs/feedback-to-delivery.md b/docs/feedback-to-delivery.md index 2fe3803..920f1af 100644 --- a/docs/feedback-to-delivery.md +++ b/docs/feedback-to-delivery.md @@ -15,11 +15,11 @@ and maintainer-confirmed effectiveness remain unverified. ## How to use this evidence -Unreleased maintenance strengthens two of these interfaces: Markdown link syntax +v0.27.0 strengthens two of these interfaces: Markdown link syntax inside matched inline code is no longer treated as a live reference, and the optional PR comment adds a validated per-rule breakdown plus recheck commands. The [comment preview and compatibility guide](pr-comments.md) distinguish these -source changes from the released v0.26.2 behavior. Neither change establishes +changes from the older v0.26.2 behavior. Neither change establishes adoption by Jason or expands prompt-injection detection into a general defense. The defensible project story is a concrete feedback loop: a public maintainer diff --git a/docs/limitations.md b/docs/limitations.md index e480f76..eaed09e 100644 --- a/docs/limitations.md +++ b/docs/limitations.md @@ -162,13 +162,13 @@ sentences or lines, inspect actual test execution, or judge arbitrary workflow intent. Other harmful prose can still pass. See the [supported grammar and negative controls](verification-reporting.md). -Unreleased source additionally recognizes finite Simplified/Traditional Chinese +v0.27.0+ additionally recognizes finite Simplified/Traditional Chinese false-passing claims and explicit [deletion approval bypass](deletion-approval-bypass.md) directives in English and Chinese. The former requires explicit failed/unrun tests and a passing claim; the latter requires a destructive target and an attached approval exemption. Neither infers missing rules from silence or generalizes to arbitrary prose, language variants, live authorization or runtime -behavior. These additions are not present in published v0.26.2. +behavior. These additions require v0.27.0+. ## Bulk environment transfers @@ -191,12 +191,12 @@ anchor-only links, fenced examples, absolute paths, and paths escaping the repository are skipped. Nested parentheses in inline link destinations are not currently parsed. This is a limited link check, not a full Markdown validator. -Unreleased source also excludes inline-link syntax inside matched backtick code +v0.27.0+ also excludes inline-link syntax inside matched backtick code spans, including multiline spans, and links with an escaped opening bracket. Real links next to code and links containing code only in their labels stay active. An unclosed backtick does not turn the rest of the document into an example. These exclusions do not apply to ordinary backtick path literals or -independent command/credential rules. This correction is not in PyPI v0.26.2. +independent command/credential rules. This correction requires v0.27.0+. v0.25.0+ builds additionally check simple full `[Guide][setup]` and collapsed `[setup][]` reference links, including images, when a matching diff --git a/docs/maintainer-workflow.md b/docs/maintainer-workflow.md index 9788a5d..0e3f6bd 100644 --- a/docs/maintainer-workflow.md +++ b/docs/maintainer-workflow.md @@ -42,7 +42,7 @@ summary automatically. It does not publish a comment unless a caller workflow opts in. Generated comments contain validated numeric results and a link to details, not raw instruction text or arbitrary finding messages. -Unreleased source adds a compact rule/severity/count table and local recheck +v0.27.0+ adds a compact rule/severity/count table and local recheck commands to the optional comment. The detailed report remains the source for file/line evidence and static remediation guidance. A passing gate with new findings still asks for review; see the [updated recipe and compatibility](pr-comments.md). diff --git a/docs/pr-comments.md b/docs/pr-comments.md index fe4e25a..71122cd 100644 --- a/docs/pr-comments.md +++ b/docs/pr-comments.md @@ -28,7 +28,7 @@ to a reviewed commit. Do not install multiple copies of this workflow. ## How the comment behaves -**Unreleased enhancement:** the updated Action exports `new-rule-counts`, and +**v0.27.0+ enhancement:** the updated Action exports `new-rule-counts`, and the updated recipe shows newly introduced rule IDs, severities and counts. Errors appear before warnings/info; at most five rule types are displayed, with an explicit remaining-types count and a link to the complete report. @@ -40,7 +40,7 @@ The new recipe works with older Action revisions: if the output is unavailable, the comment retains the numeric summary and says the breakdown is unavailable. An explicit `[]` means zero new rule matches; missing output does not mean zero. Upgrade/review the Action reference and generated workflow independently. These -enhancements are not in the published v0.26.2 Action or CLI-generated recipe. +enhancements require v0.27.0+ for both the Action and CLI-generated recipe. - The first completed scan creates a comment. Reruns update the same comment. - The lookup paginates, so long PR conversations do not hide the existing comment. @@ -62,7 +62,7 @@ Do not switch this recipe to `pull_request_target` to enable comments on forks. The recipe checks out the candidate repository, and that event has different privileges. It would require a separately designed workflow. -The comment script uses validated numeric outputs and, in unreleased source, +The comment script uses validated numeric outputs and, from v0.27.0, bounded rule IDs/severities/counts rather than instruction text, filenames, suppression reasons, or PR titles. See the [GitHub script documentation](https://github.com/actions/github-script#passing-inputs-to-the-script) diff --git a/docs/reference.md b/docs/reference.md index c9bea78..d8902a0 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -254,7 +254,7 @@ passed without running them. Merely skipping tests, prohibitions, and quoted/cod examples are not sufficient evidence. This is a narrow prose grammar, not a general judgment of workflow quality. -Unreleased source adds finite Simplified/Traditional Chinese false-reporting +v0.27.0+ adds finite Simplified/Traditional Chinese false-reporting clauses and the [`deletion-approval-bypass` error](deletion-approval-bypass.md) for explicit destructive directives that waive approval. Qualified prior authorization, disposable cleanup and examples are distinct from a bypass; @@ -381,7 +381,7 @@ Repository-level findings remain repository-level SARIF results instead of recei | `delta` | Candidate minus baseline score | | `new-findings` | Number of newly introduced active findings | | `new-errors` | Number of newly introduced active error findings | -| `new-rule-counts` | Unreleased: compact JSON array of `{code, severity, count}` for newly introduced active findings; no source text, paths or messages | +| `new-rule-counts` | v0.27.0+: compact JSON array of `{code, severity, count}` for newly introduced active findings; no source text, paths or messages | | `resolved-findings` | Number of active findings resolved by the candidate | ```yaml diff --git a/docs/releases/v0.27.0.md b/docs/releases/v0.27.0.md new file mode 100644 index 0000000..15773c4 --- /dev/null +++ b/docs/releases/v0.27.0.md @@ -0,0 +1,59 @@ +# AgentConfigScore v0.27.0 + +This **Beta** release delivers explicit safety-prose checks and a more useful +optional PR summary, alongside a Markdown example false-positive correction. + +```bash +python -m pip install --upgrade agent-config-score==0.27.0 +agent-config-score --version +``` + +Expected version: `AgentConfigScore 0.27.0`. Pin the Action with +`LE0-Lin/AgentConfigScore@v0.27.0`, or use rolling `v0` after verification. +Upgrade an existing optional comment workflow separately; changing an Action +reference does not replace the caller's saved workflow script. + +## What changes + +- `false-success-report` additionally recognizes bounded Simplified/Traditional + Chinese directives to claim tests passed despite failure or without execution. +- New `deletion-approval-bypass` error identifies explicit prose combining + deletion of production databases or existing/user files with an approval + exemption. Qualified approval, disposable cleanup, prohibitions and examples + remain distinct. Missing policy alone is not proof of a bypass. +- Inline Markdown link syntax inside matched backtick code or with an escaped + opening bracket no longer becomes a broken-link warning. Real adjacent links, + code in labels and unclosed code markers remain checked. +- Optional PR comments show a bounded per-rule severity/count table, local + recheck commands and a review prompt when the configured gate passes with + new findings. The Action's new `new-rule-counts` output excludes source text, + paths and messages. Old Actions retain the numeric fallback. + +To preview the updated comment recipe while preserving repository policy: + +```bash +agent-config-score init --workflow-only --pr-comment --force --dry-run +``` + +Review workflow customizations and the generated file before explicitly applying +the replacement. The scanner stays read-only and posts no comments by default. + +## Compatibility and evidence + +New active errors can lower scores and block changes previously accepted by +v0.26.2. Review the exact findings after upgrading; use a reasoned suppression +only when appropriate. Default score weights, baseline policy ownership and +runtime dependencies remain unchanged. Normal scans still do not certify +semantic instruction quality or enforce real agent actions. + +The [self-use report](../self-use-check.md) preserves the original public-wheel +misses and a matched source replay: the two known probes changed from 100/pass +to 85/blocked and 88/blocked. Vague filler still scores 100. This is development +evidence, not independent accuracy or external user adoption. Historical reports +retain their original versions and fingerprints. + +Release gates include source tests, built-wheel acceptance on Linux, Windows +and macOS, strict self-use replay of these fixes, the local Action's structured +output validation, Cursor coverage acceptance and Linux path replay. See the +[rule boundary](../deletion-approval-bypass.md), [comment guide](../pr-comments.md) +and [synthetic preview](../pr-comment-preview.md). diff --git a/docs/self-use-check.md b/docs/self-use-check.md index 34d280c..b363eff 100644 --- a/docs/self-use-check.md +++ b/docs/self-use-check.md @@ -13,14 +13,14 @@ disposable copies; no deletion, network installer or other instruction was run. ## Working behavior and limits -### Correction in unreleased source +### Correction shipped in v0.27.0 Two of the original high-score probes below now produce active errors. A [matched installed-tool comparison](evidence/self-use-prose-comparison.json) uses the **same input archive and unchanged instruction scenarios** at `1cec1aafe1d02259d94df5d785b604deda895de2` for the public wheel and changed source: -| Known probe | Published 0.26.2 | Unreleased source | New comparison exit | +| Known probe | Published 0.26.2 | Pre-release source | New comparison exit | |---|---:|---:|---:| | Production database deletion with explicit approval exemption | 100 | 85, `deletion-approval-bypass` | 1 | | Chinese instruction to falsely report passing tests | 100 | 88, `false-success-report` | 1 | @@ -29,9 +29,9 @@ uses the **same input archive and unchanged instruction scenarios** at All nine existing acceptance contracts still pass. Positive and negative language/format variants are separately covered by regression tests. These are corrections to known development cases, not independently measured accuracy. -The implementations declare the same version while this change is unreleased; +The original comparison used two implementations declaring version 0.26.2; the comparison records distinct **source fingerprints**, so the source build is -not confused with PyPI v0.26.2. The original failures below remain unchanged. +not confused with PyPI v0.26.2. The original failures below remain unchanged. The corrections now ship in v0.27.0+. ### Original published-wheel observations @@ -92,6 +92,13 @@ ACS package in isolated mode. Package installation needs network access; the replay itself does not. Existing output files are never overwritten. `--ref HEAD` tests the current committed repository; it does not test uncommitted changes. +For v0.27.0+ use `--require-current-fixes` to promote the database-bypass and +Chinese false-passing probes to required detections and add a clean inline-link +example control. This profile has twelve known contracts and one remaining +descriptive filler probe. CI and release acceptance require that profile on +each installed platform. Keep the default profile when reproducing the original +published v0.26.2 observations. + The nine known acceptance contracts must match their declared rule IDs and gate exits. The three limitation probes remain descriptive: detecting one after a future improvement must not fail the runner. A failed contract is retained in diff --git a/docs/simplified/limitations.md b/docs/simplified/limitations.md index 43dbfb7..9b0cf26 100644 --- a/docs/simplified/limitations.md +++ b/docs/simplified/limitations.md @@ -70,7 +70,7 @@ v0.25.0+ 的 [逐文件覆盖检查(英文)](../cursor-coverage.md) 枚举 `broad-environment-upload` 要求同一英文子句同时包含明确传输行为、完整环境变量来源和网络接收端。仅变量名称、明确脱敏、日志、禁止描述、代码示例不满足此语法。它不读取进程环境、不验证脱敏、不解析目标,也不证明恶意意图或实际传输。字面回环地址被排除,但转发不分析;shell 上传、其他语言和任意改写仍不支持。[规则细节(英文)](../environment-upload.md)。 -**尚未发布的源码**补充了有限的简体/繁体中文虚假测试通过句式,并新增 `deletion-approval-bypass`:必须同时有删除生产数据库或现有/用户文件的明确指令,以及与该操作相连的免授权要求。禁止、正常授权、临时清理和明确示例与违规正例分开测试。这些改进尚不在 PyPI v0.26.2 中;不代表通用语义判断、任意中文覆盖或运行时拦截。空泛指导仍可能得高分。[新增规则及边界(英文)](../deletion-approval-bypass.md)。 +**v0.27.0+** 补充了有限的简体/繁体中文虚假测试通过句式,并新增 `deletion-approval-bypass`:必须同时有删除生产数据库或现有/用户文件的明确指令,以及与该操作相连的免授权要求。禁止、正常授权、临时清理和明确示例与违规正例分开测试。这些改进从 v0.27.0 起可用;不代表通用语义判断、任意中文覆盖或运行时拦截。空泛指导仍可能得高分。[新增规则及边界(英文)](../deletion-approval-bypass.md)。 ## 本地 Markdown 链接 diff --git a/docs/traditional/limitations.md b/docs/traditional/limitations.md index 13c92f8..2e50942 100644 --- a/docs/traditional/limitations.md +++ b/docs/traditional/limitations.md @@ -70,7 +70,7 @@ v0.25.0+ 的 [逐檔覆蓋檢查(英文)](../cursor-coverage.md) 列舉兩 `broad-environment-upload` 要求同一英文子句同時包含明確傳輸行為、完整環境變數來源與網路接收端。只有變數名稱、明確移除敏感資訊、日誌、禁止描述或程式碼範例,不符合此語法。它不讀取處理程序環境、不驗證敏感資訊處理、不解析目標,也不證明惡意意圖或實際傳輸。字面回環位址排除在外,但不分析轉送;shell 上傳、其他語言和任意改寫仍不支援。[規則細節(英文)](../environment-upload.md)。 -**尚未發布的原始碼**補充了有限的簡體/繁體中文虛假測試通過句式,並新增 `deletion-approval-bypass`:必須同時有刪除生產資料庫或既有/使用者檔案的明確指令,以及與該操作相連的免授權要求。禁止、正常授權、暫存清理和明確範例與違規正例分開測試。這些改進尚不在 PyPI v0.26.2 中;不代表通用語義判斷、任意中文涵蓋或執行時攔截。空泛指導仍可能得高分。[新增規則及邊界(英文)](../deletion-approval-bypass.md)。 +**v0.27.0+** 補充了有限的簡體/繁體中文虛假測試通過句式,並新增 `deletion-approval-bypass`:必須同時有刪除生產資料庫或既有/使用者檔案的明確指令,以及與該操作相連的免授權要求。禁止、正常授權、暫存清理和明確範例與違規正例分開測試。這些改進從 v0.27.0 起可用;不代表通用語義判斷、任意中文涵蓋或執行時攔截。空泛指導仍可能得高分。[新增規則及邊界(英文)](../deletion-approval-bypass.md)。 ## 本機 Markdown 連結 diff --git a/docs/verification-reporting.md b/docs/verification-reporting.md index 89ef551..738a1e5 100644 --- a/docs/verification-reporting.md +++ b/docs/verification-reporting.md @@ -8,7 +8,7 @@ the scanner has established what tests actually ran or failed. ## Supported evidence -The released English grammar is described below. **Unreleased source** also +The released English grammar is described below. **v0.27.0+** also recognizes finite Simplified/Traditional Chinese clauses, for example: ```text diff --git a/pyproject.toml b/pyproject.toml index 771d8ce..75ce402 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "agent-config-score" -version = "0.26.2" +version = "0.27.0" description = "Deterministic lint and regression gate for AGENTS.md, Claude, Cursor, Copilot, and Gemini instructions." readme = "README.md" requires-python = ">=3.10" diff --git a/scripts/run_self_acceptance.py b/scripts/run_self_acceptance.py index ef4ba70..0f876f5 100644 --- a/scripts/run_self_acceptance.py +++ b/scripts/run_self_acceptance.py @@ -43,13 +43,22 @@ def git(*args: str) -> bytes: return result.stdout -def replay(python: Path, ref: str) -> dict: +def replay(python: Path, ref: str, *, require_current_fixes: bool = False) -> dict: revision = git("rev-parse", "--verify", ref + "^{commit}").decode().strip() archive = git("archive", "--format=zip", revision) env = {key: value for key, value in os.environ.items() if key not in {"PYTHONPATH", "PYTHONHOME"}} env.update(PYTHONNOUSERSITE="1", PYTHONIOENCODING="utf-8") identity = None rows, failures = [], [] + cases = [dict(case) for case in CASES] + if require_current_fixes: + fixes = {"semantic-database-risk": "deletion-approval-bypass", "chinese-false-success": "false-success-report"} + for case in cases: + if case["id"] in fixes: + case.pop("probe") + case.update(codes=[fixes[case["id"]]], gate=1) + cases.append({"id": "inline-link-example", "text": "Example syntax: `[Guide](docs/acs-acceptance-missing-guide.md)`.\n", + "codes": [], "gate": 0}) with TemporaryDirectory(prefix="acs-self-acceptance-") as directory: base, head = Path(directory) / "base", Path(directory) / "head" base.mkdir() @@ -96,7 +105,7 @@ def portable(value): if baseline_exit != 0 or baseline["findings"]: raise ValueError("self-use baseline already has findings; review it before mutation acceptance") _, safeguards = invoke(["guardrails", str(base)], scored=False) - for case in CASES: + for case in cases: if "replace" in case: content = case["replace"].encode() else: @@ -122,8 +131,9 @@ def portable(value): "completed_at_utc": datetime.now(timezone.utc).isoformat(), "source_revision": revision, "source_archive_sha256": hashlib.sha256(archive).hexdigest(), "tool": identity, "baseline": baseline, "baseline_guardrails_unscored": safeguards, - "contract_cases": sum("codes" in case for case in CASES), "failed_contracts": failures, - "limitation_probes": sum("probe" in case for case in CASES), "cases": rows, + "profile": "v0.27-corrections-required" if require_current_fixes else "original-self-use", + "contract_cases": sum("codes" in case for case in cases), "failed_contracts": failures, + "limitation_probes": sum("probe" in case for case in cases), "cases": rows, "boundary": "Known project-authored acceptance cases on copies of our own tracked repository; not independent accuracy, external adoption, runtime safety or semantic quality evidence. Source instructions are never executed."} @@ -131,11 +141,12 @@ def main() -> int: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--python", type=Path, default=Path(sys.executable), help="Python with ACS installed") parser.add_argument("--ref", default="HEAD", help="Local Git revision for the self-use snapshot") + parser.add_argument("--require-current-fixes", action="store_true", help="Require v0.27 safety-prose and inline-link example corrections") parser.add_argument("--output", type=Path, required=True, help="New JSON result; never overwrite retained runs") args = parser.parse_args() if args.output.exists(): parser.error("output must be new") - report = replay(args.python.absolute(), args.ref) + report = replay(args.python.absolute(), args.ref, require_current_fixes=args.require_current_fixes) with args.output.open("x", encoding="utf-8", newline="\n") as output: json.dump(report, output, ensure_ascii=False, indent=2) output.write("\n") diff --git a/src/agent_config_score/__init__.py b/src/agent_config_score/__init__.py index 40ab52f..cde6d89 100644 --- a/src/agent_config_score/__init__.py +++ b/src/agent_config_score/__init__.py @@ -1 +1 @@ -__version__ = "0.26.2" +__version__ = "0.27.0" diff --git a/tests/test_release_workflow.py b/tests/test_release_workflow.py index d0677d9..edcc852 100644 --- a/tests/test_release_workflow.py +++ b/tests/test_release_workflow.py @@ -53,6 +53,9 @@ def test_publish_waits_for_source_tests_and_cross_platform_acceptance(self): self.assertIn("scripts/run_path_regression_check.py", workflow) self.assertIn('"$wheel_python" "$GITHUB_WORKSPACE/scripts/run_path_regression_check.py"', workflow) self.assertIn("scripts/run_approval_demo.py", workflow) + self.assertIn("scripts/run_self_acceptance.py", workflow) + self.assertIn("--require-current-fixes", workflow) + self.assertIn("release-self-use-${{ matrix.os }}", workflow) self.assertIn("release-cursor-coverage-${{ matrix.os }}", workflow) self.assertIn("needs: [build, acceptance, action-acceptance]", workflow) self.assertIn("needs: [build, acceptance, action-acceptance, github-release]", workflow)