Skip to content

Point the UI sweep at the modules the render suite split into - #41

Merged
max-sixty merged 1 commit into
mainfrom
fix/ui-sweep-stale-test-paths
Aug 25, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/ui-sweep-stale-test-paths

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Problem

.claude/skills/ui-sweep/SKILL.md names tests/test_render.py twice, and 6e19694 ("Split monoliths along existing domains") deleted that file — the browser suite is now render_harness.py plus thirteen test_render_*.py modules. Both references are load-bearing for a sweep: the first tells the session where to get serve and open_page before it can drive a page at all, and the second tells it where the finding gets pinned once it is fixed. A session following either one reaches a path that does not exist.

Fix

Point the Drive step at tests/render_harness.py, which owns both fixtures today (render_support.py re-exports them, but the harness is where they live). Point the Fix-and-pin step at whichever test_render_*.py module owns the gesture, rather than at one file — that is the shape the split left, and naming a specific module here would go stale the next time the corpus is regrouped. Paragraphs reflowed to keep the file's wrapping, which is why the diff is wider than the two phrases.

Nothing else under .claude/ referenced either deleted monolith, and the sweep's other named surfaces still resolve: render_version (interact.py) and plugins/leaf/skills/leaf/CLAUDE.md.

Testing

Documentation only — no test. A regression test here would have to be a repo-wide "markdown names real files" linter, and the two false positives I hit while surveying show why that wants an allowlist immediately: CLAUDE.md writes scripts/interact.py relative to plugins/leaf/skills/leaf/, and .agents/plugins/marketplace.json reads as a bare plugins/ path when the line wraps. Per tests/CLAUDE.md's boundary rule there is also no module that owns the repo's own developer skills — test_interact_* owns markup and the CLI, test_render_* the browser, and the product-documentation tests compare docs/ against the shipped vocabulary. Flagging the gap rather than inventing a boundary for it.

How the drift was found

Pulled path-shaped tokens out of every tracked markdown file and checked each against the working tree:

grep -rhoE '\b(tests|scripts|plugins|examples|docs|\.claude)/[A-Za-z0-9._/-]+\.(py|js|json|css|md|sh|html|toml|yaml|svg)\b' --include='*.md' .

Three misses, of which one is real:

  • tests/test_render.py — the two references this PR fixes.
  • scripts/interact.py — CLAUDE.md:38, relative to the plugins/leaf/skills/leaf/ the sentence above it establishes. Correct as written.
  • plugins/marketplace.json — CLAUDE.md:35, the tail of .agents/plugins/marketplace.json across a line wrap. Correct as written.

@max-sixty
max-sixty merged commit a2496f7 into main Aug 25, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/ui-sweep-stale-test-paths branch August 25, 2026 16:20
max-sixty added a commit that referenced this pull request Oct 12, 2026
…ts by ref, and repaint only the pairs on an inspection choice (#2527)

Follow-up to the Lit conversion of `lf-visual-review` (#2374), covering
item #35 of the Lit-survey review (that review's numbering, not GitHub
issues) and the part of item #41 that touches this widget's tests.

**#35: cuts left by the conversion.**
- The inspector's radios declare their Enter/Space command with
`commandsOn` in the template, replacing the widget's own path: a cache
of ref callbacks, a `dataset` re-entry check and `commands(radio, …)`.
The radios no longer carry `data-mode`/`data-scope`/`data-scale`; the
one control archetype that selected on `data-mode` now selects on the
radio's `value`.
- Each case entry holds its `lf-shot` and article through the `ref`s the
template binds, so the post-render `querySelector` loop, the six
`shotHost.querySelector("lf-shot")` lookups and the unobserve-on-removal
loop are gone.
- Only the selected case's head, toolbar slot and stage are
size-observed, since hidden cases measure zero; observation moves with
the selection.
- An opacity tick repaints only the inspector and the pairs. A mode,
scope or size choice repaints the inspector, the pairs and the selected
pair's allocation, without re-rendering every case. `#remaining()` runs
once per render rather than once per case (it was quadratic in case
count), and the selected pair gets its allocation alone after the shared
choices instead of a second full inspection.
- A failed source (the `failSoft` view in `#show`) now discards its
cases, and the next good commit rebuilds them with the selection kept.
With entries held by ref, a failure left each entry's article null, and
the next-remaining control threw inside every page-wide key reflection.
- The focus-crop availability test has one home, `#focusAvailable()`,
and `type="button"` is dropped where `offered` already writes it.
- The `data-lf-gen="1" data-lf-said` markers stay as static attributes.
Lit cannot interpolate attribute names without a directive, and #2504
removed `said` so that the static markers are the one documented form.

Behaviour changed: none a reader sees. Enter on an inspector radio now
has a test; that test fails when the command's `run` is emptied.

**#41 (this widget's part).**
`test_visual_review_recovers_from_rejected_cases` no longer exists:
#2487 deleted it when the `visual-run` contract began refusing repeated
case ids, so no data reaches the failure view now. The reorder test
replaces its `node === old` check with what that identity gives the
user: after the reorder, Cmd/Ctrl+Z still undoes the typed draft (the
assertion fails when the editor is swapped for a copy with the same
value). `test_visual_review_ignores_a_late_load_from_detached_evidence`
now replaces the evidence through `data set`, as a new run would,
instead of swapping the `lf-shot` by hand behind Lit, and it now asserts
that the shown pair's box does not move when the detached evidence
finally loads. Its old assertion read the new shot's own image width,
which the old shot could never change; the new one fails when the layout
reads the detached shot's geometry.

**Line deltas**
- Hand-written source: `lf-visual-review.js` 940 → 917 (−23; +93/−116).
- Tests: +23/−27 (−4).

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 21, 2026
…3455)

