route testmode output through the kernel logger

`lib/test_app.dart` printed [testmode] / [testmode:json] lines via
the bare `print` builtin, which tripped the `avoid_print` analyze
rule 38 times — by far the loudest source of analyze noise in the
tree.

Routes everything through a `Logger()` instance held on
`_ClideTestAppState`, with a small `_say(msg)` helper for
human-readable lines and a separate `'testmode:json'` source for
the structured summary the harness greps. The default Logger sink
is stderr; `make run-testmode` already pipes `2>&1`, so the
existing `grep -q '"failed":0'` check is unaffected.

Also drops the now-redundant kernel sub-imports (events/bus,
events/types, log, toolchain) — `kernel/kernel.dart` re-exports
them, and the analyzer flagged the doubles as unnecessary.

Project analyze: 107 → 65 issues. test_app.dart is now clean
(0 issues, was 42).

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-06 23:42:34 +02:00
co-authored by Claude
parent 257a333904
commit 0f2f5180ee
2 changed files with 163 additions and 154 deletions
+107 -107
View File
@@ -1,5 +1,5 @@
{
"exported_at": "2026-05-06T21:37:13Z",
"exported_at": "2026-05-06T21:42:34Z",
"decisions": [
{
"id": "D-1",
@@ -9,7 +9,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-3",
@@ -19,7 +19,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-4",
@@ -29,7 +29,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-5",
@@ -39,7 +39,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-6",
@@ -49,7 +49,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-7",
@@ -59,7 +59,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-8",
@@ -69,7 +69,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-9",
@@ -79,7 +79,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-10",
@@ -89,7 +89,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-11",
@@ -99,7 +99,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-12",
@@ -109,7 +109,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-13",
@@ -119,7 +119,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-14",
@@ -129,7 +129,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-15",
@@ -139,7 +139,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-16",
@@ -149,7 +149,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-17",
@@ -159,7 +159,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-18",
@@ -169,7 +169,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-19",
@@ -179,7 +179,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-20",
@@ -189,7 +189,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/accessibility.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-21",
@@ -199,7 +199,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/accessibility.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-22",
@@ -209,7 +209,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/accessibility.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-23",
@@ -219,7 +219,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-24",
@@ -229,7 +229,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-25",
@@ -239,7 +239,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-26",
@@ -249,7 +249,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-27",
@@ -259,7 +259,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-28",
@@ -269,7 +269,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-29",
@@ -279,7 +279,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-30",
@@ -289,7 +289,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-31",
@@ -299,7 +299,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-32",
@@ -309,7 +309,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-33",
@@ -319,7 +319,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-34",
@@ -329,7 +329,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-35",
@@ -339,7 +339,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-36",
@@ -349,7 +349,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-37",
@@ -359,7 +359,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-38",
@@ -369,7 +369,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-39",
@@ -379,7 +379,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-40",
@@ -389,7 +389,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-41",
@@ -399,7 +399,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-42",
@@ -409,7 +409,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-43",
@@ -419,7 +419,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-44",
@@ -429,7 +429,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-45",
@@ -439,7 +439,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-46",
@@ -449,7 +449,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/extensions.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-47",
@@ -459,7 +459,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-48",
@@ -469,7 +469,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-49",
@@ -479,7 +479,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-50",
@@ -489,7 +489,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-51",
@@ -499,7 +499,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-52",
@@ -509,7 +509,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-53",
@@ -519,7 +519,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-54",
@@ -529,7 +529,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-55",
@@ -539,7 +539,7 @@
"status": "active",
"date": "2026-04-23",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-56",
@@ -549,7 +549,7 @@
"status": "active",
"date": "2026-04-23",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-57",
@@ -559,7 +559,7 @@
"status": "active",
"date": "2026-04-23",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-58",
@@ -569,7 +569,7 @@
"status": "active",
"date": "2026-04-23",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-59",
@@ -579,7 +579,7 @@
"status": "active",
"date": "2026-04-25",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-60",
@@ -589,7 +589,7 @@
"status": "active",
"date": "2026-04-26",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-61",
@@ -599,7 +599,7 @@
"status": "active",
"date": "2026-04-26",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-62",
@@ -609,7 +609,7 @@
"status": "active",
"date": "2026-04-26",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-63",
@@ -619,7 +619,7 @@
"status": "active",
"date": "2026-04-26",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-64",
@@ -629,7 +629,7 @@
"status": "active",
"date": "2026-05-03",
"file_path": "decisions/architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-65",
@@ -639,7 +639,7 @@
"status": "active",
"date": "2026-04-26",
"file_path": "decisions/tooling.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "D-66",
@@ -649,7 +649,7 @@
"status": "active",
"date": "2026-05-06",
"file_path": "decisions/testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-1",
@@ -658,7 +658,7 @@
"title": "Authorisation granularity on the IPC socket",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-2",
@@ -667,7 +667,7 @@
"title": "Back-pressure on event streams",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-3",
@@ -676,7 +676,7 @@
"title": "Event persistence + audit/undo",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-4",
@@ -685,7 +685,7 @@
"title": "`.canvas` schema compatibility with Obsidian",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-5",
@@ -694,7 +694,7 @@
"title": "IPC wire-format stability + `schema_version:`",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-6",
@@ -703,7 +703,7 @@
"title": "Window chrome — native frame vs frameless custom",
"status": "resolved",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-7",
@@ -712,7 +712,7 @@
"title": "macOS app bundle signing / notarisation",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-8",
@@ -721,7 +721,7 @@
"title": "Extension API shape — widgets, subcommands, both?",
"status": "open",
"file_path": "decisions/questions-extensions.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-9",
@@ -730,7 +730,7 @@
"title": "Lua runtime vendoring",
"status": "open",
"file_path": "decisions/questions-extensions.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-10",
@@ -739,7 +739,7 @@
"title": "Extension manifest `schema_version:`",
"status": "open",
"file_path": "decisions/questions-extensions.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-11",
@@ -748,7 +748,7 @@
"title": "Coverage gates — hard thresholds vs soft reporting",
"status": "open",
"file_path": "decisions/questions-testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-12",
@@ -757,7 +757,7 @@
"title": "Screen-reader automation (axe-core via Playwright)",
"status": "open",
"file_path": "decisions/questions-testing.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-13",
@@ -766,7 +766,7 @@
"title": "Web production-mode a11y",
"status": "open",
"file_path": "decisions/questions-accessibility.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-14",
@@ -775,7 +775,7 @@
"title": "i18n plurals / gender / date-format tooling",
"status": "open",
"file_path": "decisions/questions-accessibility.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-15",
@@ -784,7 +784,7 @@
"title": "Editor tab — full LSP vs tree-sitter-only highlight",
"status": "open",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-16",
@@ -793,7 +793,7 @@
"title": "`tree-sitter-dart` grammar maintenance",
"status": "open",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-17",
@@ -802,7 +802,7 @@
"title": "Icon set growth",
"status": "open",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-18",
@@ -811,7 +811,7 @@
"title": "Theme hot-reload in release builds",
"status": "open",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-19",
@@ -820,7 +820,7 @@
"title": "(withdrawn)",
"status": "resolved",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-20",
@@ -829,7 +829,7 @@
"title": "Kernel DB service — namespaced SQL access?",
"status": "open",
"file_path": "decisions/questions-process.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-21",
@@ -838,7 +838,7 @@
"title": "Pql absorbs planning vs keeps separate",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-22",
@@ -847,7 +847,7 @@
"title": "Ticket persistence strategy",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-23",
@@ -856,7 +856,7 @@
"title": "SSH-remote development — run clide against a remote workspace",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-25",
@@ -865,7 +865,7 @@
"title": "Body text face — mono everywhere vs Josefin Sans UI + mono code",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-26",
@@ -874,7 +874,7 @@
"title": "Small screen layout (\u003c 1000px)",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-27",
@@ -883,7 +883,7 @@
"title": "Two-editor split",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-28",
@@ -892,7 +892,7 @@
"title": "Terminal strip scope — shell only or logs/errors/tests",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-29",
@@ -901,7 +901,7 @@
"title": "Branch picker location",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-30",
@@ -910,7 +910,7 @@
"title": "Focus behavior when editor is dirty and viewer is peeked",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "Q-31",
@@ -919,7 +919,7 @@
"title": "XWayland fallback for frameless — proper Wayland protocol needed",
"status": "open",
"file_path": "decisions/questions-architecture.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-2",
@@ -929,7 +929,7 @@
"status": "active",
"date": "2026-04-20",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-3",
@@ -939,7 +939,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-4",
@@ -949,7 +949,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-5",
@@ -959,7 +959,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-6",
@@ -969,7 +969,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-7",
@@ -979,7 +979,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-8",
@@ -989,7 +989,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-9",
@@ -999,7 +999,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-10",
@@ -1009,7 +1009,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-11",
@@ -1019,7 +1019,7 @@
"status": "active",
"date": "2026-04-21",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
},
{
"id": "R-12",
@@ -1029,7 +1029,7 @@
"status": "active",
"date": "2026-04-22",
"file_path": "decisions/rejected.md",
"synced_at": "2026-05-06 21:36:16"
"synced_at": "2026-05-06 21:41:36"
}
],
"decision_refs": [
+56 -47
View File
@@ -29,16 +29,12 @@ import 'dart:ffi' as ffi;
import 'package:ffi/ffi.dart' as pkg_ffi;
import 'kernel/kernel.dart';
import 'src/pty/ffi/libc.dart' as libc;
import 'kernel/src/events/bus.dart';
import 'kernel/src/events/types.dart';
import 'kernel/src/ipc/in_process.dart';
import 'kernel/src/log.dart';
import 'src/daemon/pane_commands.dart';
import 'src/ipc/envelope.dart';
import 'src/panes/event_sink.dart';
import 'src/panes/registry.dart';
import 'src/pty/session.dart';
import 'kernel/src/toolchain.dart';
import 'src/daemon/dispatcher.dart';
import 'src/pty/env.dart' show expandedPath;
@@ -53,14 +49,21 @@ class ClideTestApp extends StatefulWidget {
class _ClideTestAppState extends State<ClideTestApp> {
final List<_TestResult> _results = [];
// Wired through the kernel logger so testmode output goes through
// the same plumbing as production code. Sink stays default (stderr);
// `make run-testmode` pipes 2>&1 so the harness still grep-checks
// the structured `[testmode:json]` line.
final _logger = Logger();
bool _done = false;
void _say(String message) => _logger.info('testmode', message);
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) => _runTests());
Timer(_timeout, () {
print('[testmode] timeout reached — exiting');
_say('timeout reached — exiting');
exit(1);
});
}
@@ -76,12 +79,12 @@ class _ClideTestAppState extends State<ClideTestApp> {
final runExtensions = runAll || category == 'extensions';
final runTerminal = runAll || category == 'terminal';
print('[testmode] === ClideTestApp starting ===');
print('[testmode] workspace=$workDir');
print('[testmode] cwd=${Directory.current.path}');
print('[testmode] category=${runAll ? "all" : category}');
print('[testmode] expandedPath=$expandedPath');
print('[testmode]');
_say('=== ClideTestApp starting ===');
_say('workspace=$workDir');
_say('cwd=${Directory.current.path}');
_say('category=${runAll ? "all" : category}');
_say('expandedPath=$expandedPath');
_say('');
final tc = Toolchain();
tc.applyResolved(Toolchain.resolvePaths(workspaceRoot: workDir));
@@ -95,13 +98,19 @@ class _ClideTestAppState extends State<ClideTestApp> {
final failed = _results.where((r) => !r.ok).length;
final failedNames = _results.where((r) => !r.ok).map((r) => r.name).toList();
print('[testmode] === done ($passed passed, $failed failed, ${_results.length} total) ===');
print('[testmode:json] ${jsonEncode({
'passed': passed,
'failed': failed,
'total': _results.length,
'failures': failedNames,
})}');
_say('=== done ($passed passed, $failed failed, ${_results.length} total) ===');
// Emitted under a distinct source so the harness's grep
// (`make run-testmode` checks for `"failed":0`) keeps working
// without depending on the human-readable lines above.
_logger.info(
'testmode:json',
jsonEncode({
'passed': passed,
'failed': failed,
'total': _results.length,
'failures': failedNames,
}),
);
setState(() => _done = true);
await Future<void>.delayed(const Duration(seconds: 2));
@@ -111,47 +120,47 @@ class _ClideTestAppState extends State<ClideTestApp> {
// -- toolchain category ---------------------------------------------------
Future<void> _runToolchainTests(Toolchain tc, String workDir) async {
print('[testmode] --- toolchain ---');
_say('--- toolchain ---');
_log('toolchain.git', tc.git);
_log('toolchain.pql', tc.pql);
_log('toolchain.tmux', tc.tmux);
_log('toolchain.ptyc', tc.ptyc);
_log('toolchain.shell', tc.shell);
_log('toolchain.missing', tc.missing.isEmpty ? 'none' : tc.missing.join(', '));
print('[testmode]');
_say('');
await _testExists('git', tc.git);
await _testExists('pql', tc.pql);
await _testExists('tmux', tc.tmux);
await _testExists('ptyc', tc.ptyc);
await _testExists('shell', tc.shell);
print('[testmode]');
_say('');
await _testExec('git --version', tc.git, ['--version'], workDir);
await _testExec('pql --version', tc.pql, ['--version'], workDir);
await _testExec('tmux -V', tc.tmux, ['-V'], workDir);
await _testExec('ptyc (no args)', tc.ptyc, [], workDir);
await _testExec('shell --version', tc.shell, ['--version'], workDir);
print('[testmode]');
_say('');
// Shell passthrough — use the resolved shell, not a hardcoded path
await _testExec('shell -c git', tc.shell, ['-c', '${tc.git} --version'], workDir);
await _testExec('shell -c pql', tc.shell, ['-c', '${tc.pql} --version'], workDir);
await _testExec('shell -c tmux', tc.shell, ['-c', '${tc.tmux} -V'], workDir);
await _testExec('shell -c git (bare)', tc.shell, ['-c', 'git --version'], workDir);
print('[testmode]');
_say('');
// git with env (dugite needs GIT_EXEC_PATH)
await _testExec('git --version (env)', tc.git, ['--version'], workDir, env: tc.gitEnv);
await _testExec('git status (env)', tc.git, ['status', '--porcelain'], workDir, env: tc.gitEnv);
await _testExec('git rev-parse (env)', tc.git, ['rev-parse', '--show-toplevel'], workDir, env: tc.gitEnv);
print('[testmode]');
_say('');
_log('gitEnv', '${tc.gitEnv}');
print('[testmode]');
_say('');
// Boot sequence simulation tests
print('[testmode] --- boot sequence ---');
_say('--- boot sequence ---');
await _testAsync('compute(resolveToolchainPaths)', () async {
final paths = await compute(resolveToolchainPaths, workDir);
@@ -193,13 +202,13 @@ class _ClideTestAppState extends State<ClideTestApp> {
return 'exit=$exitCode stdout=${stdout.trim().split('\n').first}';
});
print('[testmode]');
_say('');
}
// -- ipc category ---------------------------------------------------------
Future<void> _runIpcTests(String workDir) async {
print('[testmode] --- ipc ---');
_say('--- ipc ---');
final dispatcher = DaemonDispatcher();
// ping round-trip
@@ -236,13 +245,13 @@ class _ClideTestAppState extends State<ClideTestApp> {
final isReq = decoded is IpcRequest && decoded.cmd == 'ping' && decoded.id == 'test-ping-1';
_addResult('ipc encode/decode', isReq, isReq ? 'round-trip ok' : 'mismatch');
print('[testmode]');
_say('');
}
// -- extensions category --------------------------------------------------
Future<void> _runExtensionTests(String workDir, Toolchain tc) async {
print('[testmode] --- extensions ---');
_say('--- extensions ---');
// Theme loading
try {
@@ -319,13 +328,13 @@ class _ClideTestAppState extends State<ClideTestApp> {
_addResult('ext:boot', false, '$e');
}
print('[testmode]');
_say('');
}
// -- terminal category ----------------------------------------------------
Future<void> _runTerminalTests(Toolchain tc, String workDir) async {
print('[testmode] --- terminal ---');
_say('--- terminal ---');
// Test PTY via InProcessClient — same path as the real app.
await _testAsync('pane.spawn via IPC', () async {
@@ -343,7 +352,7 @@ class _ClideTestAppState extends State<ClideTestApp> {
'argv': [tc.shell],
'kind': 'terminal',
});
print('[testmode] spawn: ok=${spawnResp.ok} ${spawnResp.ok ? spawnResp.data : spawnResp.error?.message}');
_say(' spawn: ok=${spawnResp.ok} ${spawnResp.ok ? spawnResp.data : spawnResp.error?.message}');
if (!spawnResp.ok) {
return 'spawn failed: ${spawnResp.error?.message}';
}
@@ -360,9 +369,9 @@ class _ClideTestAppState extends State<ClideTestApp> {
}
});
await Future.delayed(const Duration(seconds: 3));
print('[testmode] events=$eventCount output_parts=${outputParts.length} bytes=${outputParts.join().length}');
_say(' events=$eventCount output_parts=${outputParts.length} bytes=${outputParts.join().length}');
if (outputParts.isNotEmpty) {
print('[testmode] first output: ${outputParts.first.substring(0, outputParts.first.length.clamp(0, 80))}');
_say(' first output: ${outputParts.first.substring(0, outputParts.first.length.clamp(0, 80))}');
}
await sub.cancel();
paneRegistry.shutdown();
@@ -393,22 +402,22 @@ class _ClideTestAppState extends State<ClideTestApp> {
cwd: workDir,
ptycPath: tc.ptyc,
);
print('[testmode] session pid=${session.pid} masterFd exists');
_say(' session pid=${session.pid} masterFd exists');
final bytes = <int>[];
final done = Completer<void>();
session.output.listen(
(chunk) {
bytes.addAll(chunk);
print('[testmode] got ${chunk.length} bytes');
_say(' got ${chunk.length} bytes');
},
onDone: () {
print('[testmode] stream done');
_say(' stream done');
if (!done.isCompleted) done.complete();
},
onError: (e) => print('[testmode] stream error: $e'),
onError: (e) => _say(' stream error: $e'),
);
await done.future.timeout(const Duration(seconds: 5), onTimeout: () {
print('[testmode] timeout waiting for output, got ${bytes.length} bytes so far');
_say(' timeout waiting for output, got ${bytes.length} bytes so far');
});
await session.close();
final output = utf8.decode(bytes, allowMalformed: true);
@@ -473,25 +482,25 @@ class _ClideTestAppState extends State<ClideTestApp> {
});
} // end !Platform.isMacOS
print('[testmode]');
_say('');
}
// -- helpers --------------------------------------------------------------
void _log(String key, String value) {
print('[testmode] $key = $value');
_say('$key = $value');
}
void _addResult(String name, bool ok, String output) {
final r = _TestResult(name: name, detail: '', ok: ok, output: output);
print('[testmode] ${ok ? "PASS" : "FAIL"} | $name | $output');
_say('${ok ? "PASS" : "FAIL"} | $name | $output');
setState(() => _results.add(r));
}
Future<void> _testExists(String name, String path) async {
final exists = File(path).existsSync();
final r = _TestResult(name: '$name exists', detail: path, ok: exists, output: exists ? 'yes' : 'NO');
print('[testmode] exists | $name | path=$path | ${exists ? "yes" : "NO"}');
_say('exists | $name | path=$path | ${exists ? "yes" : "NO"}');
setState(() => _results.add(r));
}
@@ -514,15 +523,15 @@ class _ClideTestAppState extends State<ClideTestApp> {
final firstLine = stdout.isNotEmpty ? stdout.split('\n').first : (stderr.isNotEmpty ? stderr.split('\n').first : '(empty)');
final ok = r.exitCode == 0 || r.exitCode == 1;
final result = _TestResult(name: label, detail: '$bin ${args.join(" ")}', ok: ok, output: 'exit=${r.exitCode} $firstLine');
print('[testmode] exec | $label | exit=${r.exitCode} | ${ok ? "OK" : "FAIL"} | $firstLine');
_say('exec | $label | exit=${r.exitCode} | ${ok ? "OK" : "FAIL"} | $firstLine');
setState(() => _results.add(result));
} on ProcessException catch (e) {
final result = _TestResult(name: label, detail: '$bin ${args.join(" ")}', ok: false, output: 'ProcessException: ${e.message}');
print('[testmode] exec | $label | EXCEPTION | ${e.message}');
_say('exec | $label | EXCEPTION | ${e.message}');
setState(() => _results.add(result));
} on TimeoutException {
final result = _TestResult(name: label, detail: '$bin ${args.join(" ")}', ok: false, output: 'TIMEOUT (5s)');
print('[testmode] exec | $label | TIMEOUT');
_say('exec | $label | TIMEOUT');
setState(() => _results.add(result));
}
}