git-finalizer 2.0.0__tar.gz → 2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/CHANGELOG.md +17 -0
  2. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/PKG-INFO +10 -8
  3. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/README.md +9 -7
  4. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/agent-contract.md +7 -4
  5. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/integration-boundaries.md +5 -3
  6. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/release-governance.md +1 -0
  7. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/manifests/context-loader/tool_skill_manifest.json +1 -1
  8. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/manifests/snapshot-runner/tool_skill_manifest.json +3 -3
  9. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/pyproject.toml +1 -1
  10. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/pyproject.toml.orig +1 -1
  11. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/skills/git-change-delivery/SKILL.md +6 -7
  12. git_finalizer-2.0.1/skills/git-change-delivery/references/context-loader.md +14 -0
  13. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/skills/git-change-delivery/references/git-finalizer.md +5 -2
  14. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/__init__.py +1 -1
  15. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/cli.py +30 -1
  16. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/engine.py +36 -6
  17. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/parser.py +370 -21
  18. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/retirement_plan.py +172 -35
  19. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/runtime.py +6 -1
  20. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/validation.py +150 -37
  21. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/toolchain/tool_skill_sync.py +3 -1
  22. git_finalizer-2.0.1/tests/test_friction_fixes.py +435 -0
  23. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_overhaul_200.py +3 -2
  24. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_tool_contract.py +2 -1
  25. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tool_cli_contract.json +1 -1
  26. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tool_skill_manifest.json +3 -3
  27. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/toolchain_compatibility.json +2 -2
  28. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/uv.lock +1 -1
  29. git_finalizer-2.0.0/skills/git-change-delivery/references/context-loader.md +0 -49
  30. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/.python-version +0 -0
  31. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/CONTRIBUTING.md +0 -0
  32. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/LICENSE +0 -0
  33. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/SECURITY.md +0 -0
  34. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/advanced-modes.md +0 -0
  35. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/authorization-boundary.md +0 -0
  36. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/cli-guide.zh.md +0 -0
  37. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/content-review.md +0 -0
  38. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/maintenance-backlog.md +0 -0
  39. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/process/phase-closure-report-template.md +0 -0
  40. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/process/phase-closure.md +0 -0
  41. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/docs/tool-skill-sync.md +0 -0
  42. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/git-finalize +0 -0
  43. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/justfile +0 -0
  44. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/scripts/changelog.py +0 -0
  45. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/scripts/check.py +0 -0
  46. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/scripts/lint.sh +0 -0
  47. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/scripts/release.py +0 -0
  48. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/skills/git-change-delivery/README.md +0 -0
  49. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/skills/git-change-delivery/quick_validate.py +0 -0
  50. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/skills/git-change-delivery/references/snapshot-runner.md +0 -0
  51. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/skills/git-change-delivery/references/unpublished-queue.md +0 -0
  52. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/skills/git-change-delivery/test_unpublished_queue.py +0 -0
  53. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/skills/git-change-delivery/unpublished_queue.py +0 -0
  54. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/skills/three-tool-git-workflow/SKILL.md +0 -0
  55. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/__init__.py +0 -0
  56. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/content_scan.py +0 -0
  57. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/integration_publish.py +0 -0
  58. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/patch_check.py +0 -0
  59. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/policy.py +0 -0
  60. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/repo_bootstrap.py +0 -0
  61. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/repo_state.py +0 -0
  62. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/scanners.py +0 -0
  63. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/snapshot_verify.py +0 -0
  64. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/source_review.py +0 -0
  65. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/delivery/trailers.py +0 -0
  66. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/errors.py +0 -0
  67. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/git_io.py +0 -0
  68. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/json_io.py +0 -0
  69. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/toolchain/__init__.py +0 -0
  70. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/toolchain/tool_temp_dir.py +0 -0
  71. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/src/git_finalizer/toolchain/workflow_health.py +0 -0
  72. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/publication_controller_fixture.py +0 -0
  73. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/retirement_controller_fixture.py +0 -0
  74. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/run.sh +0 -0
  75. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_agent_contract.py +0 -0
  76. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_assignment_content.py +0 -0
  77. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_authorization_boundary.py +0 -0
  78. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_baseline_content_scan.py +0 -0
  79. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_branch_fixture_exceptions.py +0 -0
  80. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_changelog.py +0 -0
  81. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_check_reporting.py +0 -0
  82. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_clean_install.py +0 -0
  83. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_delivery_invariants.py +0 -0
  84. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_executor_contract.py +0 -0
  85. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_fixture_exceptions.py +0 -0
  86. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_gitea_release.py +0 -0
  87. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_initial_branch_publish.sh +0 -0
  88. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_initial_snapshot_real_runner.sh +0 -0
  89. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_integration_boundaries.sh +0 -0
  90. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_integration_publish.py +0 -0
  91. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_local_fixture_exceptions.py +0 -0
  92. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_nul_records.py +0 -0
  93. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_patch_whitespace.py +0 -0
  94. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_public_docs.py +0 -0
  95. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_publication_examples.py +0 -0
  96. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_publish_existing_branch.sh +0 -0
  97. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_publish_existing_history.sh +0 -0
  98. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_published_prose_reviews.py +0 -0
  99. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_release_procedure.py +0 -0
  100. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_release_publication_status.py +0 -0
  101. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_repo_bootstrap.py +0 -0
  102. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_resolved_merge.py +0 -0
  103. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_resume_initial_publish.sh +0 -0
  104. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_resume_publish.sh +0 -0
  105. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_retire_branch_real_controller.sh +0 -0
  106. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_retire_local_branch.sh +0 -0
  107. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_retire_remote_branch.sh +0 -0
  108. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_retirement_protocol.py +0 -0
  109. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_reviewed_source.py +0 -0
  110. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_runtime_guards.py +0 -0
  111. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_staged_deletions.py +0 -0
  112. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_standalone_operations.sh +0 -0
  113. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_summary.sh +0 -0
  114. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_sync_published_branch.py +0 -0
  115. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_temp_directory.py +0 -0
  116. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_tool_skill_sync.py +0 -0
  117. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tests/test_workflow_health.py +0 -0
  118. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tool-skill-sync +0 -0
  119. {git_finalizer-2.0.0 → git_finalizer-2.0.1}/tool-temp-dir +0 -0
@@ -13,6 +13,23 @@ section is invented for it.
13
13
 
14
14
  ## Unreleased
15
15
 
16
+ ## 2.0.1 - 2026-11-22
17
+
18
+ - Added: actionable `diagnostics.cli_hint` structured suggestions on CLI flag-matrix blocks
19
+ (missing `--`, `--message`/`-m` after `--`, missing `--message`, disallowed paths or `--snapshot`
20
+ for the selected mode, and `--ci-*` retirement flags without `--ci-required`) while preserving
21
+ all fail-closed safety guards.
22
+ - Added: metadata-only `diagnostics.whitespace` reporting (`files`, `total_count`, `omitted_count`,
23
+ and exact `path`/`line`/`reason` plus `commit` on commit-range scans with zero source excerpts)
24
+ and `diagnostics.retirement` reporting (exact mismatched fields, sanitized Controller error codes,
25
+ and fresh `worktree-controller branch-retirement-plan` recovery commands on stale/drifted/unknown
26
+ plans).
27
+ - Changed: removed routine Context Loader pre-step guidance from the `git-change-delivery` Skill
28
+ (`SKILL.md`, `references/context-loader.md`, `references/git-finalizer.md`), synced the
29
+ `snapshot-runner` mirror manifest and `toolchain_compatibility.json` to `2.7.0` (`contract_version`
30
+ **5**), registered the `v2.0.0` canonical Skill payload lineage, and updated `README.md` with PyPI
31
+ installation instructions (`v2.0.0+`).
32
+
16
33
  ## 2.0.0 - 2026-11-20
17
34
 
18
35
  - Changed: re-architected Git Finalizer into a zero-dependency pure-Python package (`pyproject.toml`,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-finalizer
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: Fail-closed Git delivery gatekeeper and toolchain compatibility manager for autonomous coding agents
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -20,9 +20,9 @@ decide on your behalf. It performs one Git write you explicitly authorized and r
20
20
  happened in machine-readable JSON. Authorization comes from the caller: an existing task grant can
21
21
  cover consecutive deliveries within its stated scope; passing tests does not create a new grant.
22
22
 
23
- Current source version: **2.0.0**.
23
+ Current source version: **2.0.1**.
24
24
 
25
- 当前版本:`2.0.0`
25
+ 当前版本:`2.0.1`
26
26
 
27
27
  This is the source version. Source delivery and local installation do not imply a GitHub tag,
28
28
  release or downloadable asset.
@@ -84,14 +84,16 @@ without the reader protocol cannot protect invocations already running that olde
84
84
 
85
85
  ## Installation
86
86
 
87
- There is no package index. Releases are published as GitHub Release assets:
87
+ `git-finalizer` (v2.0.0+) is published on PyPI (<https://pypi.org/project/git-finalizer/>) for
88
+ direct installation via `uv tool install git-finalizer` or `pip install git-finalizer`. Releases
89
+ are also published as verifiable GitHub Release assets:
88
90
  each one carries `git-finalizer-<version>.tar.gz` plus a `SHA256SUMS.txt` that names it, from
89
91
  <https://github.com/xuanheng-tech/git-finalizer/releases>. GitHub carries every release from `v1.5.0`
90
92
  onward; earlier versions were published on the governed delivery remote described in
91
- [docs/release-governance.md](docs/release-governance.md), so they are not listed here. Fetch both,
92
- verify the artifact, then install it. Select an actual published release from that page and set
93
- `GF_RELEASE_VERSION` to its version number without the `v` prefix; it can differ from the source
94
- version above.
93
+ [docs/release-governance.md](docs/release-governance.md), so they are not listed here. To install
94
+ from a verified release tarball, fetch both, verify the artifact, then install it. Select an actual
95
+ published release from that page and set `GF_RELEASE_VERSION` to its version number without the `v`
96
+ prefix; it can differ from the source version above.
95
97
 
96
98
  ```bash
97
99
  GF_RELEASE_VERSION='<published-version>'
@@ -9,9 +9,9 @@ decide on your behalf. It performs one Git write you explicitly authorized and r
9
9
  happened in machine-readable JSON. Authorization comes from the caller: an existing task grant can
10
10
  cover consecutive deliveries within its stated scope; passing tests does not create a new grant.
11
11
 
12
- Current source version: **2.0.0**.
12
+ Current source version: **2.0.1**.
13
13
 
14
- 当前版本:`2.0.0`
14
+ 当前版本:`2.0.1`
15
15
 
16
16
  This is the source version. Source delivery and local installation do not imply a GitHub tag,
17
17
  release or downloadable asset.
@@ -73,14 +73,16 @@ without the reader protocol cannot protect invocations already running that olde
73
73
 
74
74
  ## Installation
75
75
 
76
- There is no package index. Releases are published as GitHub Release assets:
76
+ `git-finalizer` (v2.0.0+) is published on PyPI (<https://pypi.org/project/git-finalizer/>) for
77
+ direct installation via `uv tool install git-finalizer` or `pip install git-finalizer`. Releases
78
+ are also published as verifiable GitHub Release assets:
77
79
  each one carries `git-finalizer-<version>.tar.gz` plus a `SHA256SUMS.txt` that names it, from
78
80
  <https://github.com/xuanheng-tech/git-finalizer/releases>. GitHub carries every release from `v1.5.0`
79
81
  onward; earlier versions were published on the governed delivery remote described in
80
- [docs/release-governance.md](docs/release-governance.md), so they are not listed here. Fetch both,
81
- verify the artifact, then install it. Select an actual published release from that page and set
82
- `GF_RELEASE_VERSION` to its version number without the `v` prefix; it can differ from the source
83
- version above.
82
+ [docs/release-governance.md](docs/release-governance.md), so they are not listed here. To install
83
+ from a verified release tarball, fetch both, verify the artifact, then install it. Select an actual
84
+ published release from that page and set `GF_RELEASE_VERSION` to its version number without the `v`
85
+ prefix; it can differ from the source version above.
84
86
 
85
87
  ```bash
86
88
  GF_RELEASE_VERSION='<published-version>'
@@ -36,7 +36,7 @@ warnings_omitted, worktree_path
36
36
  | `resume` | a resume interface reported recovery context |
37
37
  | `fixture_exceptions` | the run consumed documented fixture exceptions |
38
38
  | `reviewed_sensitive_sources` | `--reviewed-sensitive-source` reviews were consumed |
39
- | `diagnostics` | runtime identity was captured and a content refusal/risk occurred, or `--diagnostics` was requested |
39
+ | `diagnostics` | runtime identity was captured and a content/whitespace/CLI/retirement refusal or risk occurred, or `--diagnostics` was requested |
40
40
 
41
41
  ### Metadata-only diagnostics
42
42
 
@@ -44,9 +44,12 @@ warnings_omitted, worktree_path
44
44
  keys, their order, the classification triple and exit codes remain unchanged. Consumers must
45
45
  ignore unfamiliar optional keys and classify the operation from the existing triple.
46
46
  Exec-forwarded companions and the serialization-failure fallback retain their existing shapes.
47
- Ordinary summaries omit diagnostics to preserve their output efficiency budget. Content refusals
48
- and dry-run content risks include it automatically; `--summary --diagnostics` requests runtime
49
- identity even without a finding. `--diagnostics` requires `--summary`, may appear once, and is
47
+ Ordinary summaries omit diagnostics to preserve their output efficiency budget. Content refusals,
48
+ dry-run content risks, whitespace violations (`diagnostics.whitespace`), CLI flag-matrix hints
49
+ (`diagnostics.cli_hint`), and Controller retirement-plan blocks (`diagnostics.retirement`) include
50
+ it automatically with metadata-only details (never source line excerpts, secret values, or raw
51
+ Controller stdout/stderr prose); `--summary --diagnostics` requests runtime identity even without
52
+ a finding. `--diagnostics` requires `--summary`, may appear once, and is
50
53
  supported by the bash core modes, not the exec-forwarded bootstrap/integration companions.
51
54
 
52
55
  `runtime.entrypoint` and `runtime.content_scanner` each contain `path` and `sha256`. The entrypoint
@@ -55,10 +55,12 @@ Git Finalizer(GF)核心只依赖 Git 与 `PATH` 中的 Python 3.12+(零运
55
55
  verify-only、commit-only 与 blocked 路径核对)。
56
56
  - 另有五个**条件键**只在相关场景出现,消费者必须按可选处理:`error_code`(所有非 `success` 响应上的结构化错误码)、`resume`(resume 接口的恢复上下文)、
57
57
  `fixture_exceptions`(fixture 例外记录)、`reviewed_sensitive_sources`(已消费的 sensitive-source
58
- review 身份)、`diagnostics`(实际入口/扫描器路径与摘要,以及同一次扫描绑定的首个内容拒绝元数据)。
58
+ review 身份)、`diagnostics`(实际入口/扫描器路径与摘要,以及同一次扫描绑定的首个内容拒绝元数据,
59
+ 或 whitespace/CLI/retirement 拒绝的结构化只读元数据)。
59
60
  `diagnostics.schema_version` 为 1;内容 finding 仅含规则、路径、扫描阶段、大小、SHA-256 和可用的
60
- blob OID,不含命中值或源码片段。消费者忽略未知可选字段,继续按原三元组判断;其它拒绝的
61
- `content_scan` 为 null。内容拒绝/风险自动带诊断,其它 core 场景通过 `--summary --diagnostics`
61
+ blob OID,whitespace 诊断仅含 `path`/`line`/`reason`(及历史提交短 OID),CLI/retirement 仅含建议命令、
62
+ 字段名与受验大写错误码,均不含命中值、源码片段或未验证原文。消费者忽略未知可选字段,继续按原三元组判断;其它拒绝的
63
+ `content_scan` 为 null。上述拒绝/风险自动带诊断,其它 core 场景通过 `--summary --diagnostics`
62
64
  按需展开;普通摘要保持原输出预算。测试从源码提取条件键并要求本文件逐个列出,新增条件键必须同时改文档。
63
65
  - 序列化失败的兜底对象使用**不同**的键形状(`summary_status`/`operation_status`/
64
66
  `operation_exit_code`),它不是正常合同的一部分,只表示“无法产出合规摘要”,Agent 必须按失败处理。
@@ -360,6 +360,7 @@ record.
360
360
  | `v1.9.7` | GitHub | `e68b8433fd4fff37b84c61b3ac84086d6ca6d1e3` | `b61ad49ad3c03b09efea38f3c3a837dd381b241d` | `33a3e12c721ea1a6cf7d296d011f29307ae849fb3e4d292aadb165d98fc93211` | 211180 |
361
361
  | `v1.9.8` | GitHub | `647ffaaf1002c8c550b6c5e63602fd83456fde6b` | `abe21bb19cfbff07d04add20fd7a739311cd1e98` | `538145ef92f75af7596850fdaac4c93094f8ef279fb60631ed51f8520cc7689d` | 211943 |
362
362
  | `v1.9.9` | GitHub | `ceae77fbc0a0ade62435b5f72c3e4b0c1211a88b` | `931d32f3e5bb0b0b76ea9598842af52ca4f4c6a6` | `7d94a871981c67b3d7c88d38f5078afcd3ab1ac391a9db99a09cb4c148e18041` | 192344 |
363
+ | `v2.0.0` | GitHub | `efaab146349c2d218ad568ad2d8a7e686d1e12e1` | `a1ef897270dc201101a085ea6fec4963373cd5c0` | `e8cbadae815c21cc7bcb6d852ee3d398bcf382c65a6445eb160c0254f8fb5291` | 206817 |
363
364
 
364
365
  `v1.8.10` is a deliberate mirror. GitHub run `36883946683` published release `401104963`;
365
366
  Gitea run `851` independently built and verified the same candidate and digest. Its publication
@@ -3,7 +3,7 @@
3
3
  "owner": "git-finalizer",
4
4
  "path": "skills/git-change-delivery/SKILL.md"
5
5
  },
6
- "canonical_skill_sha256": "d1525f9aeb9dcdda18fc9a5e8914ba3ba7c7ed26d9ec5463ca1359b428940bf1",
6
+ "canonical_skill_sha256": "9e4790e58bd9677e06d9b5e95ff2d071874e744baf243d245fbabbc88b5ba9eb",
7
7
  "compatibility_skill": {
8
8
  "name": "three-tool-git-workflow",
9
9
  "path": "skills/three-tool-git-workflow/SKILL.md",
@@ -3,7 +3,7 @@
3
3
  "owner": "git-finalizer",
4
4
  "path": "skills/git-change-delivery/SKILL.md"
5
5
  },
6
- "canonical_skill_sha256": "d1525f9aeb9dcdda18fc9a5e8914ba3ba7c7ed26d9ec5463ca1359b428940bf1",
6
+ "canonical_skill_sha256": "9e4790e58bd9677e06d9b5e95ff2d071874e744baf243d245fbabbc88b5ba9eb",
7
7
  "compatibility_skill": {
8
8
  "name": "three-tool-git-workflow",
9
9
  "path": "skills/three-tool-git-workflow/SKILL.md",
@@ -22,10 +22,10 @@
22
22
  "snapshot-runner"
23
23
  ]
24
24
  },
25
- "public_cli_contract_sha256": "378c3634f92f94415dcb30f62078649275b3f27e8a4cc63be37f35aaf835ee4c",
25
+ "public_cli_contract_sha256": "a64b4b37aaf5a64a1b9749ad64ed1f032ae23c6f01121eaf0e642c4b989b4b34",
26
26
  "schema_version": 2,
27
27
  "skill_contract_version": 2,
28
28
  "tool_commit": "@release",
29
29
  "tool_name": "snapshot-runner",
30
- "tool_version": "2.6.0"
30
+ "tool_version": "2.7.0"
31
31
  }
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "git-finalizer"
7
- version = "2.0.0"
7
+ version = "2.0.1"
8
8
  description = "Fail-closed Git delivery gatekeeper and toolchain compatibility manager for autonomous coding agents"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "git-finalizer"
7
- version = "2.0.0"
7
+ version = "2.0.1"
8
8
  description = "Fail-closed Git delivery gatekeeper and toolchain compatibility manager for autonomous coding agents"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: git-change-delivery
3
- description: "用于仓库文件变更的上下文加载、测试与 evidence 范围选择、Snapshot Runner 审查,以及按授权边界使用 Git Finalizer commit、bootstrap、publication 和 remote verify;不管理 worktree lifecycle。"
3
+ description: "用于仓库文件变更的测试与 evidence 范围选择、Snapshot Runner 审查,以及按授权边界使用 Git Finalizer commit、bootstrap、publication 和 remote verify;不管理 worktree lifecycle。"
4
4
  ---
5
5
 
6
6
  # Git change delivery
@@ -20,9 +20,8 @@ description: "用于仓库文件变更的上下文加载、测试与 evidence
20
20
  选定的仓库开始,不创建或移除 worktree。`toolchain_compatibility.json` 绑定各工具的 public
21
21
  contract version。
22
22
 
