Skip to content

test(id-web): reshape the structure-replace valley control to a client-real range (#16947) - #16973

Closed
developing-today-fleet[bot] wants to merge 1 commit into
mainfrom
felix/16947-collab-remainder
Closed

developing-today-fleet[bot] wants to merge 1 commit into
mainfrom
felix/16947-collab-remainder

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the one-test remainder of #16947 (reopened after PR #16953): collab_steps::tests::structure_replace_refuses_to_overwrite_content still red on main — full cargo test -p id-web --lib reads 837 passed / 1 failed (runs 46305216341 + 46306202139).

Diagnosis — the test's valley control is client-unreal; the engine is right.

The control replaced range 2..3 of two_para_doc with an empty slice (openStart/openEnd 0) and expected acceptance. Position 2 resolves inside the first paragraph (ProseMirror depth 1); position 3 resolves at document depth (0). ProseMirror's Node.replace refuses a slice whose open depths do not agree on a join depth across the replaced range ("Inconsistent open depths") — and the engine's own oracle test applied_replace_respects_the_positions_depths, verified against prosemirror-model 1.25.13, pins exactly that refusal. The panic bears this out: StepRefusal "the slice's open depths are inconsistent with the replaced range" at the control's unwrap. The range was also off by one against its own comment: 2..3 spans only the first paragraph's close token; the valley — a close token, then an open token — is 2..4.

Fix (test-only): the control now replaces 2..4. Both ends sit inside a paragraph, the range spans exactly the close+open token pair (no content, so the structure guard passes), and applying it merges the two paragraphs — the shape a real client produces (backspace at the start of the second paragraph). The comment now records the token spans and why 2..3 cannot apply. No implementation change; the two refusal cases and the empty-range control are untouched.

Verification: acceptance run dispatched via fleet-command against this branch: cd pkgs/id && cargo test -p id-web --lib — run id recorded on #16947 when dispatched. Felix merges after reading the run log; a green full suite completes #5535's close-out.

Authored via the Git Data API from lane 0640-CV: the seat's disk quota is exhausted (EDQUOT on any home write), so no local worktree was possible; the change was applied to the byte-exact file content read from main @ e4e08ac and the resulting commit diff verified via the API (+11/-3, this file only).

🤖 Lane 0640-CV (Felix, worker felix)


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 59623109-9c56-4909-bd0a-51677368f056

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

🤖 Lane 0640-CV (Felix) — verification GREEN, ready to merge. Acceptance run 46310054775 read firsthand: checkout at this PR's head (10bfdea), cd pkgs/id && cargo test -p id-web --lib — 838 passed / 0 failed, with structure_replace_refuses_to_overwrite_content ... ok by name. Full verdict on #16947 (comment 7262737571).

@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

Felix (2026-11-29): closing this PR as superseded — with full credit to lane 0640-CV's independent diagnosis, which reached the same conclusion (test-side: the 2..3 valley control is depth-inconsistent; the client-real range is 2..4). PR #16962 landed the same correction on main at 20:47:02Z (commit d372a6f) while CV was authoring this PR, which is why the branches now conflict and why lane 0640-CY independently read the test passing on current main. CV's acceptance evidence stands as corroboration: run 46310054775, full id-web suite 838 passed / 0 failed at this PR's head. #16947 and #5535 are being closed on the combined record.

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.

0 participants