Skip to content

fix(repl): keep image chips atomic and renumbered - #821

Open
yxlyx wants to merge 3 commits into
mainfrom
fix/atomic-image-chip-delete
Open

fix(repl): keep image chips atomic and renumbered#821
yxlyx wants to merge 3 commits into
mainfrom
fix/atomic-image-chip-delete

Conversation

@yxlyx

@yxlyx yxlyx commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Fixes #820
Fixes #834
Fixes #835

What changed

  • Route modified word motion and deletion through image-chip boundaries.
  • Remove stale composer-backed chips when payload deduplication drops their queue slot.
  • Generate packed-SDK native fixtures at the optional-dependency versions they represent and require the consumer install to stay offline.
  • Open the subagent cancellation test directory with iteration enabled.
  • Teach WebSocket recovery assertions to accept only the replacement socket's observed prewarm anchor.
  • Add regressions for atomic word deletion and reused live ordinals.

Why

Image chips are attachment controls, not ordinary words. Generic word boundaries could split a chip into literal text. Separately, payload deduplication could remove an attachment slot without removing its chip, allowing repeated [Image #2] labels to accumulate.

The Linux CI fixture also reached directory pruning through a handle that was not opened for iteration, causing BADF. The SDK package smoke built native fixtures at the SDK version rather than the versions declared by its optional dependencies, which allowed package resolution to select a released binary instead of the isolated fake executable.

WebSocket recovery can legitimately prewarm a replacement connection before replaying full history. The previous assertion rejected every parent anchor, misclassifying that fresh connection-local prewarm as a stale inference chain.

Constraints and trade-offs

  • Zero-remapped chips are removed only when they were backed by composer attachments, so literal typed [Image #N] text remains unchanged.
  • Existing image-payload deduplication behavior is preserved.
  • SDK and native package releases may differ; the test follows the declared dependency pins instead of changing published versions.
  • Offline fixture installation makes accidental registry fallback fail directly rather than requesting credentials.
  • WebSocket assertions still reject inference parents and anchors from other connections, and still require recovery to use a new socket with full input history.

Route modified word motion through image-aware boundaries so deletion cannot split attachment chips.

Drop stale composer-backed chips when payload deduplication removes their slot, allowing live ordinals to be reused without accumulating duplicate #2 labels.

Fixes #820
Open the cancellation fixture with iteration enabled because finish prunes directory entries. Linux path-only directory handles cannot be enumerated.

Build native package mocks at their declared optional-dependency versions and install the smoke consumer offline. Otherwise a version mismatch can resolve a real binary instead of the mock and fail on missing credentials.
Record each mock connection prewarm response and permit only that anchor in fresh-socket assertions. Recovery and compaction legitimately bootstrap a new socket before sending full history, so rejecting every previous_response_id misclassifies valid recovery.

Keep socket replacement, stale-chain rejection, and full-history assertions intact. Report only connection and parent identifiers on mismatch rather than dumping complete request bodies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant