fix(hyperframes_compose): stop scaffolding over hand-authored compositions - #485
Open
hubooy wants to merge 1 commit into
Open
fix(hyperframes_compose): stop scaffolding over hand-authored compositions#485hubooy wants to merge 1 commit into
hubooy wants to merge 1 commit into
Conversation
…tions The compose operation always regenerates index.html from edit_decisions. In atelier mode index.html *is* the deliverable — hand-authored for that one piece — so scaffolding overwrote the composition it was about to render. Add preserve_workspace to skip scaffolding and render what is already on disk. lint and validate still run, so the output stays gated. The flag joins idempotency_key_fields: without it the scaffolded and preserved runs of the same edit_decisions would collide on one cache key. Missing index.html now fails loudly instead of rendering a blank composition. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYThSL15CujvBwD1wuUmr9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hyperframes_compose's compose operation always scaffoldsindex.htmlfromedit_decisions. In atelier modeindex.htmlis the deliverable — hand-authored for that one piece — so scaffolding overwrites the composition it is about to render.This adds
preserve_workspaceto render what is already on disk instead of regenerating it.Related issue
None — filing the fix directly.
Changes
preserve_workspaceboolean input (defaultfalse, so existing behavior is unchanged). When true, scaffolding is skipped and the workspace's existingindex.htmlis rendered.lintandvalidatestill run in preserve mode, so output stays gated by the same contract checks.preserve_workspacejoinsidempotency_key_fields: without it, a scaffolded run and a preserved run of the sameedit_decisionswould collide on one cache key.preserve_workspace=truewith noindex.htmlin the workspace fails with an actionable error rather than rendering a blank composition.Testing
python -m pytest tests/contracts/ -q— 630 passed, 7 skipped.python -m pytest tests/tools/test_hyperframes_compose.py -q— 46 passed.Guard verified directly:
renderwithpreserve_workspace=trueagainst a workspace containing noindex.htmlreturnsCache-key separation verified:
idempotency_key()returns different keys forpreserve_workspacetrue vs false on otherwise identical inputs.Not verified: a full atelier render end-to-end, which needs a real hand-authored composition and
npx hyperframeson the machine. The scaffold-skip and guard paths above are what this diff changes.Checklist
make test-contracts/make test) where applicable.input_schema.🤖 Generated with Claude Code
https://claude.ai/code/session_01GYThSL15CujvBwD1wuUmr9