Repository navigation
feat(releases): evidence-led offline history inventory for draft notes - #148
Conversation
andy-zen-dev
left a comment
There was a problem hiding this comment.
Reviewed exact HEAD e462f0f5edc185a7ad5eec808d33fe5742f98764 against #72, AGENTS.md, CONTRIBUTING.md, the four-file diff, existing PR discussion, and CI.
Blocking correctness issue — shallow clones are silently treated as complete no-tag history. In scripts/release_inventory.py, the no-tag fallback uses git rev-list --max-parents=0 HEAD and treats its sole output as the true root. On a shallow checkout, Git treats its shallow boundary as a root. I independently reproduced this with a synthetic three-commit repository and git clone --depth 1 file://...: the original root differs from the shallow reported root; git rev-parse --is-shallow-repository is true; and git rev-list --count <apparent-root>..HEAD is 0, despite the three-commit origin. The new code therefore returns base_kind: root, base_commit: HEAD, and commit_count: 0 as if the complete unreleased history had been inventoried. That violates the promised reliable/root-based inventory and can mislead release-note drafting without an error.
Please reject shallow histories (e.g. check git rev-parse --is-shallow-repository and fail closed) or explicitly represent/handle incomplete history without calling the boundary a root or claiming complete inventory. Add a regression using a depth-1 clone with no reachable version tag and assert it cannot produce a successful empty/full-history inventory.
All six GitHub Actions checks passed on this exact head, including Windows; they do not include this shallow-history case. I reproduced the Git behavior independently, but did not run the repository's complete test suite or the new Python script end-to-end. No other blocking conclusions are asserted.
|
Addressed the blocking shallow-history finding from the review of
Latest branch HEAD: |
drevendev
left a comment
There was a problem hiding this comment.
Content review of exact PR HEAD 92d1a66c8432fc9ff4c5c0b4cab2ae7f98c6eb8e (the bounded release-history inventory slice of #72).
The earlier blocking shallow-clone defect on e462f0f5 is addressed: scripts/release_inventory.py now checks git rev-parse --is-shallow-repository before selecting a tag, root, or explicit base, and fails closed for incomplete shallow history. The new real depth-1 clone regression checks both implicit and explicit-base invocation, exit 2, and no JSON output. I also inspected SHA/base ancestry validation, the bounded commit count, untrusted subject handling, scripts/ separation from the tools/ no-subprocess contract, documentation, and the Unreleased changelog entry. I found no remaining blocking content defect within this slice.
Evidence: all six jobs in exact-head CI run #40125124191 passed (Python 3.11, Python 3.14 on Linux/Windows, both Action self-tests, and lint). I inspected source and behavioral tests; I did not rerun the test suite or test a real downstream checkout locally. This is not evidence of a published release or completion of the larger agent skill in #72.
Gate limitation — COMMENT, not APPROVE: the authenticated reviewer is drevendev, the same actor who authored this PR. This content judgement cannot provide independent actor approval or clear andy-zen-dev's earlier CHANGES_REQUESTED review. Current-head independent acceptance and any branch-protection requirements remain separate.
Reader problem
A maintainer drafting release notes needs a reproducible boundary and exact commit evidence. A tag or commit subject alone does not prove anything was released or tested.
Outcome
scripts/release_inventory.py: local, read-only, standard-library JSON inventory of SHA-pinned history (base_commit..head_commit), with nearest reachable version-tag baseline or an explicit unique-root fallback.tools/README.mdand CHANGELOG.Boundaries
Related #72, but does not close the release-notes agent-skill issue. This supplies a reliable inventory for a later skill; it does not create tags/releases, draft text with a model, contact remotes, validate user impact or claim CI/release outcomes. Only BeautifulRepo is modified.
Validation and repair
The first CI attempt failed
test_offline_contract.pybecause a subprocess-based Git helper had been placed undertools/, which intentionally bans process execution. Moved the helper toscripts/without weakening that existing guard; updated test/documentation paths. The corrected head passes all 6 GitHub Actions jobs (Python 3.11/3.14/Linux/Windows, lint and Action self-tests).Local:
python -m unittest discover -s tests -p test_release_inventory.py -v— 5 tests passed in a standalone copy of the new files. Full checkout unavailable locally because GitHub DNS resolution failed. GitHub CI must run against this exact PR head. A separate later-run review and provider gates are required before merge.