Repository navigation
test: cut duplicated and misplaced tests across the pyramid - #707
Conversation
…eed check Co-Authored-By: Codex gpt-6-astra <[email protected]>
Keep resource loading and memory recall coverage in their existing owning suites. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Remove duplicate component mounts, repeated adapter and lifecycle checks, and fixture-only or private markup assertions from the web-b slice. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Reuse attention, shell, and harness setup while retaining their distinct assertions. Keep update-state rendering in its existing component suite and preserve real navigation coverage. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Co-Authored-By: Codex gpt-6-astra <[email protected]>
Move mocked restart presentation into its component suite, deduplicate update projection and default-agent smoke coverage, and drop dialog styling assertions. Preserve real daemon journeys and update QA owner references. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Keep isolation, readiness, portal scoping, and real daemon contracts while dropping mock selector echoes, duplicate lane and HTML checks, and the unit-only daemon build probe. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Keep the sixty-minute invariant intact and share the Settings renderer with native Edit assertions. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Co-Authored-By: Codex gpt-6-astra <[email protected]>
Preserve real populated upgrades and every credential assertion while avoiding five empty prefix replays. Fold fresh catalog readback into the existing fresh-boot and reopen journey. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Share static showcase setup, consolidate the Storybook handler contract, and remove duplicated workspace checks and presentation-only assertions. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Co-Authored-By: Codex gpt-6-astra <[email protected]>
Retain canonical subprocess I/O, native pipeline, source validation and resolved hook validation owners. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Co-Authored-By: Codex gpt-6-astra <[email protected]>
Review every owned suite, retain behavioral contracts, and consolidate duplicate lifecycles. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Remove fake self-tests, redundant alias and equivalence cases, and duplicate command checks. Preserve distinct assertions in existing lifecycle suites and move pure terminal contracts into untagged tests. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Consolidate equivalent handler and resource checks while preserving transport and isolation journeys. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Move error classification to its pure owner, consolidate installation assertions, and virtualize retry waits. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Share test-scoped runtimes across compatible sibling journeys using named steps. Preserve assertions and cold-state ordering, keep security negatives isolated, and reselect profile identity after workspace changes. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Remove tautological SDK and skill assertions and share existing bundle installation and artifact fixtures. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Merge fixture launch checks into the agent isolation journey and leave boolean health and local CLI validation matrices with their lower owners. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Co-Authored-By: Codex gpt-6-astra <[email protected]>
Co-Authored-By: Codex gpt-6-astra <[email protected]>
Co-Authored-By: Codex gpt-6-astra <[email protected]>
Remove fake-only MSW/router tests, exact duplicate invariants, and private presentation checks. Preserve behavioral and accessibility assertions in canonical suites while reducing repeated renders. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Preserve deep-link validation before launch bursts and run healthy diagnostics before shell relaunch. Select nightly through the shared Linux wrapper. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Remove duplicate and fake-only tests across the platform slice while preserving security, concurrency, and persistence assertions in their canonical suites. Reuse isolated database seeds and avoid index rebuilds used only by Scan setup. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Addresses the final xhigh review: the merged multi-select case now checks exactly one chip after the first selection and two after the second, and the release desktop nightly lane uploads its artifacts on success too, so the sixty-minute catalog receipt required by ET-web-sessions-catalog-modal stays retained. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deleted tests left blank lines before closing braces, long boolean chains over the golines limit, an ineffectual context reassignment, and helpers that only integration-tagged files still use. Move those helpers next to their integration-tagged callers instead of deleting them, order the settings DB helper parameters context-first, and drop the udsapi extensionStatusCode wrapper whose only caller was the removed duplicate transport test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedToo many files! This PR contains 506 files, which is 206 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configuration
⛔ Files ignored due to path filters (47)
📒 Files selected for processing (506)
You can disable this status message by setting the
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. Comment |
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |
The release workflow gained a sixth job gated on the semantic 'build: release ' PR title (e2e-desktop-nightly). The contract keeps asserting the conventional trigger, the merge triggers and the shared preflight ordering; only the job inventory moves from five to six. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reusing the runtime lane binary made the remote daemon report the stamped lane version while the in-process CLI reports dev, so connect refused the remote as incompatible in CI. Build the remote binary from the checkout again; the consolidated reuse journey stays. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Navigate explicitly to the fleet before creating each skill-source session so the Dock cannot restore the previous agent detail. Preserve the merged journey and all picker assertions. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Seed the loop before the palette caches catalogs and scope session chrome to its owning surface when a frame retains tabs from earlier steps. Co-Authored-By: Codex gpt-6-astra <[email protected]>
Co-Authored-By: Codex gpt-6-astra <[email protected]>
Co-Authored-By: Codex gpt-6-astra <[email protected]>
Allow the real Go and SQLite fixture test a documented cold-build budget. Build the database seeder once per browser lane and reuse its executable across workers while preserving independent database templates and per-test copies. Co-Authored-By: Codex gpt-6-astra <[email protected]>
The database seeder prebuild pushed prepareE2ELaneEnv past the funlen budget; resolve the seeder and the stamped daemon through one helper. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The evidence values appended for E2E-029/E2E-030 left text after a closed empty string and an unquoted colon, so the YAML frontmatter no longer parsed. Quote each complete value. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Our test suite was heavy on CI and on developer machines. This PR audits the whole test pyramid (Go unit/integration/runtime E2E, Vitest, Playwright web E2E, Electron desktop E2E) for four kinds of waste and removes it without dropping any distinct invariant:
The single largest CI lever: a 60-minute real-time desktop soak ran on every PR (
E2E desktoptook 75–78 min onmain). It now runs only in a new release-gatede2e-desktop-nightlyjob, mirroring how web already splits@nightly.Net diff: 553 files, +9,515 / −27,269 lines. Production code is untouched except for one dead internal wrapper, called out below.
Baseline (main
b40b1bf91, CI run 37574793319)TestDaemonE2E*6.2 min, CLI remote-gateway 95 s)Results
Measured on CI (this PR vs
main)TestDaemonE2E*boots)E2E web job wall time is still dominated by per-shard setup (Bun install, Playwright, web build, codegen check), which this PR does not change. The test phase is where the cut lands.
Go race shards,
Frontendand other job wall times are not comparable between the two runs:main's push run reused the Go test cache and a Turbo cache hit (Frontend1.6 min).gotest_census.jsonwill rebalance the Go shards from this PR's timings in the next weekly census refresh.Test counts
The counts below are static (
func Test,t.Run(,it(/test(), except for Playwright, where they are collected.--grep-invert @nightly)func Test*t.Run(call sites*_test.gofilesweb/srccasespackages/uicasespackages/sitecaseslint-pluginscasesWhere the CI time goes away
Desktop soak → release nightly (≈60 min per PR). The test
@nightly Should bound catalog requests during sixty minutes of native desktop uptimekeeps its body and assertions byte-for-byte. Wiring:desktop/package.json:test:e2euses--grep-invert @nightly; the newtest:e2e:nightlyuses--grep @nightly.Makefile: newtest-e2e-desktop-nightlytarget.desktop/scripts/run-e2e-linux.sh: takes the script name, defaulting totest:e2e.release.yml: newe2e-desktop-nightlyjob, gated exactly likee2e-nightly(release PRs only) and with the same setup as CIe2e-desktop. It uploads its receipt artifacts onalways(), becauseET-web-sessions-catalog-modalrequires the receipt to be retained.Storybook-driven "E2E" moved to Vitest (≈8–9 min out of the slowest web shard).
loops-graph-eng.spec.tsstarted astorybook devserver (≈2m13s cold start on shard 1) and drove component stories through a browser for ≈6.5 min.loop-run-page.test.tsx/loop-editor.test.tsxagainst the real components, hooks and routes, and the spec is deleted.main. The diagnosis, from the CI artifacts: the Storybook click left "No node selected", which is selection/geometry drift in the story harness, not a product regression. The route-default control and bell-to-form focus are now proven at the component layer. Physical graph clicks stay covered by the real-daemonloops.spec.ts.Merged sibling browser journeys (web and desktop). Sibling tests that each paid an identical runtime (isolated home + daemon boot + seed + browser context + artifact capture) are now one journey with
test.step. Every assertion and every cold/empty precondition comes first; negative security/isolation checks stay where earlier steps cannot mask them.Cheaper per-test browser runtime.
web/e2e/fixtures/runtime-database.ts+runtime-database-seederbuild one closed, pre-migrated SQLite template per Playwright worker and copy it (COPYFILE_EXCL) into each runtime's private home. The same copy-on-test pattern is used byinternal/testutil/storeseed. First-boot assets, onboarding, migration validation and logging still run on daemon open, and nothing mutable is shared.Go unit-time fixes (measured locally, non-race,
-p 1; CI runs-race, typically 3–10× slower):internal/api/coreinternal/api/httpapiinternal/settingsTestDaemonNativeTools/…Memory admin toolsTestHarnessReentryBridgeScenarios/*internal/subprocessinternal/testutil/e2eharnessThe techniques: closed-seed copies instead of per-test migration, real sleeps → existing fake clocks,
t.Parallel()only where state is private, and one populated migration upgrade per test instead of one per subtest.How the work was done
The work ran as a herdr orchestration:
gpt-6-astra(medium) workers, each on a file-disjoint slice in its own worktree. The slices covered E2E sessions/work/config/infra/desktop, the daemon E2E lane, daemon, store, api, cli, loop, session, extension, platform A/B, web A/B, and ui/site.gpt-6-astraat xhigh read all 548 changed paths, with six sub-reviewers partitioned by area.Binding rules for every deletion:
path::Test/path › describe › it) or is classified non-product (test-double self-test, private slot/CSS/data-attribute artifact, type-only mirror of generated OpenAPI). Per-slice reports list every change with owner and rationale.settingsUpdateIndicatorAvailablepredicate plus the component's absent-on-false case.it.each$namerow.internal/sessionstop deadlines,internal/extensionhost-API deadlines under machine load) were left untouched and reported, not "fixed" in tests.Per-area highlights
Web E2E (Playwright)
SettingsRestartNoticeVitest.loops-graph-eng.spec.tsdeleted after its cases moved down; 14 Vitest cases added.TestStartRuntimeHarness*boots shared where the invariants allow.docs/qa/scenarios/*, 12 files) were updated for merged or moved IDs. Merged titles keep both IDs (e.g.E2E-004 / E2E-013: …) so references resolve. CI evidence globs (*session-harden*,*session-bulk-act*,*E2E-020*,*marketplace*,*worktrees*) still match.Desktop
Go
httpapi/udsapitest bodies deduped. Transport packages keep transport concerns;corekeeps business mapping.integrationtag.stopAndWaittests removed.internal/acpremoved.Vitest (web, packages/ui, packages/site, lint-plugins)
data-slot/data-variant/class assertions with no product contract.lint-plugins: duplicate rule fixtures trimmed and slow cases consolidated (e.g.compozy-design-system.test.mjs7.9 s → 2.6 s,data-boundaries.test.mjs3.0 s → 0.5 s).Non-test changes (all deliberate)
.github/workflows/release.yml: newe2e-desktop-nightlyjob (release PRs only,timeout-minutes: 120).Makefile:test-e2e-desktop-nightly(new target; nothing removed).desktop/package.json:test:e2eexcludes@nightly; newtest:e2e:nightly.desktop/scripts/run-e2e-linux.sh: optional script-name arg, defaulting to the previous behavior.docs/_memory/glossary.md: one entry for the new lane.docs/qa/scenarios/*: reference lines only; no scenario status changed.internal/api/udsapi/extensions.go: removed the unexportedextensionStatusCodewrapper. Its only caller was a duplicate test ofcore.ExtensionStatusCode. Internal code, no public surface.Cross-surface impact audit
compozy__*IDs: no change.skills/compozy/), Web, and site docs: not applicable. The changes are test-only plus CI lane wiring and QA reference lines.make test-e2e-desktop-nightly. The desktop soak's PR-lane execution moves to the release lane: coverage is retained at the release gate, not deleted.Verification
Local, on the integrated branch. Heavy gates are delegated to this PR's CI.
go veton every changed package, untagged and with-tags integration. Alsomagefiles(-tags mage) andsdk/go.golangci-lintv2.13.1 on every changed package,magefilesandsdk/go: 0 issues. This includes fallout fixes: trailing blank lines, golines, an ineffectual ctx, and integration-only helpers moved next to their tagged callers.gofmt,oxfmt --checkandoxlint --deny-warningson all changed files: clean.web,packages/uianddesktop: pass.packages/site: pass viaturbo run typecheck, which runs the generated-content prerequisites.loop-run-page.test.tsx: 99/99.combobox.test.tsx: 5/5.runtime-seed.test.ts: 11/11.internal/settings,internal/api/udsapi,TestGlobalDBAutomationSuggestionMigrations, CLI terminal renderers: pass.--listfor both--grep-invert @nightlyand--grep @nightly, for web and desktop. Browser execution is owned by CI.approve-with-fixes, 0 blockers, 0 majors. Both minor findings were fixed in33adffd43, then re-verified by the same reviewer.always().CI round-1 fixes (after the first PR run)
The first CI run exposed integration issues that only show up in CI. All were fixed without weakening assertions:
internal/configrelease-workflow contract counted five jobs with the semantic release-PR trigger. The newe2e-desktop-nightlyjob is the sixth, so the inventory moved to 6; the conventional-trigger and preflight-order assertions are unchanged.a579dd60vsdev). It builds its own remote binary again; the consolidated reuse journey stays.error-context.mdsnapshots and screenshots. Budgets of merged journeys that legitimately need both halves are now the sum of the original budgets (180 s).loop-runs.test.tsx(moved E2E-030). It now awaits route loading and lazy window imports beforefindBy; it was flaky under the CI Turborepo run.runtime-seed.test.ts/ DB template. The seeder is prebuilt once by the E2E lane (COMPOZY_TEST_DATABASE_SEEDER_BIN) instead ofgo runper worker. The real Go/SQLite self-test gets an explicit 180 s budget for the cold compile.evidencevalues appended for the moved E2E-029/030 owners broke YAML frontmatter (text after a closed"", unquoted:) — now fully quoted; every scenario touched by this PR parses ([email protected]).apt-get(Azure Ubuntu mirror) before any test ran.Follow-ups (deferred, not in this PR)
internal/daemonclarify-keepalive test waits 65 s of real time (integration-only). It needs a production clock seam to virtualize.storybook-bootstrap,packages-ui-storybook-overlays). Each pays astorybook devcold start; serving a cached static build is the next lever.-racetime for six store migration tests that now run in 2–5 s locally without race. Refreshinggotest_census.jsonfrom this PR's CI timings will rebalance the Go shards.internal/session(stop deadlines) andinternal/extension(host-API deadlines) fail locally under heavy machine load onmaintoo. They were not changed.🤖 Generated with Claude Code