23
- 1. 读取适用规则;需要确定性上下文时用 Context Loader,见
24
- [references/context-loader.md](references/context-loader.md)。
25
- 2. 在三个工具之外实施最小变更,运行从定向到必要程度的真实检查。工具输出不替代测试。
23
+ 1. 按需直接读取适用规则与目标文件(`rg`/`git status`/定点读文件);历史只读工具 Context Loader 已冻结,不再作为常规前置步骤(遗留说明见 [references/context-loader.md](references/context-loader.md))。
24
+ 2. 在工具之外实施最小变更,运行从定向到必要程度的真实检查。工具输出不替代测试。
26
25
  3. 需要审查证据时用 Snapshot Runner,默认 `--summary`,摘要不足再读 artifact,见
27
26
  [references/snapshot-runner.md](references/snapshot-runner.md)。简单且不发布的任务可跳过;
28
27
  发布前通常至少审查当前 diff。
@@ -83,9 +82,9 @@ merge/main integration、force push、history rewrite、tag/release、branch 删
83
82
 
84
83
  ## 职责分离
85
84
 
86
- Context Loader 只读上下文;Snapshot Runner 只收集只读快照、不运行测试、不提交;Git
87
- Finalizer 只做提交前验证、显式路径暂存、commit、fast-forward-safe push 和发布后核验。审阅、
88
- 核验和验收由执行 agent 完成;仓库或平台明确要求独立审核时等待该审核。
85
+ Snapshot Runner 只收集只读快照、不运行测试、不提交;Git Finalizer 只做提交前验证、显式路径
86
+ 暂存、commit、fast-forward-safe push 和发布后核验(历史只读工具 Context Loader 已冻结,不
87
+ 参与常规交付)。审阅、核验和验收由执行 agent 完成;仓库或平台明确要求独立审核时等待该审核。
89
88
 
90
89
  ## 停止发布的情况
91
90
 
