Repository navigation
test(agent): separate absent subscription sequence fixture - #18486
Conversation
🎭 Playwright: ✅ 2097 passed, 0 failed · 4 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since d90da45a1bf9932820bae42f893bb8332493c022
Full docs: ADR-DEVEX-LINT-0015 🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight This candidate changes nothing the matrix measures, so every expensive stage was skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review. Your free on-demand review promotion remains active until October 9, 2026 at 6:00 PM UTC. 📝 WalkthroughWalkthroughThe CRDT numeric tests now use separate fixtures for sequenced and unsequenced frames. The unsequenced subscription test verifies that the parsed frame omits ChangesCRDT frame test validation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to This test-only change explicitly checks the absent-sequence case. No merge-blocking risk from the described change is evident; normal checks remain applicable. 🚥 Pre-merge checks | ✅ 7✅ Passed checks (7 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #18486 +/- ##
==========================================
+ Coverage 84.01% 84.93% +0.91%
==========================================
Files 3157 2308 -849
Lines 154223 132868 -21355
Branches 39672 35627 -4045
==========================================
- Hits 129574 112847 -16727
+ Misses 23050 19709 -3341
+ Partials 1599 312 -1287
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: follow-up needed on fixture separation and the claimed consumer coverage
No P0 or P1 blockers.
Existing finding contested
- [P2] I could not confirm the Review Focus claim that PR #17611 covered the seq-less acknowledgement race. That PR sends an acknowledgement without
seq, then a live update at sequence 1. The cited race is different: sequence 1 overtakes the acknowledgement, then the catch-up at the omitted baseline sequence 0 arrives. WithackSeq === null,catchUpPendingstays false, so that catch-up can be rejected as stale againstlastSeq === 1. Please either add that exact consumer test or narrow the description to the behavior PR #17611 actually covers.
Checked and cleared
- [P2] The invalid-present-sequence table still permits an own
seq: undefinedresult, but that assertion is unchanged on the base branch. A focused mutation confirmed the pre-existing gap, so it is not attributed to this PR. - [P3] The prior absent-sequence omission finding is fixed. A
seq: undefinedresult fails the newnot.toHaveProperty('seq')assertion. - Fallow reported 15 inherited dev-dependency findings and no introduced dead-code, complexity, duplication, or styling findings. Each inherited item is outside this test-only diff:
@pinia/testing,@tailwindcss/vite,jsonc-parser,markdown-table,mixpanel-browser,monocart-coverage-reports,openai,picocolors,pretty-bytes,unplugin-icons,unplugin-vue-components,uuid,yaml,zip-dir, andzod-to-json-schema.
Coverage
- Depth: standard.
- Lanes: correctness, maintainability, idiomaticity, tests, and documentation. No changed path was left untraced.
- Standard lenses covered blast radius and regression history; boundary, idempotency, shared-state, and root-cause checks; deletion and reader-load checks; TypeScript and type-system rules; unit-test design, mock boundaries, setup ownership, and executable proof; and technical-writing checks. Playwright-specific lenses were not applicable because this PR does not touch
browser_tests/. - Verification: the focused Vitest file passed 28 tests; scoped formatting and ESLint passed;
pnpm typecheckpassed. Fallow's review gate passed, though its saved baselines reported path-matching warnings. - Existing feedback: CodeRabbit reported no actionable comments. I independently checked the three PR #16969 findings linked in the description.
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
✅ No high-signal findings.
Panel: 8/8 reviewers contributed findings.
christian-byrne
left a comment
There was a problem hiding this comment.
Reviewed the split against the behaviour it is meant to preserve, since a fixture split that quietly weakens an assertion is the trap here.
It does not weaken anything — it is strictly stronger, and for a reason worth stating. On main the helper's ...(seq !== undefined && { seq }) already omitted the key entirely when called with no argument, so the old test was exercising the absent-seq case. What it could not do is prove it: toEqual ignores undefined-valued properties, so toEqual({ type, data: { workflowId, ok } }) would have passed just as happily against data: { workflowId, ok, seq: undefined }. The added expect(frame?.data).not.toHaveProperty('seq') is the first assertion here that distinguishes omitted from present but undefined.
That is also what makes the split worth doing rather than cosmetic: the old test's meaning was a property of the helper's conditional spread, not of the test. Anything that made sequencedFrame always include seq would have turned it into a silent duplicate of the omits an invalid doc_subscribed seq case above it, with nothing failing. Making seq required removes the way to write that mistake. Worth a line in the PR body — as written it reads as tidying, and it is closing a real hole in strictness.
Verified the two fixtures produce identical frames: { v: 1, workflow_id: 'wf-1', ok: true } either way (the old path got ok from the type === 'doc_subscribed' spread), so the toEqual half asserts exactly what it did before.
No overlap with #18700 (0 of 1 files), and docFrameClient.numeric.test.ts is a wire-parsing test rather than a projection-shaped one, so it survives the refactor unchanged.
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: the coverage claim remains unresolved; two non-blocking code comments are still open
Still open
- [P2] Unresolved: the PR description still says PR #17611 covers the seq-less acknowledgement race from PR #16969. The follow-up review does not address this point. PR #17611 tests an acknowledgement without
seqfollowed by sequence 1, not the cited ordering where sequence 1 arrives before the acknowledgement and the baseline catch-up at sequence 0 follows it. Please add that exact consumer test or narrow the description. - [P3] Confirmed:
sequencedFramestill omits the key for explicitundefined. The author's follow-up independently calls the conditional spread vestigial and recommends replacing it with directseq; the unchanged head does not yet make that edit. - [P3] Nit, unresolved: the new fixture declaration still uses an arrow where the repository guidance prefers a function declaration.
Feedback dispositions
- Confirmed: the PR is strictly stronger than the base test, and
not.toHaveProperty('seq')closes the old absent-key assertion gap. My prior review already marked that original finding fixed; it does not conflict with the remaining vestigial fixture mode. - Not introduced here: the suggested symmetric split for
docOpsResultFrameconcerns unchanged base code, and that test already checks property absence directly.
Verification
- Head remains
24f14634d4943126d5e32ddd3daa876b021d74fa; no code changed since the prior review. - I reused the prior focused Vitest, lint/format, typecheck, mutation, and Fallow evidence rather than rerunning unchanged checks.
- No new finding was introduced by the follow-up review.
`seq` became a required parameter of `sequencedFrame`, so the `seq !== undefined` branch can no longer be taken: every caller passes a defined value. Leaving it in implies a caller that omits it, which is exactly the implicit-omission coupling this PR removes. Addresses review feedback on PR #18486 (review 5324690344).
Repository guidance prefers a function declaration where a helper captures no state and needs no expression semantics. Addresses DrJKL's P3 nit on PR #18486 (discussion r4109490223).
DrJKL
left a comment
There was a problem hiding this comment.
Verdict: ready to approve
All prior findings are resolved on 781e7a4bb1f2cf14f34815d8536a693cc3bcffe9:
- [P3] Fixed:
sequencedFramenow emitsseqdirectly, leavingunsequencedSubscribedFrameas the only omission path. - [P3] Nit, fixed:
unsequencedSubscribedFrameis now a function declaration. - [P2] Fixed: the PR description no longer says PR #17611 covers the overtaking race. It distinguishes that PR's healthy ordering and records the still-missing consumer regression case as follow-up work.
I reviewed the effective one-file diff against the refreshed base after the merge from main and found no new issues. The focused Vitest file passed all 28 tests; scoped formatting and ESLint passed; and pnpm typecheck passed.
Summary
Keep invalid-sequence parser cases type-safe and make absent
doc_subscribed.seqcoverage verify key omission explicitly.Changes
sequencedFramecallers to supply a sequence, gives the absent-sequence case its own fixture, and asserts the parsed frame has noseqproperty.sequencedFramenow emitsseqdirectly, sounsequencedSubscribedFrameis the only omission path and the two fixtures cannot own the same state.Review Focus
This closes the two residual test-quality findings from #16969 (comment) and #16969 (comment).
Corrected — the third finding is not covered, contrary to what this description said before. The consumer-level concern from #16969 (comment) is still open. Merged PR #17611 pins a different ordering: a seq-less (or seq-0)
okack followed bydoc_updateseq 1, which is the healthy path. The hazard in that finding is the overtaking order — a seq-less ack setsackSeq = null, socatchUpPendingstaysfalse(layoutFollowerBridge.tsonDocSubscribed),isCatchUpcan therefore never becometrue, and once a live frame has advancedlastSeqthe catch-up at the omitted baseline is dropped byrejectStaleUpdateas stale. Nothing tests that.Narrowing the claim rather than adding the test here, because the missing case belongs in
followerSubscription.test.tsagainst the bridge and, on the reading above, would land as a failing pin rather than a passing one — which does not belong in a fixture-split PR. Raised and confirmed by @DrJKL twice on this PR; recorded as a follow-up so it is not lost with this description.Local verification: focused Vitest (28 passed),
oxlintandoxfmt --checkon the changed file. Hosted CI remains the authority for the full suite.Screenshots (if applicable)
Not applicable; test-only change.