Skip to content

Keep hype render from overwriting its presentation or a half-written manifest - #52

Merged
omarchybot merged 3 commits into
masterfrom
render-output-safety
Nov 12, 2026
Merged

omarchybot merged 3 commits into
masterfrom
render-output-safety

Conversation

@omarchybot

@omarchybot omarchybot commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Two ways hype render could leave a user's or an agent's files worse off than it found them.

hype render talk.md --slide 1 -o talk.md wrote the PNG over the presentation, since any -o was taken as the image's path. An agent filling in arguments is exactly who makes that slip. Render now refuses an output that is the presentation itself, through a symlink too, and says so.

Rendering every slide wrote slides.json straight over the old one and ignored whether the write worked, so a full disk left a truncated manifest and still exited 0, and a manifest that couldn't be opened failed with an empty message. It is now written with QSaveFile like every other file Hype writes, and a failure names the file and the reason. The same function renders the slides for PowerPoint export, which now reports that failure as well.

No CI runs here yet: master has no workflow until #48 lands, and #48's needs omacom/omarchy-pkgs#2573. Merged onto #48 with that pull request's dependencies, the tests pass. This and #50 each add a test at the same place in tests/test_cli.py, so whichever merges second conflicts there and keeps both.

🤖 Generated by Opus 5.5 in Claude Code. Reviewed by Codex XHigh.

…manifest

render --slide wrote its PNG to any -o, the presentation included, and rendering a whole deck wrote slides.json in place without checking the write, so a full disk left a truncated manifest behind a successful exit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex <noreply@openai.com>
@greptile-apps

greptile-apps Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

This PR protects single-slide renders from overwriting the presentation and makes writes to slides.json atomic and checked.

  • Single-slide renders refuse the presentation path and safely replace separate outputs.
  • Full-deck renders save a complete manifest or report why they cannot.

Reviews (3) · Last reviewed commit: "Merge master into render-output-safety" · Reviewed by Greptile

Comment thread src/cli.cpp Resolved
Comment thread tests/test_cli.py Resolved
A hard link to the presentation passed the path check and was overwritten in place. Renaming replaces the link instead, and a failed render no longer leaves a half-written PNG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps both tests that #50 and this branch add at the same place in tests/test_cli.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot
omarchybot merged commit 3843c85 into master Nov 12, 2026
@omarchybot omarchybot mentioned this pull request Nov 12, 2026
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.

2 participants