chore(test): baselines and per-surface test projects for the functional stack (P0) - #1288
Conversation
Type-only fixes for the 32 errors tsc reported. One runtime fix rides along: RevenueIntroScreen spread the POSTHOG_SDKS and STRIPE_SDKS sets before calling array methods on them, which previously threw on those branches. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Projects: store, agent, tui, cli, harness, architecture, keyed by today's
directories. New scripts test:<project> and test:arch, a surfaces workflow
that runs each project alone plus a production and CI bundle audit, aliases
and empty shape files for the future src/{store,agent,tui,cli} surfaces, and
a chunk manifest script for dist/.
Generated-By: PostHog Desktop
Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Goldens recorded from the current tree: a frame per screen and overlay at two sizes through the real ScreenContainer, keyboard versus control action session diffs, store invariants, flow traces and screen analytics per program, post auth gate ids, the MCP control state sequence, and prod and CI chunk manifests. The import boundaries test seeds the 72 current violations and fails on new ones or stale entries. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Test against a Context Mill branch:
Add Results will be posted here when complete. |
Evidence (local, Node v22.22.0, base
|
| Check | Result |
|---|---|
pnpm typecheck |
pass |
pnpm lint |
0 errors, 477 pre-existing warnings |
pnpm test (build + all Vitest projects) |
183 files, 3101 tests pass |
| Goldens (frames, keyboard pairs, flow traces, post-auth gates, commandments, credential isolation) | byte-identical against current main, no -u |
Postbuild smoke-test.sh + warlock smoke |
pass |
Headless CI run: CI build, --ci on a temp copy of wizard-workbench express-todo, project 228144, US |
exit 0, orchestrator, 7/7 steps completed |
| Chunk-manifest fixtures | regenerated from this branch's prod and CI builds, 49 chunks |
Delta vs #1269: dropped the empty src/{store,agent,tui,cli} stub barrels and their aliases (tsconfig.build.json identical to main); catch-all architecture surface renamed store → legacy; known-violations.json unchanged (72 edges).
Not part of this PR: pnpm test:e2e (jest, e2e-tests/) is a dead suite on main. With a local moduleNameMapper fix it resolves modules, then every test times out on PHW_CLI_INTERACTIVE_REQUIRED because it drives the pre-Ink prompt flow. No CI workflow runs it. Needs its own retire-or-rewrite PR.
Review round applied in 426ce05, then 730848e
Typecheck, lint 0 errors, 183 files, 3104 tests. Frames re-recorded, every other golden unchanged. |
Frames record at 120x40 and 80x28, the ScreenContainer minimum, with one 60x15 case pinning the viewport guard. A revenue-intro detect-error case covers the Set spread fix that shipped in the typecheck commit. The keyboard test asserts equality and names the six known divergences instead of snapshotting a boolean, and uses a temp install dir so no host path leaks in. The post-auth gate golden reads the production walk, now exported as postAuthGateSteps. The three control fixtures had no reader and are gone. The bundle job diffs the chunk manifests against their fixtures so the audit can fail. The surfaces workflow drops the test matrix and lint, both already run by build.yml, and declares read permissions. Tests outside __tests__ land in legacy rather than nowhere. The dead harness surface rule is removed. The flow-trace golden documents the run, ai-opt-in, run triple as a known defect. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Rolldown assigns shared modules such as analytics and yara-hooks to different chunks on macOS and Linux, so a byte diff of the per-chunk manifest failed on the runner against a fixture recorded locally. The script gains --summary: chunk names plus the sorted set of bundled sources, identical on both platforms. The fixtures become that summary and the Surfaces workflow diffs it. The full manifests still upload as artifacts. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Sourcemap sources differ between macOS and Linux, so a locally recorded summary can never match the runner. The prod fixture now comes from the Surfaces artifact. The job builds both variants and uploads both summaries before diffing, so a drift still leaves the files to re-record from. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Same source as the prod fixture one commit earlier. The prod summary from this run matched its fixture byte for byte, so the gate holds on Linux. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
Architecture and Bundle audit run with continue-on-error. Drift in the import edges or the chunk summaries lands in the job summary with the diff and the file to re-record. The unit-test goldens in build.yml still block. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
The architecture test already runs inside pnpm test. The bundle audit was a platform-dependent proxy for the startup-closure check, which belongs in a unit test on dist once src/agent exists. chunk-manifest.no-jest.ts stays as a reading tool. Generated-By: PostHog Desktop Task-Id: d14e92bb-6ee1-49b5-8502-39cb80079589
|
/wizard-ci ai-observability |
🧙 Wizard CI ResultsTrigger ID:
Configuration
|
|
Rwar flaky CI |
|
the heck is |
Looks like the behavior was actually correct. SDK version mismatch with already instrumented posthog. Needs a fix workbench side. |
Records what the wizard does today so the surface split can prove it didn't change. Nothing moves. Revives #1269 onto current main.
Goldens. 45 screens at 120x40 and 80x28, 16 keyboard-vs-control-action diffs, 24 flow traces, the post-auth gate table, 72 cross-surface import edges. All run inside
pnpm test. A new edge fails. A changed screen fails with a diff.Projects. Six Vitest projects keyed by today's directories:
legacy,agent,tui,cli,harness,architecture.legacyis the catch-all until B1 and C1 empty it.pnpm teststill runs everything once.Source changes. Nine files, 35 lines added, 25 removed. Two carry behavior.
RevenueIntroScreen.tsx.slice/.mapSet.slice is not a functionand unmounted. Frame golden covers it, mutation-checked. Rides in the typecheck commit since the plan forbids force-pushing the split.bootstrap.ts,program-step.tspostAuthGateStepspi/mcp.ts,MetricsIntroScreen.tsx,CrateStack.tsx,McpDemo.tsx,bounded-fs.ts,wizard.tstsc --noEmitpasses on the whole treeKnown and recorded, not fixed here. Gated programs fire
screen run,screen ai-opt-in,screen run.authenticate.tssets credentials beforeapiUser. Six keyboard pairs commit different state than their control action,confirm_setupskips the scan-consent default. Both are named in the tests and are production behavior changes for their own PRs.Differs from #1269: no stub barrels,
storerenamedlegacy, no surfaces workflow, no bundle fixtures. The startup-closure check returns as a unit test ondistoncesrc/agentexists.Created with PostHog Desktop