Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

test: stress mixed harness graphs and verify native viewer shortcuts

Dee5ecc8994db0f
diff --git a/.gitignore b/.gitignore
index f6feeca39..b5c50db82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@ node_modules/
.vite/
dist/
.tsbuildinfo
+cli/coverage/
.DS_Store
# IDE state. workspace.xml records local paths, run configs and sometimes datasource
# credentials — none of it belongs in a public repo.
diff --git a/cli/src/config/envIsolation.spec.ts b/cli/src/config/envIsolation.spec.ts
index 36f4d5b3f..176e656a3 100644
--- a/cli/src/config/envIsolation.spec.ts
+++ b/cli/src/config/envIsolation.spec.ts
@@ -11,6 +11,7 @@ import { homedir } from 'node:os'
import { join } from 'node:path'
import { describe, expect, it } from 'vitest'
import { env } from './env.js'
+import { AUTH_DIR } from '../lib/authSession.js'
const productRoot = join(homedir(), '.harness')
@@ -22,4 +23,8 @@ describe('test environment isolation', () => {
it('keeps the runtime dir off the developer\'s ~/.harness, so no real managed grid or node outranks a fake on PATH', () => {
expect(env.ADAPTER_RUNTIME_DIR.startsWith(productRoot)).toBe(false)
})
+ it('keeps account reads and refreshes in the test-owned auth directory', () => {
+ expect(AUTH_DIR).toBe(join(env.ADAPTER_DATA_DIR, 'auth'))
+ expect(AUTH_DIR.startsWith(productRoot)).toBe(false)
+ })
})
diff --git a/cli/src/orchestrator/service.spec.ts b/cli/src/orchestrator/service.spec.ts
index 21e7e3c38..d7c743c26 100644
--- a/cli/src/orchestrator/service.spec.ts
+++ b/cli/src/orchestrator/service.spec.ts
@@ -453,4 +453,34 @@ describe('durable orchestrator lifecycle', () => {
await vi.waitFor(() => expect(service.snapshot(other).state).toBe('paused'))
expect(service.snapshot(other).error).toContain('unknown error')
})
+ it('finishes a 64-task mixed-engine graph with bounded parallelism and verified fan-in', async () => {
+ deps.supportsEngine = engine => ['claude', 'codex', 'opencode'].includes(engine)
+ deps.catalog = () => ['cad', 'blender', 'video', 'research'].map((name, i) => ({
+ id: `test/${name}`, name, description: `Synthetic ${name}`, engine: ['codex', 'claude', 'opencode'][i % 3], viewer: i !== 3,
+ }))
+ await service.start({ id, engine: 'claude', prompt: 'Stress-test a creative fan-out/fan-in project', parallelism: 6 }); await active()
+ const graph = Array.from({ length: 64 }, (_, i) => task(`work-${i}`, i < 6 ? [] : [...new Set([`work-${i - 6}`, `work-${Math.floor((i - 6) / 2)}`])], `test/${['cad', 'blender', 'video', 'research'][i % 4]}`))
+ service.plan(id, graph.slice(0, 32)); service.plan(id, graph.slice(32))
+ expect(() => service.plan(id, [task('one-too-many')])).toThrow(/64 tasks/)
+ let finished = 0, checkedInputs = 0
+ while (finished < 64) {
+ await vi.waitFor(() => expect(tasks().some(t => t.state === 'running')).toBe(true))
+ const batch = tasks().filter(t => t.state === 'running')
+ expect(tasks().filter(t => ['running', 'launching'].includes(t.state)).length).toBeLessThanOrEqual(6)
+ for (const current of batch) {
+ for (const parent of current.dependsOn) {
+ expect(readFileSync(join(current.cwd, 'inputs', parent, 'result.txt'), 'utf8')).toBe(`Verified ${parent}`)
+ checkedInputs++
+ }
+ writeFileSync(join(current.cwd, 'result.txt'), `Verified ${current.id}`)
+ await service.finish(id, current.id, current.attempt, `Checked ${current.dependsOn.length} upstream contracts`, ['result.txt'])
+ finished++
+ }
+ }
+ expect(checkedInputs).toBeGreaterThan(100)
+ expect(new Set(launches.slice(1).map(l => l.engine))).toEqual(new Set(['claude', 'codex', 'opencode']))
+ expect(launches).toHaveLength(65)
+ service.complete(id, 'All 64 task results and pinned input contracts verified')
+ expect(service.snapshot(id).state).toBe('completed')
+ }, 30_000)
})
diff --git a/desktop/test/orchestrator_controls_test.dart b/desktop/test/orchestrator_controls_test.dart
index e8c85b703..c0f25facd 100644
--- a/desktop/test/orchestrator_controls_test.dart
+++ b/desktop/test/orchestrator_controls_test.dart
@@ -446,10 +446,12 @@ void main() {
id: projectId,
request: (p) async {
requests.add(p);
- if (p['action'] == 'cancel')
+ if (p['action'] == 'cancel') {
current = {...current, 'state': 'cancelled', 'revision': 2};
- if (p['action'] == 'resume')
+ }
+ if (p['action'] == 'resume') {
current = {...current, 'state': 'active', 'revision': 3};
+ }
return {'project': current};
},
);
diff --git a/desktop/tool/swarm_titlebar_checks.swift b/desktop/tool/swarm_titlebar_checks.swift
index ef83977e5..8e9d702c7 100644
--- a/desktop/tool/swarm_titlebar_checks.swift
+++ b/desktop/tool/swarm_titlebar_checks.swift
@@ -535,6 +535,69 @@ private extension SwarmTitlebar {
try checkTitlebar(!main.defersToInput(event("a", 0, .command)), "Standard select-all retains native text-editing dispatch")
}
+ func checkViewerShortcutRuntime(_ defaults: HarnessNativeKeymap, messenger: TitlebarCheckMessenger) throws {
+ guard let window else { throw TitlebarCheckFailure(message: "Native viewer test window exists") }
+ let originalMenu = NSApp.mainMenu
+ let originalKeymap = keymap
+ let originalContext = flutterKeyContext
+ let originalEnabled = actionsEnabled
+ NSApp.mainMenu = NSMenu(title: "Isolated viewer shortcut test")
+ defer {
+ keymap = originalKeymap
+ flutterKeyContext = originalContext
+ actionsEnabled = originalEnabled
+ NSApp.mainMenu = originalMenu
+ }
+ actionsEnabled = true
+ setKeymap(defaults)
+ let main = NSApp.mainMenu as! HarnessKeymapMenu
+ func event(_ text: String, _ code: UInt16, _ flags: NSEvent.ModifierFlags = []) -> NSEvent {
+ NSEvent.keyEvent(with: .keyDown, location: .zero, modifierFlags: flags,
+ timestamp: 0, windowNumber: window.windowNumber, context: nil, characters: text,
+ charactersIgnoringModifiers: text, isARepeat: false, keyCode: code)!
+ }
+ // Exercise the actual native responder walk, not just the keymap lookup.
+ // No navigation, windows shown, app state, or external services are involved.
+ let web = WKWebView(frame: NSRect(x: 0, y: 0, width: 320, height: 200))
+ let webInput = TitlebarCheckInputView(frame: web.bounds)
+ web.addSubview(webInput)
+ window.contentViewController!.view.addSubview(web)
+ defer { web.removeFromSuperview(); window.makeFirstResponder(window.contentInput) }
+ try checkTitlebar(window.makeFirstResponder(webInput), "A native viewer descendant can own test focus")
+ flutterKeyContext = "workspace"
+ setKeymap(defaults)
+ let beforeViewer = messenger.calls.count
+ try checkTitlebar(main.performKeyEquivalent(with: event("p", 35, .command)),
+ "Command-P is consumed by the focused native viewer bridge")
+ try checkTitlebar(messenger.calls.count == beforeViewer + 1 && messenger.calls.last?.method == "keymapCommand" &&
+ (messenger.calls.last?.arguments as? [String: String])?["command"] == "project.orchestrate",
+ "The native viewer dispatches exactly one Orchestrator command to Flutter")
+ let repeated = NSEvent.keyEvent(with: .keyDown, location: .zero, modifierFlags: .command,
+ timestamp: 0, windowNumber: window.windowNumber, context: nil, characters: "p",
+ charactersIgnoringModifiers: "p", isARepeat: true, keyCode: 35)!
+ try checkTitlebar(main.performKeyEquivalent(with: repeated) && messenger.calls.count == beforeViewer + 1,
+ "Holding Command-P never launches repeated projects")
+ _ = main.performKeyEquivalent(with: event("b", 11, .command))
+ try checkTitlebar(messenger.calls.count == beforeViewer + 1, "The viewer bridge does not hijack Command-B")
+ actionsEnabled = false
+ _ = main.performKeyEquivalent(with: event("p", 35, .command))
+ try checkTitlebar(messenger.calls.count == beforeViewer + 1, "Modal state blocks native viewer launch dispatch")
+ actionsEnabled = true
+ let remapped = HarnessNativeKeymap(["version": 1, "contexts": [
+ "workspace": [["keys": ["cmd+x"], "command": "project.orchestrate", "hint": "⌘X", "repeatable": false]],
+ "terminal": [], "picker": [],
+ ]])!
+ setKeymap(remapped)
+ _ = main.performKeyEquivalent(with: event("p", 35, .command))
+ try checkTitlebar(messenger.calls.count == beforeViewer + 1, "The old viewer shortcut stays unbound after remapping")
+ try checkTitlebar(main.performKeyEquivalent(with: event("x", 7, .command)) && messenger.calls.count == beforeViewer + 2,
+ "The viewer bridge follows the actual remapped two-key shortcut")
+ setKeymap(HarnessNativeKeymap(["version": 1, "contexts": ["workspace": [], "terminal": [], "picker": []]])!)
+ _ = main.performKeyEquivalent(with: event("x", 7, .command))
+ try checkTitlebar(messenger.calls.count == beforeViewer + 2, "Unbinding disables viewer launch dispatch")
+ setKeymap(defaults)
+ }
+
func checkNativeContainer(messenger: TitlebarCheckMessenger) throws {
guard let window else { throw TitlebarCheckFailure(message: "Native test window exists") }
let main = NSMenu()
@@ -614,10 +677,10 @@ private extension SwarmTitlebar {
let create = agent.items.first(where: { $0.representedObject as? String == "new" })!
try checkTitlebar(validateMenuItem(create), "Native New Tab remains available without the retired tab capacity")
let machineRows: [[String: Any]] = [
- ["id": "office", "name": "iMac – Office", "status": "Online", "local": true, "agentCount": 2,
+ ["id": "office", "name": "iMac – Office", "status": "Online", "presence": "Online", "local": true, "agentCount": 2,
"agents": [["id": "one", "title": "App work", "engine": "codex", "canOpen": true],
["id": "two", "title": "Unavailable session", "canOpen": false]]],
- ["id": "home", "name": "iMac – Home", "status": "Offline", "local": false, "agentCount": 0],
+ ["id": "home", "name": "iMac – Home", "status": "Offline", "presence": "Offline", "local": false, "agentCount": 0],
]
_ = try messenger.receive("machinesState", arguments: ["machines": machineRows])
let machineMenu = main.item(withTitle: "Machines")!.submenu!
@@ -629,14 +692,14 @@ private extension SwarmTitlebar {
"Machines Manager opens through the Flutter command bridge")
let destinations = machineMenu.items.filter { $0.action == #selector(machineAction(_:)) }
try checkTitlebar(machineMenu.minimumWidth == 0 && machineMenu.size.width < 432 &&
- destinations.first?.attributedTitle?.string.hasSuffix("\t2 agents") == true,
+ destinations.first?.attributedTitle?.string.hasSuffix("\t2 harnesses") == true,
"Machines gives labels twenty percent more room with aligned counts")
try checkTitlebar(destinations.map { $0.representedObject as? String } == ["office", "home"],
"Machines lists each linked computer as a destination")
try checkTitlebar(destinations[0].attributedTitle?.string.contains("Online") == true &&
destinations[1].attributedTitle?.string.contains("Offline") == true,
"Machine availability is visible before opening its agent search")
- try checkTitlebar(destinations[0].attributedTitle?.string.contains("2 agents") == true && destinations[1].attributedTitle?.string.contains("0 agents") == true,
+ try checkTitlebar(destinations[0].attributedTitle?.string.contains("2 harnesses") == true && destinations[1].attributedTitle?.string.contains("0 harnesses") == true,
"Machine labels include their cached agent count")
let agentItems = destinations[0].submenu!.items.filter { $0.action == #selector(machineAgentAction(_:)) }
try checkTitlebar(agentItems.map(\.title) == ["App work", "Unavailable session"] && agentItems[0].image != nil,
@@ -654,8 +717,8 @@ private extension SwarmTitlebar {
try checkTitlebar(messenger.calls.last?.method == "machineAgent" &&
(messenger.calls.last?.arguments as? [String: String]) == ["machineId": "office", "agentId": "one"],
"Agent selection sends both stable identities to Flutter")
- try checkTitlebar(destinations[1].submenu?.item(withTitle: "No agents yet")?.isEnabled == false &&
- destinations[1].submenu?.item(withTitle: "Find Agents…") != nil,
+ try checkTitlebar(destinations[1].submenu?.item(withTitle: "No harnesses yet")?.isEnabled == false &&
+ destinations[1].submenu?.item(withTitle: "Find Harnesses…") != nil,
"Empty machines explain the empty list and keep search available")
try checkTitlebar(machineMenu.items.compactMap { $0.representedObject as? String }.suffix(2) == ["linkMachine", "refreshMachines"],
"Machines exposes Link and Refresh after the computer list")
@@ -781,22 +844,25 @@ private extension SwarmTitlebar {
let models = main.item(withTitle: "Models")!.submenu!
try checkTitlebar(models.items.filter { !$0.isSeparatorItem }.map(\.title) == [
"Subscription", "Anthropic, aabbcc, 12% remaining", "OpenAI, Not signed in",
- "Local", "Talk to Model manager"
- ], "Models carries the two sections with something behind them, ending on the row that starts a model")
+ "Local", "Want to manage local models?", "Talk to Model manager"
+ ], "Models carries the two data sections and a captioned model-manager action")
try checkTitlebar(models.items.filter(\.isSeparatorItem).count == 1,
"One native separator, between the sections — the run row is a Local row, not a section")
for gone in ["API", "OpenRouter", "fal.ai", "Add Model"] {
try checkTitlebar(models.item(withTitle: gone) == nil,
"\(gone) is gone — it named nothing this app can reach or do")
}
- // The row that took Add Model's place is the one item in this menu that does something: the
- // last row of Local, in the same list as the models, enabled with nothing served, and dispatched
- // through the same guarded handler as Link Machine… so a modal still swallows it.
+ // The caption and button distinguish the manager action from the Local data rows.
+ // It remains enabled with nothing served and dispatches through the same guarded
+ // handler as Link Machine… so a modal still swallows it.
let runLocal = models.items.last!
+ let managerCaption = models.items[models.items.count - 2]
try checkTitlebar(runLocal.title == "Talk to Model manager",
"the last item in Models is the row that runs a local model")
- try checkTitlebar(!models.items[models.items.count - 2].isSeparatorItem,
- "the run row sits directly under the Local rows, with no separator of its own")
+ try checkTitlebar(managerCaption.title == "Want to manage local models?" &&
+ managerCaption.view is SwarmMenuCaptionView && !managerCaption.isEnabled &&
+ runLocal.view is SwarmMenuButtonView,
+ "the manager is a button under an inert caption, not another served model")
try checkTitlebar(runLocal.isEnabled && runLocal.submenu == nil,
"Talk to Model manager is enabled even when nothing is served, and opens no submenu")
try checkTitlebar(runLocal.target === self && runLocal.action == #selector(menuAction(_:))
@@ -857,9 +923,9 @@ private extension SwarmTitlebar {
try checkTitlebar(served.item(withTitle: "DeepSeek-V4-Flash") != nil,
"a model with no node named is listed on its own")
try checkTitlebar(served.items.last?.title == "Talk to Model manager"
- && !served.items[served.items.count - 2].isSeparatorItem
+ && served.items[served.items.count - 2].view is SwarmMenuCaptionView
&& served.items.filter(\.isSeparatorItem).count == 1,
- "the run row stays last in Local, directly under the served models, once models are served")
+ "the manager keeps its caption after the Local data rows once models are served")
// A local row is built by the same view as a subscription row, which is what makes the two
// sections read as one menu. A plain disabled NSMenuItem greys its whole title, so a served
@@ -1070,6 +1136,12 @@ do {
window.contentViewController = content
let messenger = TitlebarCheckMessenger()
let titlebar = SwarmTitlebar(window: window, messenger: messenger)
+ if let path = ProcessInfo.processInfo.environment["HARNESS_TITLEBAR_KEYMAP_FIXTURE"] {
+ let fixture = try JSONSerialization.jsonObject(with: Data(contentsOf: URL(fileURLWithPath: path))) as! [String: [String: Any]]
+ let before = titlebarCheckCount
+ try titlebar.checkViewerShortcutRuntime(HarnessNativeKeymap(fixture["defaults"]!)!, messenger: messenger)
+ print("Native Orchestrator viewer dispatch: \(titlebarCheckCount - before) checks passed with a focused WKWebView descendant; no window displayed.")
+ }
try titlebar.checkNativeContainer(messenger: messenger)
if let path = ProcessInfo.processInfo.environment["HARNESS_TITLEBAR_KEYMAP_FIXTURE"] {
let fixture = try JSONSerialization.jsonObject(with: Data(contentsOf: URL(fileURLWithPath: path))) as! [String: [String: Any]]
diff --git a/docs/orchestrator-combinations.md b/docs/orchestrator-combinations.md
index 2adc77333..43d012fe4 100644
--- a/docs/orchestrator-combinations.md
+++ b/docs/orchestrator-combinations.md
@@ -4,6 +4,8 @@ The director should build a graph, not pick one fixed pipeline. Each edge is an
Current local inventory: Solid, Autonomous Workshop, Blender, Copper, plus CAD Viewer and Model Viewer. The two viewers are viewer packages, not extra agents. Generic `engine:<director-engine>` tasks can research, write code, or validate data but do not automatically gain a domain viewer. Remotion and other unlisted packages require installation; the director never silently installs them.
+Inventory note: another session added Autonomous Grid after the live test began. It was not modified or included in this validation. The production director refreshes its catalog dynamically; this cookbook is an evidence snapshot, not a hard-coded allowlist.
+
## Recipes and readiness
| Project | Combination | Handoff and decisive check | Readiness |
diff --git a/docs/plans/2026-09-18-orchestrator-morning-report.md b/docs/plans/2026-09-18-orchestrator-morning-report.md
index e352411f6..89d61ee78 100644
--- a/docs/plans/2026-09-18-orchestrator-morning-report.md
+++ b/docs/plans/2026-09-18-orchestrator-morning-report.md
@@ -4,6 +4,8 @@ Work is isolated on `codex/orchestrator-workspace` in `/Users/d/code/autonomous-
## What you can try
+This is built and pushed, **not installed over your running app/daemon**. The normal debug app is at `desktop/build/macos/Build/Products/Debug/Harness.app`. Full production use needs this branch's desktop **and matching CLI**; an older daemon will ask for a CLI update. A deliberate switch can happen when you are ready, without disturbing the other worktrees overnight.
+
Press **⌘P** in this branch's desktop app to open the large project prompt. **⌘B still routes to a specific agent.** Choose a director, enter the project, and start. The right side stays one conversation; the left gains specialist viewers as the director delegates. Workers use ordinary background tmux agents. Inspect opens their normal agent tabs only when requested. Closing a project tab does not stop its work.
Projects support arbitrary dependency graphs, parallel independent work, fan-in, failed-dependency blocking, explicit retries in fresh folders, and new immutable revision tasks. Downstream workers receive read-only copies of exactly the completed artifact versions, with hashes. A live viewer or an idle agent does not count as success.
@@ -30,21 +32,28 @@ Measured coverage refers to the new orchestrator modules, **not the entire repos
| Scope | Result |
| --- | --- |
-| Six CLI orchestrator modules | 79 tests; **430/430 lines, 568/568 statements, 313/313 branches, 88/88 functions** |
+| Six CLI orchestrator modules | 80 tests; **430/430 lines, 568/568 statements, 313/313 branches, 88/88 functions** |
| Three desktop orchestrator modules | 20 tests; **529/529 executable lines** |
| Timing-sensitive install/terminal regressions | 68 tests passed after removing host-scheduling assumptions |
+| Complete desktop suite | **1,955 passed, 3 skipped, 0 failed** |
+| Complete CLI suite (serial run) | **3,011 passed, 52 skipped, 0 failed** |
+| Deterministic socket/tmux/viewer end-to-end | Passed again in 14 seconds |
+| Native three-WKWebView integration + normal macOS debug build | Both passed again |
+| Native keyboard mapping + complete AppKit titlebar checks | **101 mapping + 464 titlebar checks passed**, including 9 focused-viewer dispatch checks |
| Independent live geometry check | 12/12 passed |
Reproducible gates: `npm run test:orchestrator` in `cli/`; in `desktop/`, `flutter test --coverage test/orchestrator_test.dart test/orchestrator_controls_test.dart` followed by `node tool/check_orchestrator_coverage.mjs`. No feature coverage exclusions were added to achieve these results.
-- CLI: real loopback transport, all RPC actions, graph scheduling, immutable artifacts, delivery receipts, concurrent creation, scoped cancellation, restart recovery, storage failures, and fast-worker races.
+- CLI: real loopback transport, all RPC actions, graph scheduling, immutable artifacts, delivery receipts, concurrent creation, scoped cancellation, restart recovery, storage failures, and fast-worker races. A synthetic **64-task graph across three engines**, limited to six simultaneous workers, verified more than 100 real pinned-file handoffs; it uses fixtures, not 64 paid model agents.
- Desktop: launcher options, ⌘P/⌘B separation, recent projects, chat drafts/focus, reconnect, delayed replies, narrow layout, unsafe URL refusal, viewer zoom, explicit inspection, stop confirmation, and restoration.
- Deterministic end-to-end: actual desktop connection → daemon → dedicated tmux agents → real harness materialization → real HTTP viewers, with a parallel fan-out/join project, restart/reconnect, follow-up chat, and cross-project cancellation isolation.
-- Native macOS: debug build and a test with three real WKWebViews whose DOMs were read through JavaScript; chat draft/focus survived viewer updates. Native shortcut mapping checks also ran.
+- Native macOS: debug build and a test with three real WKWebViews whose DOMs were read through JavaScript; chat draft/focus survived viewer updates. Native shortcut tests exercised actual AppKit events from a focused WKWebView descendant, including ⌘P, repeat suppression, remapping/unbinding, modal blocking, and leaving ⌘B alone.
- Live: real model-generated two-harness project, real tmux sessions, real CAD toolchains and viewer servers, pinned artifact handoff, and independent geometry verification.
The live test uses a **bounded headless bridge**, not the production interactive engine TUI. Production input coordination has separate regression tests. Physical keyboard delivery through a focused live production viewer was not manually tested. The live test stopped its own tmux server and viewers and retained its files; other sessions were untouched.
+Broad-suite caveats are retained rather than hidden by the coverage percentage: an earlier concurrent CLI run had one relay-handshake fixture failure (`Unexpected server response: 200`), while its isolated 11-test suite and the final complete serial run passed. The broader AppKit titlebar checks exposed stale tab-capacity, terminology, presence, and model-manager caption expectations. Those fixtures were updated to match behavior already present on main, with no unrelated production-menu changes; all 464 native checks now pass. The 55 skipped tests across the two full suites remain skips, not claimed passes.
+
The Codex test needed command-network access to its loopback daemon. OpenAI Docs guided a **per-process** `sandbox_workspace_write.network_access=true` override while retaining workspace-write and approval review; no global settings were edited. See [official network-access documentation](https://learn.chatgpt.com/docs/agent-approvals-security#network-access).
## What remains worth improving
@@ -63,3 +72,23 @@ For creative project ideas, exact handoff contracts, and honest readiness labels
From this worktree's `cli/` directory, `HARNESS_ORCHESTRATOR_LIVE=1 HARNESS_ORCHESTRATOR_LIVE_SCENARIO=cad-fit node --import tsx scripts/orchestrator-live-project.ts` runs the account-backed test. It may consume model credits. Omitting the scenario selects the Claude/Blender test. Limits: six total agents, twelve headless turns, four turns per agent, twelve minutes; Claude print calls additionally have a $1 per-turn limit. Codex account usage is not dollar-capped by this adapter.
The deterministic peer and desktop tests do not use model accounts. Do not replace the running daemon just to inspect this report.
+
+Additional regression commands from this worktree:
+
+```sh
+# cli/
+npm run typecheck
+npm exec vitest run -- --maxWorkers=1 --testTimeout=30000
+
+# desktop/ — use the project's compatible Flutter SDK, not an older global one
+flutter test --no-pub --concurrency=2
+HARNESS_ORCHESTRATOR_CLI_ROOT=/Users/d/code/autonomous-harness-orchestrator/cli \
+ flutter test --no-pub test/orchestrator_local_e2e_test.dart
+FLUTTER_SWIFT_PACKAGE_MANAGER=true \
+ DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \
+ flutter test integration_test/orchestrator_native_viewers_test.dart -d macos --no-pub
+DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer \
+ bash tool/check_keymap_native.sh /private/tmp/harness-sdk-3.47.2-x64/flutter
+```
+
+The native viewer test builds a test-entrypoint app. Follow it with `FLUTTER_SWIFT_PACKAGE_MANAGER=true DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer flutter build macos --debug --no-pub` to leave a normal app build. That final production-entrypoint build was completed for this handoff.