refactor(layout): delete the IFC packer's unreachable non-persist commit arm - #511
Open
send wants to merge 3 commits into
Open
refactor(layout): delete the IFC packer's unreachable non-persist commit arm#511send wants to merge 3 commits into
send wants to merge 3 commits into
Conversation
…mit arm FragmentationType is a two-variant exhaustive enum (Page | Column) and InlineFragConstraint.fragmentation_type is non-optional, so persist_candidate = frag_constraint.is_none() || frag_is_paged || frag_is_column was identically true: flow_align was always Some, flush_line's else arm (the unmerged per-segment entity-rect commit) was unreachable, and place_item's is_some() recording gate never failed. Delete the arm, drop persist_candidate, and narrow Option<FlowAlign> to FlowAlign so the dead fork cannot grow back type-silently. persist_flow keeps its live multicol whole-in-column narrowing. No behaviour change: workspace suite green (12785 tests), elidex-layout-block 325/325. Dead-arm prereq PR of the #11-line-box-decorated-inline-content umbrella (seam-3 sibling; plan memo: docs/plans/2026-08-inline-nonpersist-dead-arm.md). At landing it closes #11-inline-align-clientrects-nonpersist-path (the arm the slot booked work against no longer exists). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…eletion Three hygiene fixes from the 4-angle cleanup pass: reword reconcile.rs's mutual-exclusivity proof (do_carrier is now the exact negation of persist_flow, not a falsifier of its deleted second conjunct); drop the duplicate block_size binding the dedent stranded beside line_height in flush_line; consolidate the persistence-gate narration at the persist_flow gate (the FlowAlign construction site keeps only the recording paragraph). Comment/binding-only; elidex-layout-block 325/325, multicol suite green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…fix the discard-claim narration Pre-push /code-review findings, applied. With the dead pre-gate gone, do_carrier was definitionally !persist_flow, so reconcile_flows's two-bool interface re-encoded the deleted third state: its persist_flow || do_carrier guard was a tautology whose skip path was unreachable by the same sole-caller argument that deleted the packer arm. reconcile_flows now takes persist_flow alone (the else arms ARE the carrier case), the guard is dropped, the redundant do_carrier conjuncts go with it, and inline/mod.rs derives do_carrier = !persist_flow — the arms' exclusivity holds by construction. Also corrects a false claim the comment consolidation had replicated to four sites: a non-persisting run's recorded lines are not "discarded" — they are carried per column via ColumnFlowSlice (terminal-Z C-1/C-2); only a probe's are discarded. Plus: stranded "When persisting:" framing dropped, FlowAlign heading reworded, frag_is_* bindings moved beside their consumers. Behavior-preserving (focused re-check: dedented block token-identical, arm truth tables exact); workspace suite 12785/12785, clippy clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Dead-arm prereq PR of the
#11-line-box-decorated-inline-contentumbrella (sibling of the seam-3 prereq #508, which landed as7e256029— this PR's base). Plan memo:docs/plans/2026-08-inline-nonpersist-dead-arm.md(ships with this PR).What
LinePacker::flush_line's rendered-content branch forked onself.flow_align: theSomearm runs the per-line natural→painted bake, theelsearm committedcurrent_line_entity_rectsunaligned, per break segment, unmerged. Theelsearm was provably unreachable:FragmentationTypeis a two-variant exhaustive enum —Page|Column(lib.rs:36-42).InlineFragConstraint.fragmentation_typeis non-optional (inline/mod.rs:95).persist_candidate = frag_constraint.is_none() || frag_is_paged || frag_is_columnwas identically true, soflow_alignwas alwaysSome(soleLinePacker::newcaller), so theelsearm andplace_item'sis_some()recording gate never took their other branch.Deleted the arm, dropped
persist_candidate, and narrowedOption<FlowAlign>→FlowAlignso the dead fork cannot grow back type-silently.The pre-push gate then surfaced the same class one level down and it is closed here too: with the pre-gate gone,
do_carrieris definitionally!persist_flow, soreconcile_flows's two-bool interface re-encoded the deleted third state (itspersist_flow || do_carrierguard was a tautology). The disposition is now one bit —reconcile_flowstakespersist_flowalone, theelsearms are the mid-break carrier case, and the arms' exclusivity holds by construction. A false comment claim the consolidation had replicated (non-persisted lines "discarded" — they are in fact carried per column viaColumnFlowSlice; only a probe's are discarded) is corrected at every site.persist_flowkeeps its live multicol whole-in-column narrowing; the carrier route, the paged slice/rebase, and the suppressed-line discard arm are all reachable and untouched.Behaviour
None — every deleted branch was unreachable, every de-gated site had an identically-true guard, and the fix-delta re-check proved the dedented blocks token-identical with exact arm truth tables. Workspace suite 12785/12785,
elidex-layout-block325/325, clippy clean, doc + trip-wires pass. (cargo denyfails on every change due to the upstream advisory-db breakage RUSTSEC-2026-0244 — unrelated.)Ledger (performed at landing, per the umbrella's §10 dead-arm rows)
#11-inline-align-clientrects-nonpersist-path— the arm it books work against is deleted.#11-inline-relayout-box-stalenessalone.⚠ The
reconcile_flowsinterface collapse exceeds the surface the umbrella's §5.2 dead-arm row enumerates; the memo discloses it and records it as an input for the umbrella's round 20.🤖 Generated with Claude Code