@@ -0,0 +1,14 @@
1
+ # Context Loader(已冻结 / 遗留可选参考)
2
+
3
+ ## 状态说明
4
+
5
+ `context-loader`(`project-context`)现已进入**维护冻结(maintenance freeze)**状态,**不再属于**常规仓库交付或任务启动前置步骤。
6
+
7
+ - 常规开发与审查中,请直接使用低开销的定点只读命令(`rg`、`git status --short`、`git diff` 与目标文件读取),无需为了形式完整调用 `project-context`。
8
+ - 本文保留仅为历史/遗留兼容参考,便于在明确需要离线复核旧流程或既有脚本引用时核对边界。
9
+
10
+ ## 遗留边界(仅手工调用时适用)
11
+
12
+ - 若明确需要手工调用,命令为 `project-context --repo <absolute-repo>`(只读解析 `command -v project-context` 与 `realpath -e`)。
13
+ - 它只读取本地 Git 状态、根级说明和有界目录树并输出到 stdout,不访问网络,也不执行测试、审查或任何 Git 写入。
14
+ - 调用它不授予任何修改、commit、push 或发布权限,也不替代实际测试或 Snapshot Runner 审查。
@@ -36,9 +36,12 @@ retirement 的 `--dry-run` 会做完整 live preflight,成功为 `RETIREMENT_P
36
36
  `push.executed=true`、`push.result=succeeded`(integration candidate 为 `published`,
37
37
  中断后重入为 `already_published_recovered`)。commit-only 要求 `commit.created=true` 并给出 OID。
38
38
 
39
- `status` 为 `blocked`/`failed` 时,读 `reason`、`next_action` 和 `resume`:
39
+ `status` 为 `blocked`/`failed` 时,读 `reason`、`next_action`、`resume` 与可选 `diagnostics`:
40
40
 
41
- - `resolve_blocker_and_retry`:修正 `reason` 指出的问题后,用同一入口重试。
41
+ - `resolve_blocker_and_retry`:修正 `reason` 或 `diagnostics` 指出的问题后重试。参数错误时可直接
42
+ 采用 `diagnostics.cli_hint.suggested_command`;whitespace 拒绝时按 `diagnostics.whitespace.violations`
43
+ 列出的精确 `path:line:reason` 一次性修完;retirement plan 漂移/过期时直接执行
44
+ `diagnostics.retirement.replan_command` 重新生成计划。
42
45
  - commit 已创建但 push 失败:保留该 commit,用 resume 入口和报告的 OID 继续,不要 recommit。
43
46
  - push 结果不确定:先用 `git ls-remote` 读远端事实,再决定 resume 还是已完成。
44
47
 
@@ -3,6 +3,6 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  TOOL_NAME = "git-finalizer"
6
- __version__ = "2.0.0"
6
+ __version__ = "2.0.1"
7
7
 
8
8
  __all__ = ["TOOL_NAME", "__version__"]
@@ -48,11 +48,33 @@ def _apply_error_to_summary(summary: SummaryState, exc: FinalizerError) -> Summa
48
48
  summary.resume_remote = str(exc.resume.get("remote") or "") or None
49
49
  if exc.scan_diagnostic:
50
50
  summary.scan_diagnostic = dict(exc.scan_diagnostic)
51
+ if exc.diagnostics:
52
+ summary.extra_diagnostics = dict(exc.diagnostics)
51
53
  if exc.reviewed_sensitive_sources:
52
54
  summary.reviewed_sensitive_sources = [dict(x) for x in exc.reviewed_sensitive_sources]
53
55
  return summary
54
56
 
55
57
 
58
+ def _emit_human_diagnostics(diagnostics: dict[str, object] | None) -> None:
59
+ if not isinstance(diagnostics, dict):
60
+ return
61
+ cli_hint = diagnostics.get("cli_hint")
62
+ if isinstance(cli_hint, dict) and cli_hint.get("suggested_command"):
63
+ print(f"建议命令: {cli_hint['suggested_command']}", file=sys.stderr)
64
+ whitespace = diagnostics.get("whitespace")
65
+ if isinstance(whitespace, dict):
66
+ violations = whitespace.get("violations")
67
+ if isinstance(violations, list):
68
+ for item in violations:
69
+ if isinstance(item, dict) and item.get("path"):
70
+ loc = f"{item['path']}:{item['line']}" if item.get("line") is not None else str(item["path"])
71
+ commit_tag = f" ({item['commit']})" if item.get("commit") else ""
72
+ print(f" - {loc}: {item.get('reason', 'whitespace violation')}{commit_tag}", file=sys.stderr)
73
+ retirement = diagnostics.get("retirement")
74
+ if isinstance(retirement, dict) and retirement.get("replan_command"):
75
+ print(f"恢复计划命令: {retirement['replan_command']}", file=sys.stderr)
76
+
77
+
56
78
  def main(argv: Sequence[str] | None = None) -> int:
57
79
  raw_argv = list(sys.argv[1:] if argv is None else argv)
58
80
  entrypoint = Path(sys.argv[0]) if sys.argv and sys.argv[0] else Path(__file__).resolve()
@@ -72,11 +94,17 @@ def main(argv: Sequence[str] | None = None) -> int:
72
94
 
73
95
  summary = engine.create_summary(cli, entrypoint=entrypoint)
74
96
  if cli.parse_error:
75
- err = FinalizerError(ErrorCode.CLI_INVALID_ARGS, cli.parse_error, final_phase="cli")
97
+ err = FinalizerError(
98
+ ErrorCode.CLI_INVALID_ARGS,
99
+ cli.parse_error,
100
+ final_phase="cli",
101
+ diagnostics=cli.parse_diagnostics,
102
+ )
76
103
  if cli.summary:
77
104
  _emit_summary_json(_apply_error_to_summary(summary, err).to_dict())
78
105
  else:
79
106
  print(f"ERROR [{err.code}]: {err.message}", file=sys.stderr)
107
+ _emit_human_diagnostics(err.diagnostics)
80
108
  return err.exit_code
81
109
 
82
110
  if cli.dispatch == "bootstrap":
@@ -103,6 +131,7 @@ def main(argv: Sequence[str] | None = None) -> int:
103
131
  )
104
132
  else:
105
133
  print(f"ERROR [{exc.code}]: {exc.message}", file=sys.stderr)
134
+ _emit_human_diagnostics(exc.diagnostics)
106
135
  if exc.commit_created and exc.commit_sha and cli is not None:
107
136
  if cli.action == "initial-branch-publish":
108
137
  from git_finalizer.git_io import run_git
@@ -2131,7 +2131,13 @@ def _run_retire_branch(cli: ParsedCLI, summary: SummaryState) -> tuple[int, Summ
2131
2131
  retirement_plan.verify_capabilities(repo)
2132
2132
  retirement_plan.preflight(plan_args)
2133
2133
  except retirement_plan.RetirementBlocked as exc:
2134
- raise FinalizerError(ErrorCode.RETIREMENT_BLOCKED, str(exc), final_phase="preflight") from exc
2134
+ summary.retirement_result = "RETIREMENT_BLOCKED"
2135
+ raise FinalizerError(
2136
+ exc.error_code,
2137
+ str(exc),
2138
+ final_phase="preflight",
2139
+ diagnostics={"retirement": exc.details} if exc.details else None,
2140
+ ) from exc
2135
2141
 
2136
2142
  _require_clean_repo_state(repo, info)
2137
2143
  summary.worktree_before_state = "clean"
@@ -2150,7 +2156,21 @@ def _run_retire_branch(cli: ParsedCLI, summary: SummaryState) -> tuple[int, Summ
2150
2156
  raise FinalizerError(ErrorCode.RETIREMENT_BLOCKED, "live remote integration target 不存在", final_phase="remote_preflight")
2151
2157
  live_int_oid = live_refs[integration_ref]
2152
2158
  if expected_integrated_oid and live_int_oid != expected_integrated_oid:
2153
- raise FinalizerError(ErrorCode.RETIREMENT_BLOCKED, "live integration target OID 与 expected_integrated_oid 不一致", final_phase="remote_preflight")
2159
+ summary.retirement_result = "RETIREMENT_BLOCKED"
2160
+ replan = retirement_plan.replan_command(repo, branch, remote, cli.integrated_into or "main")
2161
+ raise FinalizerError(
2162
+ ErrorCode.RETIREMENT_BLOCKED,
2163
+ f"live integration target OID 与 expected_integrated_oid 不一致(live={live_int_oid[:12]}, expected={expected_integrated_oid[:12]});plan 已过时,请重新生成计划: {replan}",
2164
+ final_phase="remote_preflight",
2165
+ diagnostics={
2166
+ "retirement": {
2167
+ "mismatched_fields": ["expected_integrated_oid"],
2168
+ "live_integrated_oid": live_int_oid,
2169
+ "expected_integrated_oid": expected_integrated_oid,
2170
+ "replan_command": replan,
2171
+ }
2172
+ },
2173
+ )
2154
2174
  summary.retirement_integrated_oid = live_int_oid
2155
2175
 
2156
2176
  if plan_args is not None and not plan_args.expected_integrated_oid:
@@ -2258,14 +2278,24 @@ def _run_retire_branch(cli: ParsedCLI, summary: SummaryState) -> tuple[int, Summ
2258
2278
  try:
2259
2279
  exec_res = retirement_plan.execute(plan_args, progress=prog)
2260
2280
  except retirement_plan.RetirementBlocked as exc:
2281
+ mutated = bool(prog.get("mutation_attempted"))
2261
2282
  summary.retirement_lease_bound = bool(prog.get("expected_oid_lease_bound"))
2262
- summary.retirement_result = f"{'LOCAL' if is_local else 'REMOTE'}_DELETE_UNVERIFIED"
2283
+ summary.retirement_result = exc.result_code or (
2284
+ f"{'LOCAL' if is_local else 'REMOTE'}_DELETE_UNVERIFIED"
2285
+ if mutated
2286
+ else "RETIREMENT_BLOCKED"
2287
+ )
2263
2288
  raise FinalizerError(
2264
- ErrorCode.RETIREMENT_BLOCKED,
2289
+ exc.error_code,
2265
2290
  str(exc),
2266
- status="failed" if prog.get("mutation_attempted") else "blocked",
2291
+ status="failed" if mutated else "blocked",
2267
2292
  final_phase=summary.final_phase,
2268
- next_action=exc.next_action or "inspect_remote_state_then_rerun_same_retirement",
2293
+ next_action=(
2294
+ exc.next_action
2295
+ if mutated
2296
+ else "resolve_blocker_and_retry"
2297
+ ),
2298
+ diagnostics={"retirement": exc.details} if exc.details else None,
2269
2299
  ) from exc
2270
2300
  summary.retirement_lease_bound = bool(exec_res.get("expected_oid_lease_bound", True))
2271
2301
  summary.retirement_receipt_id = exec_res.get("receipt_id")