Skip to content

id(web): keep rebuilt-node checks permissive for out-of-schema base content (#1618 follow-up) - #16818

Merged
dezren39 merged 1 commit into
mainfrom
xaltha/1618-collab-apply-validation
Nov 29, 2026
Merged

dezren39 merged 1 commit into
mainfrom
xaltha/1618-collab-apply-validation

Conversation

@dezren39

@dezren39 dezren39 commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #16787, which merged at c7aaf47 before this fix landed (the branch was recreated by the push that carried it).

#16787's rebuilt-node validContent checks held every rebuilt node to the active schema's content expression in full. That is too strict for base documents the server produced itself: Document::new builds a raw-mode document holding a paragraph — outside the raw schema — and the #2968 concurrency tests apply steps to it. Holding the document node to code_block+ there refuses every step against that base.

This change matches the module's established permissive stance for base content (document_content_size): a child outside the schema — which a step itself can never introduce, since check_step refuses out-of-schema slice nodes before application — exempts its parent from the expression match, while schema-known children are still fully checked, marks included. Includes a regression test covering both the permissive base and a fully-checked raw document.

Verification: fleet-command run 46271653113 (cargo test -p id-web) runs against this branch's head, which is #16787's tree plus exactly this diff.

Refs #1618

{
  "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-29T14:15:00Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch/workspace/github-work/w0647-l03",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch/workspace/github-work/w0647-l03",
      "repo": "developing-today/code",
      "branch": "xaltha/1618-collab-apply-validation",
      "sha": "fd12669df4e07c9cb715336e62983b76010c3fd6"
    },
    "auth_subject": "xaltha",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

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

…ontent (#1618)

A base document the server produced itself can hold nodes outside
the active schema (Document::new's raw-mode paragraph is the live
example, and the concurrency tests apply steps to it). A child a
step could never introduce — check_step refuses out-of-schema
slice nodes first — now exempts its parent from the expression
match instead of poisoning every step against that base, matching
the permissive stance document_content_size has always taken.
Schema-known children are still fully checked, marks included.
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

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: 0d98a6ac-47c3-49f7-974f-533c0ec2e527
Commits

Reviewing files that changed from the base of the PR and between 29bbf0e and fd12669.

Files selected for processing: 1

  • pkgs/id/crates/id-web/src/collab_steps.rs
  • 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

@dezren39
dezren39 merged commit 3b7cc38 into main Nov 29, 2026
2 checks passed
@dezren39
dezren39 deleted the xaltha/1618-collab-apply-validation branch November 29, 2026 15:01
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.

1 participant