Repository navigation
feat(readme): apply only a hash-bound approved README proposal - #232
Conversation
drevendev
left a comment
There was a problem hiding this comment.
Exact-head review — cbeaaee2332d1e8ebd3a5206da625e4ac1aeb44b
Content judgement: no blocking defect identified within the documented local-filesystem contract. This is a COMMENT, not an independent approval: the authenticated reviewing account and PR author are both drevendev. A distinct authorized reviewer is still needed if actor-separated approval is the acceptance gate.
I inspected the five-file patch, the current tools/readme_apply.py and its dependency tools/readme_preview.py, the improve-readme skill, #70, repository instructions, and the existing review/discussion state (none on this PR). In the proposed implementation:
- Both current and proposed byte hashes must match the separately approved preview; missing/malformed/stale hashes fail before a write.
read_filealso bounds size and rejects symlinked/non-regular, invalid UTF-8, bare-CR and unsafe-display inputs. - The candidate is required to resolve outside the target checkout. The tool writes a temporary sibling, flushes/fsyncs it, copies the existing POSIX mode bits, re-reads the current README, then replaces only
README.md. Ordinary error handling removes the temporary file; the candidate remains intact. skills/improve-readme/SKILL.mdstill requires an explicit human yes to the actual file list and displayed diff before invocation, followed by the three read-only before/after checks. SHA-256 arguments alone do not establish consent, and the documentation does not claim otherwise.- Ten new black-box tests cover successful application, exact-byte preservation, stale-input refusal, no-op, input restrictions, symlinks, and non-execution of target code. The changelog and tool documentation are updated.
Verification evidence: Quality CI #41337354195 completed successfully on this head: 6/6 jobs. Hosted Python suites report 547 tests each (6 skipped on Linux Python 3.11, 6 on Linux Python 3.14, 2 on Windows Python 3.14), alongside successful lint and both Action self-tests. I inspected source and hosted job logs; I did not independently run the repository suite or a real target-repository edit.
Scope limits: This establishes content/source and hosted-regression evidence, not a model-driven proof of user consent or a real post-consent edit/re-audit. The helper explicitly does not defend against hostile concurrent filesystem changes or guarantee crash durability. Keep #70 open for the remaining end-to-end/model evaluation; do not promote this same-actor review to a formal independent approval.
andy-zen-dev
left a comment
There was a problem hiding this comment.
Independent exact-head assessment: cbeaaee2332d1e8ebd3a5206da625e4ac1aeb44b (PR #232, Related: #70).
I inspected all five changed files, including the actual readme_apply.py control flow and black-box tests, the existing readme_preview.py file guards, the improve-readme skill, AGENTS.md, CONTRIBUTING.md, linked issue #70, and prior discussion/review state.
The bounded implementation matches its declared contract: it validates both explicitly supplied SHA-256 digests against bounded regular UTF-8 files, refuses stale source/candidate or checkout-local proposal paths, stages a sibling file and rechecks the original bytes before replacing only README.md. The candidate remains intact, POSIX permission bits are copied, no target code runs, and tests cover happy path, stale inputs, display controls, symlinks, byte fidelity, and no-op. The skill explicitly requires a separate human approval of the exact file list and displayed diff: hash possession is not consent. The documentation and Unreleased changelog state the limitations without treating the remaining #70 acceptance criteria as complete.
CI on this exact head: Quality checks run #41337354195 passed, with all six jobs passed (Linux Python 3.11/3.14, Windows Python 3.14, both Action self-tests, Lint). Separate commit statuses: unavailable / none returned. Independent local repository suite and actual post-consent target-repository edit/re-audit: not_run. The helper does not guarantee safety against concurrent hostile filesystem mutation or crash durability; neither is claimed.
No merge-blocking defect found within that explicitly limited contract. APPROVE applies to this change only, not end-to-end/model-driven completion of Issue #70.
Reader-facing outcome
Complete the local README edit-after-explicit-approval step in the existing
improve-readmeworkflow (#70), without making the read-only preview tool writable.tools/readme_apply.pytakes an existing target README and an outside-checkout candidate plus the two exact SHA-256 values from the separately approved preview. It refuses missing/stale hashes, invalid/symlinked inputs and untrusted display controls, and replaces onlyREADME.mdvia a temporary sibling on an ordinary local filesystem.Important: Hash arguments only bind to approved bytes; they do not authenticate or infer consent. This helper must be invoked only after the agent has obtained separate explicit approval, as the skill specifies. It does not execute target scripts, commit, push, validate claims or prove model safety. Atomic replacement on an ordinary local filesystem is not protection against a concurrently hostile filesystem or crash durability.
Validation
python -m unittest discover -s tests -v: 10 new tests passed in a minimal local working copy using the current preview helper's input guards. This is not a full checked-out repository test.cbeaaee2332d1e8ebd3a5206da625e4ac1aeb44b: all six jobs passed (Linux Python 3.11/3.14, Windows Python 3.14, lint and both Action self-tests). The first run failed on Windows because the test fixture usedwrite_text()and expected LF bytes; corrected the fixture to usewrite_bytes()without changing the implementation. Full local repository tests still not run.Related: #70. The issue remains open until actual post-consent agent behavior, before/after results and model evaluations are demonstrated.