memwatch: quiet bounded test summary off a terminal; bounded analyze wrapper

run.sh now records flutter's JSON results beside the log and prints a
summary from tool/memwatch/summary.dart: one verdict line (pass/fail/skip
counts, peak MB, duration, exit status), only failing tests with their
error and app stack frames (framework frames dropped, per-test and total
caps, tail of printed output), the tests still running when killed, and
the log and JSON paths. Quiet is the default when stdout is not a
terminal; MEMWATCH_OUTPUT=full also prints the whole log. The watchdog
loop and exit status are unchanged.

tool/analyze.sh bounds flutter analyze to a verdict line and the first
40 issues. Tests: test/tool/memwatch/summary_test.dart and the
end-to-end tool/memwatch/quiet_test.sh over fixture suites.
This commit is contained in:
2026-11-04 13:10:21 +00:00
parent fa6c0864db
commit 941d2a7148
9 changed files with 513 additions and 9 deletions
+1 -1
View File
@@ -18,7 +18,7 @@
- Tests mirror directories under `test/`; tests use local fixtures/fake gateways, never mutate production. Put item evidence in `notes/<item>.md`, not shared queue.
## Tools and verification
Flutter: `/Users/alan/development/flutter/bin/flutter`; Dart beside it. Run pub get per worktree; never upgrade shared SDK. Run tests only through the memory watchdog, from `app/`: `tool/memwatch/full.sh test` (or a focused `tool/memwatch/full.sh test/<area>` while editing). Never run a bare `flutter test`, because a runaway test has crashed the Mac. `tool/memwatch/install.sh` restores the legacy `/tmp/memwatch` shims. Use `flutter analyze` and `flutter build web` for integrated acceptance. No Go/legacy client checks needed for app-only changes.
Flutter: `/Users/alan/development/flutter/bin/flutter`; Dart beside it. Run pub get per worktree; never upgrade shared SDK. Run tests only through the memory watchdog, from `app/`: `tool/memwatch/full.sh test` (or a focused `tool/memwatch/full.sh test/<area>` while editing). Never run a bare `flutter test`, because a runaway test has crashed the Mac. Off a terminal it is quiet: one verdict line (counts, peak MB, duration, exit), only failing tests with bounded errors, and the full log path; read that log with grep or a line range rather than whole, or set `MEMWATCH_OUTPUT=full`. `tool/memwatch/quiet_test.sh` checks this output. `tool/memwatch/install.sh` restores the legacy `/tmp/memwatch` shims. Use `tool/analyze.sh` (bounded `flutter analyze`) and `flutter build web` for integrated acceptance. No Go/legacy client checks needed for app-only changes.
Rendered changes require real browser interaction/captures; widget tests alone are not browser evidence. Use isolated loopback servers and OS-assigned ports. Browser automation may use Chrome DevTools, with independent scripts under `app/tool/`; do not modify legacy browser drivers. Never disable authentication on exposed services.
UI capture and review: use `tool/capture/` (see its README). It is one generic Chrome DevTools kit over the full-app fixture `tool/search_selection_probe_entry.dart`. It opens any route at a given size, platform and theme, clicks by semantics label, identifier or point, types text, takes screenshots and films transitions. If a feature's legacy `tool/*_probe.mjs` driver is stale (missing labels, outdated status text), capture with this kit; a stale driver is not a reason to report blocked. Inspect every PNG you cite.
Keep commits referenced; do not discard unrelated work or delete branches. Deploy only when requested by the user; preserve existing public URLs unless a cutover is part of that request. Land candidates per selected pipeline; manager verifies actual ancestry and records source, checks, landing and deployment separately.