Skip to content

test: pin keptIds branch and parent-container observation in dangling-link scrub characterization - #175

Open
christian-byrne wants to merge 1 commit into
mainfrom
fleet/act-cmp-162-followup-scrub-keptids
Open

christian-byrne wants to merge 1 commit into
mainfrom
fleet/act-cmp-162-followup-scrub-keptids

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Test-only follow-up to #162 (benceruleanlu's approve-with-comments, 2026-09-02T21:26:01Z). Both non-blocking items addressed; no production logic changes.

Full context for agent readers

benceruleanlu's approval on #162 listed two non-blocking suggestions:

  1. "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."
  2. "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."

This PR does both:

  • New case keeps live-link references when delete_node removes only the deleted node's own links: a four-node workflow where delete_node(20) removes link 1 while unrelated link 3 (40→50) stays live. Asserts the dangling endpoint refs on node 10 are scrubbed, node 20 is gone, and the live link's endpoint refs (outputs[0].links on 40, inputs[0].link on 50) survive — the keptIds branches of scrubDanglingLinkRefs.
  • The no-link-reference-writes case now observes the parent inputs/outputs containers with observeDeep instead of only the child links Y.Array, so a whole-value replacement of port.links (or slot.link) is counted. A harness-sensitivity check at the end of the case performs exactly that whole-value replacement directly on the doc and asserts the observer fires — with the old child-array observer this assertion fails, proving the gap is closed, not vacuous.

Note: this repo is retired read-only (its own AGENTS.md; #168) with active development moved to ComfyUI_frontend/packages/comfy-multi-player via FE #16644 (still open). The follow-up is opened here following the post-retirement precedent of #172 (test-only, off standalone main) so the review items have a carrier before the workspace move lands; it should port (or be re-targeted) with the move.

Origin row: act-cmp-162-followup (awc-audit second-pass CONFIRMED_GAP). QUIET WEEK: assigned christian-byrne only; the approver is recorded here as the originating reviewer, not assigned or mentioned.

Evidence

Node v25.9.0 (nvm use 25), head db3e005cf7317eddb877c7fe8c113e8d6903ce82:

$ npx vitest run test/scrub-dangling-link-refs.test.ts
 Test Files  1 passed (1)
      Tests  5 passed (5)

$ npm run typecheck            # build + tsconfig.test.json + test/types
  (clean, exit 0)
$ npm run lint                 # 1662 warnings, 0 errors (pre-existing warnings)
$ npm run check:purity         # purity check PASSED
$ npm run check:pins           # pass (offline mode)
$ npm run check:profile-claims # pass
$ npm run check:coderabbit     # PASSED (5 block(s) from 4 profile(s))
$ npm run verify:corpus        # PASSED (8 files)
$ npm run check:imports        # INCONCLUSIVE — pre-existing: dependency-cruiser
                               # JSON unparsable under Node 25.9.0, same as #162
$ npm test                     # 968 passed / 8 failed — ALL 8 failures are
                               # test/check-import-graph.test.ts, verified
                               # pre-existing environmental (dependency-cruiser),
                               # same 8 documented on #162; untouched here

Harness-sensitivity proof (item 2): reverting only the observeDeep change back to the child-array observer makes the new sensitivity assertion FAIL (adds no encoded link-reference writes… ×), confirming the new harness catches the whole-value port.links replacement the old one missed.

…-link scrub characterization

Follow-up to #162 (benceruleanlu approve-with-comments, both non-blocking items):
- delete_node fixture with one removed link and one unrelated live link pins
  the keptIds branches of scrubDanglingLinkRefs (live endpoint refs survive).
- set_widget no-link-reference-write assertion now observes the parent
  inputs/outputs containers via observeDeep, so a whole-value replacement of
  port.links is caught; a harness-sensitivity check proves the observer is
  live (the previous child-array observer missed that case).

<!-- authored-by:agent lane-act-cmp-162-followup-1709 -->
@christian-byrne christian-byrne added the risk:R1 PR risk grade (advisory shadow check; grader-owned) label Sep 3, 2026
@christian-byrne christian-byrne self-assigned this Sep 3, 2026
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 129 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: a3f3da4c-c10c-49c9-a069-62450553693e

📥 Commits

Reviewing files that changed from the base of the PR and between 84030a4 and db3e005.

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

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

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.

1 participant