Skip to content

test: characterize dangling link reference scrubbing - #162

Merged
benceruleanlu merged 1 commit into
mainfrom
christian-byrne/op2-cmp-scrub-dangling-1
Sep 2, 2026
Merged

benceruleanlu merged 1 commit into
mainfrom
christian-byrne/op2-cmp-scrub-dangling-1

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Pins dangling-link cleanup behavior with four focused tests. No production logic changes.

Full context for agent readers

Adds current-behavior coverage for scrubDanglingLinkRefs after winning delete_node operations with explicit and incidental link removal. It also verifies that a non-structural set_widget preserves live input/output link references, emits no link-reference mutations, and remains byte-identical when replayed.

This characterizes the graph-integrity portion of KA-4 without changing op semantics, the O(nodes) scan, or call ordering.

Verification:

  • focused Vitest: 4/4
  • TypeScript test compilation: green
  • targeted ESLint: zero errors
  • build, purity, pins, profile claims, CodeRabbit config, and corpus verification: green
  • full Vitest: 850/858 passed; the 8 failures are all existing check-import-graph gate cases because the mandated Node 25.9.0 runtime is unsupported by dependency-cruiser (^22 || ^24 || >=26)

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 20 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 114 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 39383202-8976-4ae0-bb3c-12d2dde02097

📥 Commits

Reviewing files that changed from the base of the PR and between 2370b7e and 2eceeb3.

📒 Files selected for processing (1)
  • test/scrub-dangling-link-refs.test.ts

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the risk:R1 PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026
@christian-byrne christian-byrne self-assigned this Sep 2, 2026

@benceruleanlu benceruleanlu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. The added cases meaningfully cover dangling-reference cleanup. These are non-blocking opportunities to make the characterization more complete.

Non-blocking review findings
  • suggestion: Exercise live-link preservation through an operation that actually calls scrubDanglingLinkRefs. Both delete fixtures currently remove every link, while the surviving-link case uses set_widget; a delete fixture with one removed link and one unrelated live link would pin the keptIds branch under KA-4.
  • suggestion: Observe the parent input/output containers, or use observeDeep, when asserting that set_widget emits no link-reference writes. Observing only the existing child Y.Array misses an equivalent whole-value replacement of port.links.

@benceruleanlu
benceruleanlu merged commit 245723a into main Sep 2, 2026
7 checks passed
@christian-byrne

Copy link
Copy Markdown
Contributor Author

Follow-up PR addressing both non-blocking items from this approval: #175 (assignee christian-byrne only per quiet week; approver recorded in the PR body, not assigned or mentioned).

Full context for agent readers
  • Item 1 (keptIds branch): new delete_node fixture with one removed link and one unrelated live link — asserts the dangling endpoint refs are scrubbed while the live link's endpoint refs survive.
  • Item 2 (observation gap): the set_widget no-link-reference-writes case now observes the parent inputs/outputs containers via observeDeep so a whole-value replacement of port.links is caught, plus a harness-sensitivity check that performs that replacement directly and asserts the observer fires (fails under the old child-array observer).

Evidence on the PR: focused file 5/5, typecheck clean, gates pass, full suite 968 passed with only the 8 pre-existing check-import-graph environmental failures also documented on #162.

Opened against this (retired) standalone repo following the #172 post-retirement precedent while FE #16644 carries the move to ComfyUI_frontend/packages/comfy-multi-player.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:R1 PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants