Repository navigation
Phase 4: multi-region & cross-file joint denoise - #4
Merged
Merged
Conversation
… non-aligned gap)
…3/6 fixed; feedback ablation 16)
…ross-region feedback)
…alize, Regenerate Regions UI)
… test counts 190/51
…ce (global type-feedback driver)
… workspace feedback)
…> joint 1, half_index fixed)
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.
Generalizes the single-region diffusion editor to edit multiple regions at once — jointly denoised in one sequence, steered by type-checker feedback that spans regions and files.
What's new
Sampler — a multi-region infill loop.
build_multi_infill_maskapplies the single-region gen→suffix relaxation per region (conservativeattend_future_regions=Falsedefault, chosen by a real-model spike);multi_infilldenoises R masked spans in one sequence, and repair widens-to-tail per region without disturbing the fixed text between them. Single-regiondenoise/infillare the R=1 special case, preserved byte-identical.Type feedback across regions. pyright runs on the full reconstruction; each diagnostic's char range maps to
(region, absolute position)— with an explicit reconstruction-index → absolute-position map, since a region that over-fills shifts every later region left — and repair re-masks per region.Cross-file. Each file denoises its own sequence, but a global driver reconstructs all files into one pyright workspace so imports resolve, then dispatches re-masks back per
(file, region). A call-site error in file B caused by file A's regenerated signature is attributed across the import and re-denoised.Product surface.
Engine.edit_regions/edit_files, RPCeditRegions/editFiles(each with a distinct*/stepstreaming notification), and a VS Code "Regenerate Regions" multi-selection command.Acceptance evals (real 4-bit model)
eval/results_multiregion.md): across two-region cross-dependency cases, type-aware denoise cut errors 11 → 5, 3/6 fully fixed. Ablation: joint visibility without the checker scored 16 (worse than independent) — the type feedback carries the gain, not mere visibility.eval/results_crossfile.md): per-file feedback 3 → cross-file workspace feedback 1. The fixed case is a float-index error inmain.pythat a single-file check can't see (the import doesn't resolve alone) but the shared workspace catches.Tests
197 pytest (injected fake forward + fixtures, no model needed) + 51 vitest +
tsc, all green. Every loop change is TDD'd before the real-model path; single-region behavior is unchanged.Not included
The cross-file extension accumulator UI (per-file version guards, offset invalidation, N-file preview) is deferred — it is materially more than a protocol seam. The cross-file engine, RPC, and eval are complete.