You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Restructuring a page is blocked by dropped ids that no comment anchors #67
version check refuses a version that drops an id the previous one carried, unless a settled widget decision retires it. The error reads:
ids present in <prev> but dropped in <name> (anchors on them will break): [...]
It says that of every dropped id, and on a page of any size no thread anchors most of them.
What it costs
Rewriting three paragraphs into two leaves an id with no home, and the check will not say which ids are load-bearing. The safe move is to keep all of them, so the edit bends around that.
Twice on one page I renamed a replacement element to absorb a retired id. Once I added a table the page did not need, purely to carry an id whose paragraph I had merged away. The constraint made the page worse.
The machinery is already there
anchored_ids in events.py returns exactly "element ids an unresolved thread still points at", and retirable_ids already calls it. But only on one branch, to stop an unanswered widget being withdrawn out from under a live thread:
if not answered and (whole & anchored or not retires <= dropped):
continue
So the set is computed and the semantics are already settled. The general drop rule just never asks it.
What I would expect
An id no unresolved thread anchors is droppable. The rest belong in the advisory tier version check already prints with a · prefix, alongside record_lag and unpointable_blocks: worth knowing, not a refusal.
The mechanism works as you describe — I ran it. Swapping the license at checking.py:219 for gone - anchored_ids(events, enclosing_of(was)) lets an uncommented lf-diagram leave the page, and still refuses it the moment an unresolved thread anchors there. Nothing else in the static half objects.
What anchored_ids alone under-covers: the id rule is also the only gate on a dropped decision. Both restatement_errors and report_errors skip any unit either version lacks, both carrying the same line — "A unit either version lacks is id-survival's business, not this gate's". So with the relaxation in, v1's lf-draft id="d1" carrying a standing edit can be deleted outright by v2 and the check passes, printing ids and decisions carried over while that edit is still in the log pointing at nothing. Same page, today: ids present in v1.html but dropped in v2.html … ['d1']. That is the reader decision CLAUDE.md's default is deliberately protecting, and it leaves silently — invisible to both sides, which is the property the restatement gate exists to deny.
So the droppable set reads better as what nothing live points at: anchored_ids∪ the units the standing action fold rests on ∪ the units standing reports rest on. That costs nothing at the call site — previous_projection is already built five lines above, and decisions(...) already reads it. A retracted or restated-away action is already absent from that fold, so the id it held becomes droppable on the version after the retraction, which is the behaviour you'd want anyway. Work claims need nothing: widget_work_without_seats already refuses a version that removes an active claim's seat, independent of this rule — the precedent for a per-consumer gate rather than a blanket id one.
Two smaller things:
The advisory tier only prints on the ✓ path.checking.py:274 returns before the · lines. Demoting dropped ids there means the advice vanishes on any version that has some other error — which is exactly the restructuring version most likely to have one, so the lines want to move above that gate or print in both branches.
Happy to implement the three-way union above — say the word, or say if a standing report's target should be advice rather than a refusal, since that's the one member of the set I'd guess at.
Demonstration and notes
Four cases on 6e655de, run against tests/interact_support.py's page_dir fixture with leaf.checking.retirable_ids monkeypatched to lambda holders, events, dropped, outcomes, spk: dropped - anchored_ids(events, enclosing_of(spk)) — the issue's rule exactly, licensing every unanchored dropped id.
CURRENT (v2 drops <lf-diagram id="flow">, no thread anywhere):
✗ v2.html: 1 issue(s)
- ids present in v1.html but dropped in v2.html (anchors on them will break): ['flow']
RELAXED (same v2):
✓ v2.html: parses, widgets validate, one module script + theme link, ids and decisions carried over, nothing overflows the 720px column
RELAXED, unresolved thread anchored at flow:
✗ v2.html: 1 issue(s)
- ids present in v1.html but dropped in v2.html (anchors on them will break): ['flow']
DECISION (v1 has <lf-draft id="d1">, user edit standing on it; v2 deletes d1) — today:
✗ v2.html: 1 issue(s)
- ids present in v1.html but dropped in v2.html (anchors on them will break): ['d1']
DECISION — relaxed:
✓ v2.html: parses, widgets validate, one module script + theme link, ids and decisions carried over, nothing overflows the 720px column
STANDING ACTIONS ON d1 STILL IN LOG: [{'kind': 'action', 'author': 'user', 'version': 1, 'widget': 'd1', 'action': 'edit', 'detail': {'text': 'Cut the flag; backfill first.'}, …}]
The decision fixture is interact_support._decided, which is what test_a_version_may_not_quietly_rewrite_what_the_user_decided drives — that test proves the rewrite path is gated; the delete path is gated only by the id rule, which is why relaxing it there is silent.
Activity
leaf-agent commentedon Aug 27, 2026
The mechanism works as you describe — I ran it. Swapping the license at
checking.py:219forgone - anchored_ids(events, enclosing_of(was))lets an uncommentedlf-diagramleave the page, and still refuses it the moment an unresolved thread anchors there. Nothing else in the static half objects.What
anchored_idsalone under-covers: the id rule is also the only gate on a dropped decision. Bothrestatement_errorsandreport_errorsskip any unit either version lacks, both carrying the same line — "A unit either version lacks is id-survival's business, not this gate's". So with the relaxation in, v1'slf-draft id="d1"carrying a standingeditcan be deleted outright by v2 and the check passes, printingids and decisions carried overwhile thateditis still in the log pointing at nothing. Same page, today:ids present in v1.html but dropped in v2.html … ['d1']. That is the reader decision CLAUDE.md's default is deliberately protecting, and it leaves silently — invisible to both sides, which is the property the restatement gate exists to deny.So the droppable set reads better as what nothing live points at:
anchored_ids∪ the units the standing action fold rests on ∪ the units standing reports rest on. That costs nothing at the call site —previous_projectionis already built five lines above, anddecisions(...)already reads it. A retracted or restated-away action is already absent from that fold, so the id it held becomes droppable on the version after the retraction, which is the behaviour you'd want anyway. Work claims need nothing:widget_work_without_seatsalready refuses a version that removes an active claim's seat, independent of this rule — the precedent for a per-consumer gate rather than a blanket id one.Two smaller things:
checking.py:274returns before the·lines. Demoting dropped ids there means the advice vanishes on any version that has some other error — which is exactly the restructuring version most likely to have one, so the lines want to move above that gate or print in both branches.version checkrefuses the drop and a suggestion can't wrap it #43 wants the same call site. Its "shape 1" is this rule, reached from the other direction (a widget item can't leave anx-content: itemscontainer because no retirement licenses it). Landing them as one change avoids the same predicate being written twice.Happy to implement the three-way union above — say the word, or say if a standing report's target should be advice rather than a refusal, since that's the one member of the set I'd guess at.
Demonstration and notes
Four cases on
6e655de, run againsttests/interact_support.py'spage_dirfixture withleaf.checking.retirable_idsmonkeypatched tolambda holders, events, dropped, outcomes, spk: dropped - anchored_ids(events, enclosing_of(spk))— the issue's rule exactly, licensing every unanchored dropped id.The decision fixture is
interact_support._decided, which is whattest_a_version_may_not_quietly_rewrite_what_the_user_decideddrives — that test proves the rewrite path is gated; the delete path is gated only by the id rule, which is why relaxing it there is silent.Scratch file only; nothing committed.