Conversation
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.
Companion editors currently cannot verify which working branch supplied prompt history or safely retry a save after losing its response. This adds scoped history reads and optional conditional commands to the existing endpoint. For example, retrying an acknowledged-on-disk fork with the same operation ID returns its receipt instead of creating another child.
List/revision responses echo the project, scene and working branch, plus a history revision stamp. Version 1 commands support save, explicit fork, activate, label, archive and delete with ownership checks, stale-state rejection and durable receipts. Legacy editor requests retain their behavior. Loading or activating saved history does not apply its text to Plan JSON.
A recovery journal commits revision files, index and receipt together as durable intent. Native store reads/writes finish an interrupted command before returning state, including a crash after a mutable prompt file changes but before its index. I/O errors return 500 so clients retain the exact request and check its receipt. Receipts are not evicted; new commands stop at 1,024 per scene history. The protocol document describes restart, copied-branch and single-process boundaries.
Validation: existing Python history and JavaScript ancestry tests pass; new store tests cover concurrent authors, immutable/mutable forks, interruptions between file writes, restart/retry and named/copied branch isolation. Tests of the real HTTP handlers with CPU-only ComfyUI stubs cover scope echo, read/status/retry, 409 conflicts, 500 interrupted writes and the real 423 ownership guard. Python compilation and diff checks pass. All projects are temporary fixtures; production workflow validation remains pending.
This draft targets nightly and supports SceneWeaver's saved prompt history workspace. It does not include or depend on the other open SceneWeaver integration PRs.