Repository navigation
test: key Feature Previews and IPC channel counts per item so concurrent merges stay green - #37678
Conversation
…ent merges stay green
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. The PR only changes two test files and nothing a user sees, so the missing screenshots and blind read leave no evidence gap. [UX-REVIEWED] a16658a Description read[DESCRIPTION-READ] be33393c72717cc2e28d630eafbd08ed233a8d1fb88e3d948a1034236f82b2ec That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change only touches tests, every check is still exact, and each pinned total is now either computed from a per-item table or already implied by an exact list that stays. Notes
[DESIGN-REVIEWED] a16658a Description read[DESCRIPTION-READ] 89c7f68ea96bcfc89dc20543777c1786752150be0a2a91b36148cb513bffcde9 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
I reviewed head a16658a. This is a test-only change: each shared count is replaced by a per-item record. I ran both changed test files on this head and they passed: 39 Feature Previews tests and 93 IPC registrar tests. I also checked that removing a row from the new table, or flipping its hint flag, makes the row-matching tests fail, so the new check is not vacuous. The computed InfoTip count gives the same value as the old pin, and the exact sorted channel lists still fully pin the IPC set, so dropping those totals removes no coverage. Nothing blocks.
Problem / Motivation
Goal: The Feature Previews and Electron IPC channel tests stay green on
mainwhen two pull requests that were each green on the same base both merge.Both tests pinned one shared total. Two PRs that each add one item rewrite that number to the same value, git merges the identical edit cleanly, and
mainholds one item more than the number says. Onorigin/mainin the last 30 days the switch counttoHaveLength(17)was re-pinned 13 times,INFO_TIP_COUNT12 times, and the IPC totals47/4810 times each.Why it matters
A red
mainfails every open PR's CI until someone re-pins the number, and the re-pin itself races the next one.Not a goal
settingsCoverage.test.tsis already keyed per file and stays as is.What changed (motivation → approach → change)
website/src/test/previewSurfaces.test.tsx: two tests waiting fortoHaveLength(17)switchesFEATURE_PREVIEW_ROWStable, one line per switch label, with whether the row carries an InfoTip. The tests wait until the rendered rows deep-equal the tableINFO_TIP_COUNT = 15Decisions(its tip is already in its own exact button set)website/electron/test/ipc-registrar.test.js:registerShell owns the exact shell channel set…h.handlers.size + h.listeners.size == 47(and+ 1 == 48) beside exact sortedSHELL_HANDLES/SHELL_LISTENERSlists that already decide the setThe rule is the one in
docs/system-specs/common/testing-conventions.md§ Merge-safe ratchets and counts (PR #37660).Backwards compatibility
Compatible: test files only.
Removes nothing: each dropped total was either implied by an exact list that stays, or is now computed from the per-item table.
Tests
Two-branch merge simulation (scratch clone; A and B cut from one base, each adds one item in a different place and updates the record exactly as the test asks, then
git merge):origin/mainexpected { tips: 17, ingress: [] } to deeply equal { tips: 16, ingress: [] }ipcMain.handle("sim:alpha"), B addsipcMain.on("sim:beta")expected: 48 actual: 49'sim:beta'In the preview scenario the old switch-count wait (pinned 18, 19 rendered) also passed by timing:
waitForread 18 switches before the Decisions card rendered. The new wait compares labels, so a table that misses a rendered row never matches.On this branch rebased onto current
main:previewSurfaces.test.tsx39 passed;ipc-registrar*.test.js93 passed;npx tsc -p tsconfig.app.jsonexit 0; eslint clean on both files.Proof: not provable -- test-only change
Manual verification
N/A — tests only; the simulation above is the behavioral check.
Related Issues
Part of #37656
Checklist