Repository navigation
Permit unreferenced IDs to leave revisions - #73
Conversation
leaf-agent
left a comment
There was a problem hiding this comment.
protected_ids reads well — it keeps the whole answer inside the projection, the advice tier lands where #67 asked for it, and each new acceptance test drives its boundary from both sides. Two things, one of which I think is a real hole.
Reports lose the detail ids that actions keep. state_ids.update(...) unions action_rests_on over projection.actions only, so a standing report's record can name a page element the next version drops. Inline below, with a repro.
Visual parts kept the blanket rule. The neighbouring check in checking.py — the one that reports visual parts present in revision r{predecessor} but dropped in index.html (anchors on them will break) — still refuses every dropped part whose section survived, with no reading of whether anything anchors it. That is #67's complaint one grain down: an lf-chart series or an lf-shot region that no thread points at is as unremovable now as an unanchored id was before this PR, and anchored_ids returns only anchor.section, so nothing in the codebase can currently answer "is this part anchored". I read the PR summary's "keep visual-part survival independent" as a deliberate scope line rather than an oversight, so this is a question and not a request: is the part half meant to stay strict, or is it a follow-up?
leaf-agent
left a comment
There was a problem hiding this comment.
ab629b5 settles the docstring half — "keeps its owner and fold unit, plus every page id its canonical liveness reading rests on" now covers both channels, which is what the widened union does. One thing left, inline: the new regression passes just as well against a naive reports | actions, so the sentence desired exists to make true — an outranked report stops pinning its detail ids — is asserted nowhere.
I confirmed that behaviour by hand on e5e32a3: with a move report to c-later outranked by a reader move to c-done, dropping c-later exits 0 with · ids dropped from revision r1: ['c-later']. test_interact_document.py, test_interact_contract.py and test_interact_product.py are green there too — 329 passed; ab629b5 is prose-only on top of that.
I also poked the neighbouring case, since the wider union now reaches into report territory: a version that spends overruled on the unit and drops the id the report names is refused, while the two-version route — overrule, stamp, then drop — works. That reads as report_errors's own standing-until-stamped rule rather than a defect; noting it only because it is the sharpest edge the change touches.
The render gate used to reach /api/state behind a networkidle navigation, which waited out the page's first poll and the append that rode on it. The news stream leaves the network never idle, so the gate now navigates on load and can reach /api/state while the page's first read is still in flight — whereupon it counts an empty log, waits for nothing, and reads a page 120px mid-move. That is what CI reported at run 33053132232. The window this test constructs is now stated on both sides: the action still goes in behind the page's first read, and the gate's own read is held until it has. A 0.4s delay on the page's read reproduces the CI failure exactly on the old test and passes on the new one at 2s, so the ordering is an arrangement rather than a margin. The premise assertion moves ahead of the gate's verdict, since a window that never opened makes that verdict say nothing.
leaf-agent
left a comment
There was a problem hiding this comment.
The push since my last read is #75's two commits plus a merge of main; that content landed as 44d1ac7, so against today's main the effective diff is back to the same six files. Nothing new to review there. One leftover from those six, outside the diff.
docs/how-it-works.html quotes the check's success line verbatim in its <pre id="loop-transcript"> block — the one introduced as "The output below is a real page's" — and still carries the pre-PR wording:
$ leaf version check ./review
✓ index.html: parses, widgets validate, one module script + theme link, ids and decisions carried over, nothing overflows the 720px column
cmd_check now prints protected ids and decisions carried over. Confirmed at this head by running the check on a shipped example:
$ uv run python plugins/leaf/skills/leaf/scripts/interact.py version check <page>
✓ index.html: parses, widgets validate, one module script + theme link, protected ids and decisions carried over, nothing overflows the 720px column
publish-site.yaml deploys docs/, so as it stands the site would publish a transcript the tool no longer produces — and it's the page that reads as the tool's own voice. Nothing under tests/ pins that block, so the suite stays green either way, which is why it hasn't shown up as a failure. Happy to push the one-line fix if you'd rather not hand-apply it.
Summary
Testing
pre-commit run --all-filesuv run pytest tests(641 passed, 1 skipped)Closes #43
Closes #67
Thanks to @max-sixty for reporting these cases in #43 and #67.