Builds Max's decision #41 on the overnight report, option A: tell the
agent that a queued delivery is a repeat.

On the `codex queue` route (the desktop app and IDE), `codex queue`
takes no message id and lists nothing queued. If the adapter dies, a
state write fails, or the queue call times out after `codex queue` has
taken the pointer but before Leaf records the acceptance, Leaf queues
the same pointer again rather than risk losing the comment. Two cases
follow, and this covers both.

### What changes

- **The first queued turn's ack accepts the offer**
(`codex_state.confirm_codex_pointer`). When that turn acknowledged the
pointer before the adapter's retry, `leaf delivery ack` refused it
(`delivery no longer owns its page or receiving turn`), since the record
was still a bare queue offer, and the adapter queued the pointer again
once that turn ended. The pointer in the turn proves the queue took it,
so the ack now records the queue's acceptance and the opened pickup, and
nothing is queued twice.
- **A second turn's ack says it repeats** (`delivery.earlier_pickup`).
Where the retry queues before the first turn acknowledges, Codex still
runs a turn for each pointer. The second turn's `leaf delivery ack` now
prints a `delivery-repeated` note: an earlier turn already picked up the
delivery, so don't redo that turn's work, followed by the answers its
updates still owe, read from the page's obligations rather than the
agent's memory. Leaf keeps those updates owed until they are answered,
as before.
- `harness-codex.md` ("Delivery") and `leaf delivery ack --help` say
what the note means.

### Evidence

A `codex-queue` journey (codex-cli 0.160.0) ran this branch with a
one-shot `OSError` injected right after `queue_delivery` returned. The
adapter retried a second later and queued the release comment's pointer
again, so Codex ran two turns opening on the same `leaf-delivery`
message. The first did the work and replied. The second ran `leaf
delivery read` and `leaf delivery ack`, got `an earlier turn already
picked up delivery 9a338dc0, so don't redo the work that turn did. None
of its updates still owes an answer.`, and ended on one sentence saying
the comment was already handled, with no edit or reply. Every later step
of that journey passed. Without the injection, the `codex-app-server`
and `codex-queue` journeys both pass on this branch.

### Tests

- `test_a_codex_delivery_queued_twice_tells_its_second_turn_it_repeats`
injects the same failure into `accept_codex_delivery` after the queue
call: the adapter queues the same pointer twice, the first turn's ack
prints nothing, and the second turn's ack names the first turn and the
reply still owed, or no answer once it is written. It fails without the
note.
-
`test_a_queued_turn_that_acks_before_the_retry_takes_the_delivery_once`:
with the same failure, a turn that acknowledges before the retry gets
its ack accepted, the adapter queues nothing more, and the page records
one queued and one opened pickup. It fails without the
`confirm_codex_pointer` change, with the refusal above.
- Focused suites pass: `test_codex_adapter.py`,
`test_codex_app_server.py`, `test_receipts.py`, `test_delivery.py`,
`test_hooks.py`.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants