Skip to content

[KS] DX checks: dev loop, API docs coverage, templates, CLI, reproducible builds (#170, #171) - #460

Open
sethwebster wants to merge 2 commits into
seth/kitchen-sink-gatefrom
seth/ks-170-dx-checks
Open

sethwebster wants to merge 2 commits into
seth/kitchen-sink-gatefrom
seth/ks-170-dx-checks

Conversation

@sethwebster

Copy link
Copy Markdown
Collaborator

Refs #170, Refs #171

Developer-experience checks as gate audit steps, registered in e2e/checks/developer-experience.yaml and documented in docs/e2e-flows.md#developer-experience-audits. bun run e2e:audit --audit <name> runs one step. Audit steps now run one at a time, so build and timing steps don't overlap.

Step Checks What it does
api-docs DX-DOCS-01..03 Checks that every public export has TSDoc and no any type, and that every subpath has a docs page. tests/api-docs-coverage.test.ts fails on any new gap. docs/api-undocumented.json lists the known gaps and can only shrink.
cli DX-CLI-01..02 Runs the SDK's spark bin headless: help for every command, --version, and 12 misuses that must each exit 1 with a one-line message.
templates DX-TPL-01..02, DX-REPRO-01..02 Packs the SDK, then runs spark create for the macOS, Windows and universal templates in a scratch dir (CI=1, no TTY, scratch SPARK_HOME) and type-checks them. Then two clean release builds of the macOS template, compared file by file. Everything under the scratch dir is unregistered from LaunchServices, and the dir is deleted.
dev-loop DX-LOOP-01..04 Runs spark dev --clear for the Kitchen Sink and drives its dev build in driver mode (no window, no focus) on a free port. Covers cold start, Fast Refresh (hot update, no reload), JS edits needing no rebuild, a native config change requiring one, and the syntax-error overlay. DevTools has its own checks (#267).

CLI fixes the cli audit found:

  • spark sdk, spark add and spark updates without a subcommand said "Unknown command". They now list the subcommands.
  • spark --version was rejected. It now prints the version.
  • spark dev --help outside an app exited 1 with a require stack. It now prints the options.

Budgets

The dev-loop budgets are for the reference MacBook Air (M1, 8 GB) but were not measured on it. They are 3x what this M4 Max (Mac16,5) measured, rounded up: cold start 45 s, Fast Refresh 2 s per edit, native change detection 5 s.

Verification (this M4 Max, macOS 27, Xcode 27.0)

#171)

- api-docs audit and tests/api-docs-coverage.test.ts: every public export has TSDoc and no any type, every
  subpath a docs page; docs/api-undocumented.json lists the known gaps and only shrinks
- cli audit: help for every command, --version, one-line errors; spark sdk/add/updates without a
  subcommand name the subcommands; spark dev --help works outside an app
- templates audit: spark create from the packed SDK (macOS, Windows, universal), headless, type-checked;
  two clean release builds of the macOS template compared file by file
- gate audit steps run one at a time; e2e:audit --audit <name>
dev-loop audit: a real spark dev session of the Kitchen Sink with its dev build in driver mode. Cold start,
Fast Refresh (hot update, no reload), native change detection (JS edits need no rebuild, a native config
change does) and the syntax error overlay, against M1 8 GB budgets derived from M4 Max measurements.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant