The 2026-07-02 skill review (adversarially verified) found the bundled skills teaching pre-refactor reality: whats-next pointed refinement agents at the pre-governance/ decision paths, claimed gh doesn't exist, and taught the hand-staged .pql/changelog flow the pre-commit hook replaced; git-commit mandated the heredoc-in-substitution commit form the repo moved away from and referenced sidecar-era paths; the clide skill omitted the dock slot (D-87); testmode omitted the terminal category; ui-design's glyph table taught the static-const icon API removed in T-314, and its generator scanned for a pattern that no longer matches anything. All fixed against current repo state. The glyph table is regenerated 3-column (name-keyed, byName-first); tool/gen_phosphor_glyphs.dart round-trips it byte-identically. git-commit also gains the session-vs-pre-existing triage step (backported from the settled-reach variant) since this worktree hosts concurrent Claude sessions. Co-Authored-By: Claude <noreply@anthropic.com>
3.4 KiB
name, description
| name | description |
|---|---|
| testmode | Run and interpret the ClideTestApp platform integration harness. Use after modifying toolchain resolution, IPC dispatch, extension lifecycle, theme loading, or native platform code. Also use when the user says "run testmode", "test the app", "smoke test", or "verify the build". Triggers on changes to: lib/kernel/src/toolchain.dart, lib/src/daemon/dispatcher.dart, lib/src/ipc/, lib/src/pty/, lib/builtin/terminal/, lib/extension/, lib/kernel/src/theme/, lib/builtin/*/src/extension.dart, linux/CMakeLists.txt, macos/, Makefile (run targets), lib/main.dart. |
Testmode harness
ClideTestApp is a lightweight Flutter app that boots the real platform
layer, runs structured tests, prints results, and exits. It catches
regressions that unit tests cannot see: missing binaries, broken
subprocess wiring, IPC dispatch failures, extension activation order,
and theme parse errors.
Running
make run-testmode # all categories, 60s timeout
make run-testmode TESTMODE_CATEGORY=toolchain
make run-testmode TESTMODE_CATEGORY=ipc
make run-testmode TESTMODE_CATEGORY=extensions
make run-testmode TESTMODE_CATEGORY=terminal
make run-testmode TESTMODE_TIMEOUT=120 # longer timeout for slow builds
Results go to stdout and /tmp/clide-testmode.log. The last line
of testmode output is machine-readable:
[testmode:json] {"passed":33,"failed":0,"total":33,"failures":[]}
Exit code is non-zero when any test fails. The Makefile verifies
"failed":0 in the log via grep -q.
When to run which category
| Changed area | Category | Why |
|---|---|---|
| Toolchain, PATH, dugite, ptyc, shell | toolchain |
Binary resolution + exec |
| IPC envelope, dispatcher, schema | ipc |
Round-trip + error contract |
| Extension manifest, activate, contributions | extensions |
Register + activate lifecycle |
| Theme YAML, loader, palette | extensions |
Theme parse is in this category |
| PTY spawning, terminal pane, xterm wiring | terminal |
Real PTY spawn + I/O round-trip |
| Platform config (CMakeLists, pbxproj, Makefile) | all |
Full rebuild validates everything |
| Any doubt | all |
~30s, cheap insurance |
Interpreting output
[testmode] exec | ... | OK— subprocess ran, exit 0 or 1.[testmode] PASS | ...— assertion passed (IPC / extension tests).[testmode] FAIL | ...— assertion failed. The output column says why.[testmode] exec | ... | EXCEPTION— binary not found or not executable.[testmode] exec | ... | TIMEOUT— subprocess hung (5s limit).
If the app never prints [testmode] lines, the testmode gate in
main.dart didn't fire — check that CLIDE_TESTMODE is set to a
non-empty string (not a bare bool).
Adding tests
All test logic lives in lib/test_app.dart. Pattern:
// In the appropriate _run*Tests method:
await _testExec('label', binary, ['args'], workDir);
// or
_addResult('label', boolCondition, 'detail string');
New categories: add a runFoo bool from the category string,
gate a new _runFooTests method, and add the category name to
the Makefile help comment and this skill's table above.
Extension tests must include transitive dependencies — e.g.
GitExtension requires DiffExtension to activate first.
Source files
lib/test_app.dart— all test logic and UIlib/main.dart:54— testmode gate (String.fromEnvironment)Makefile:42–56—run-testmodetarget with category variable