Skip to content

write guard rejects heredoc and in-place shell edits, costing a round - #30

Merged
github-actions[bot] merged 1 commit into
mainfrom
improve/F-22-write-guard-rejects-heredoc-and-in-place
Nov 3, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
improve/F-22-write-guard-rejects-heredoc-and-in-place

Conversation

@zolotarev

Copy link
Copy Markdown
Owner

Friction — write guard rejects heredoc and in-place shell edits, costing a round

Seen ×28 in 26 task(s) of one project.

executors repeatedly lose a round rewriting the edit via Read+Edit

Change

  • write guard rejects heredoc and in-place shell edits, costing a round

Sent by dpcli contribute. Anonymized: no project names, paths or quotes.

@zolotarev zolotarev added the feedback Friction reported from real use label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

VERDICT: accept

  • Real friction (×28 in 26 tasks, feedback label); both fixes are small and scoped to hooks/bash_guard.py. Tests cover the ignored-target pass and the still-blocked src/ case. VERSION 37 and the CHANGELOG line are present, with no project data.
  • Nit, hooks/bash_guard.py writes: a heredoc line passes if any quoted path on it is git-ignored, even when the write goes elsewhere, e.g. Path('src/a.py').write_text(open('build/x').read()). Such a line is rare, so this is acceptable, but matching the path inside the open(...)/write_* call would be stricter.
  • Nit, scratch(): if git is missing, subprocess.run raises FileNotFoundError and the hook crashes. Wrap it in try/except OSError and return False. Outside a repo, check-ignore returns 128, which correctly means "not ignored".
  • I did not run the tests locally; this verdict comes from reading the diff.

@github-actions
github-actions Bot merged commit 099db81 into main Nov 3, 2026
3 checks passed
@github-actions
github-actions Bot deleted the improve/F-22-write-guard-rejects-heredoc-and-in-place branch November 3, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feedback Friction reported from real use

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant