fix: the sidecar reproduces the run: right-half metadata, redux paths, dead restore keys - #649
Conversation
…as a list, dead restore branches removed
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. WalkthroughThe update preserves metadata when cropping or saving generated images, serializes Redux image paths as JSON lists, removes obsolete metadata restoration and debug output, and adds regression tests and changelog coverage. ChangesMetadata consistency
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This PR fixes metadata preservation and serialization for in-context outputs and removes unused restore paths; no actionable merge-blocking risk remains beyond normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
assigning @ianscrivener to review and merge |
# Conflicts: # CHANGELOG.md
…consistency # Conflicts: # CHANGELOG.md
|
@anthonywu heads up, our conflict resolutions crossed: your merge came from a main snapshot at #652, so GitHub still flagged the branch as conflicting against current main (and its changelog resolution predated the #651/#655 entries). I kept your merge commit in the history and merged today's main on top, restoring the full |
What
Three sidecar asymmetries from the #578 audit, all on the write side of
--config-from-metadata:get_right_half()droppednegative_prompt,image_pathsand the redux fields, so the sidecar of an in-context result (the right half is the deliverable) couldn't reproduce the run. It now passes every stored attribute through, and a test compares the clone's attributes against the original so the next added field can't silently drop.redux_image_pathswas serialized withstr(list), a Python repr the restore side can never parse. Now a list of strings, same asimage_pathsone line above.--save-full-imagepath in the three in-context CLIs saved the full composite withoutexport_json_metadata, so--metadataonly ever produced a sidecar for the cropped half.Also resolves the dead-restore-branch checkbox:
controlnet_save_cannyandimage_outpaint_paddingwere restored from keys no released writer has ever emitted (checked back to v.0.4.0, where the fixture's version string comes from). Writing them instead lost on both counts: outpaint's flag isn't registered on any real command since the 2025 prep commit (only the completions generator and test fixtures build parsers with it), and canny would need a boolean threaded through four layers of variant code to reproduce a side artifact. Both branches are deleted, plus a strayprint()debug line in the outpaint parse block. The canny tests pass unchanged (they never pinned a sidecar-true restore); the outpaint test now asserts the key is ignored.Part of #578.
Checklist (definition of done)
ruff checkandruff formatare cleanCHANGELOG.md: entry underUnreleasedreferencing this PR number (follow-up commit, number wasn't known)mflux-capabilitiesoutput unaffectedVerification
Ran the full CI selector locally on an M5 (
uv run pytest -m "not slow and not high_memory_requirement"): 1438 passed, 62 deselected.ruff check,ruff format --checkandty checkclean. The new right-half test fails on main (4 attributes differ) and passes here; the redux test fails on main with"['redux1.png', 'redux2.png']"as a single string.Summary by CodeRabbit
Security
Bug Fixes
Greptile Summary
The PR makes generated-image sidecars more consistent and reproducible.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR A[In-context generation] --> B[GeneratedImage composite] B --> C[get_right_half] C --> D[Right-half image] C --> E[Preserved metadata] D --> F[Right-half output] E --> G[Right-half sidecar] B -->|save-full-image| H[Full composite output] B --> I[Full composite sidecar] G --> J[config-from-metadata] I --> JReviews (3): Last reviewed commit: "Merge remote-tracking branch 'fork/sidec..." | Re-trigger Greptile