Skip to content

feat(readme): preview exact README edits before approval - #229

Merged
drevendev merged 6 commits into
masterfrom
beautifulrepo/readme-preview-20261101
Nov 1, 2026
Merged

drevendev merged 6 commits into
masterfrom
beautifulrepo/readme-preview-20261101

Conversation

@drevendev

Copy link
Copy Markdown
Owner

Reader outcome

Adds a small read-only, offline README proposal preview for maintainers using the existing improve-readme skill (#70). From an existing target checkout and an already prepared candidate file, it prints the SHA-256 of both inputs, original/proposed line-ending styles and a unified README.md diff. An optional expected current hash rejects stale previews with exit code 2. It never writes target files or executes their code.

Scope

  • tools/readme_preview.py: Python 3.11+ standard library, 256 KiB/file bounds, ordinary-file/symlink/junction checks, invalid UTF-8 and terminal-control rejection, no Git/network calls or imports from inspected targets.
  • tests/test_readme_preview.py: eight regression tests covering exact content, foreign CWD, read-only behavior, unchanged/stale source, input validation, symlinks, CRLF and missing final newline.
  • Public tools guide, existing README improvement skill and CHANGELOG document the opt-in workflow and separate explicit approval gate. The helper is a diff viewer, not permission to edit, an atomic compare-and-swap, an accessibility assessment or a hostile-filesystem sandbox.

Verification and acceptance boundary

Locally on isolated new files: python -m unittest discover -s /mnt/data/br_preview/tests -v — 8 PASS; full repository checkout/unit suite, catalog and link checks NOT RUN locally due to GitHub DNS failure. GitHub Quality CI must be evaluated on this exact branch head; no CI result is pre-claimed. This is production of a new PR, not later-run review or merge. No catalog changes, no other repository writes, no releases/settings/privileged operations, and no private worker controls.

@drevendev drevendev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later-run maintainer acceptance for exact head 0d1f2fb (same-account COMMENT evidence, not independent approval). Inspected the complete five-file patch, including bounded non-mutating reads, SHA-256 stale-preview guard, unified diff/line-ending behavior, target safety caveats, opt-in skill instructions, and eight new regressions. Quality checks workflow run 41312237687 completed successfully with six successful jobs; Python 3.11 reports 532 tests, six skipped, and all eight new tests passing. No material unresolved finding in this bounded scope. Non-blocking future hardening, if needed, should be separate work. Ready for exact-head integration subject to fresh GitHub provider gates.

@drevendev
drevendev merged commit 600fbae into master Nov 1, 2026
6 checks passed
@drevendev
drevendev deleted the beautifulrepo/readme-preview-20261101 branch November 1, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant