Skip to content

fix(id-web): collab step-engine normalization + stale test oracles (#16947) - #16953

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
archer/16947-collab-fixes
Nov 29, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
archer/16947-collab-fixes

Conversation

@developing-today-fleet

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

Copy link
Copy Markdown
Contributor

Closes #16947 — the 7 cargo test -p id-web --lib collab failures from run 46285580674. Per-test diagnosis is recorded on the issue (comment 7261581776). Two genuine engine fixes in collab_steps.rs; five stale test expectations corrected in collab.rs (engine behaviour is the ProseMirror-verified side in each).

Engine fixes (crates/id-web/src/collab_steps.rs)

  • content_between: a text run now counts as content only where the replaced range covers a positive length of it. An empty range inside a text run was refused as "structure replace would overwrite content"; PM's contentBetween with dist == 0 is always false. Fixes structure_replace_refuses_to_overwrite_content.
  • Step application now coalesces adjacent text runs with equal marks (coalesce_text_runs in apply_step_in_doc), mirroring PM's fragment invariant. A removeMark left two adjacent unmarked runs (5 + 6) where the document model holds one (11). Fixes mark_steps_update_the_model.

Stale oracles (crates/id-web/src/collab.rs)

  • test_apply_steps_rejects_slice_with_unopenable_depths: control slice now inserted inside the paragraph (from 1, depth 1 — the paragraph-split shape). At from 0 (depth 0) PM refuses the same slice as deeper than the insertion position; the engine's own oracle test pins that refusal.
  • test_apply_steps_rejects_non_numeric_heading_level: control heading now inserted after the paragraph (from 7, document level). Inside the paragraph a block child is invalid content, as PM also refuses.
  • The three note-policy tests: event totals now include the signed note.set_access event recorded since design(id): note access policies do not replicate — a peer rebuilding from events alone treats scoped notes as public (#3819 follow-on) #16717 (owner publish + set_access + publishes). The oracles' intent — a refused publication records nothing — is unchanged; each refusal still adds zero events.

Verification: cargo test -p id-web --lib collab to be dispatched against this branch via fleet Actions exec; the full diff is the merge evidence per Drew's rule (CI is not a gate).

Lane 1337-G (alpha DRIVE author lane, 2026-11-29).

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-29T19:51:28Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": null,
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": null,
    "auth_subject": "archer",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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: 7385764b-b1ac-425b-aa1b-c45c242ac48a

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

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.

[main-ci] id-web collab tests red on main — 7 failures in cargo test -p id-web --lib collab (run 46285580674)

0 participants