@scotthuang/agent-knock-knock 0.13.17 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -0
- package/CONTRIBUTING.md +212 -0
- package/README.md +105 -166
- package/connectors/deepseek-harness/LICENSE +21 -0
- package/connectors/deepseek-harness/README.md +406 -0
- package/connectors/pi/LICENSE +21 -0
- package/connectors/pi/README.md +446 -0
- package/dist/src/backend-recovery-semantic.d.ts +16 -0
- package/dist/src/backend-recovery-semantic.js +113 -0
- package/dist/src/backend-recovery-semantic.js.map +1 -0
- package/dist/src/backend-task-recovery.d.ts +103 -0
- package/dist/src/backend-task-recovery.js +142 -0
- package/dist/src/backend-task-recovery.js.map +1 -0
- package/dist/src/callback-transport.d.ts +8 -0
- package/dist/src/callback-transport.js +14 -0
- package/dist/src/callback-transport.js.map +1 -1
- package/dist/src/cli-core.js +18 -8
- package/dist/src/cli-core.js.map +1 -1
- package/dist/src/cli-runtime-context.d.ts +5 -0
- package/dist/src/cli-runtime-context.js.map +1 -1
- package/dist/src/codex-async-question-adapter.js +14 -4
- package/dist/src/codex-async-question-adapter.js.map +1 -1
- package/dist/src/codex-lifecycle-compatibility.d.ts +1 -1
- package/dist/src/codex-lifecycle-compatibility.js +9 -3
- package/dist/src/codex-lifecycle-compatibility.js.map +1 -1
- package/dist/src/codex-native-cli-adapter.d.ts +6 -0
- package/dist/src/codex-native-cli-adapter.js +273 -0
- package/dist/src/codex-native-cli-adapter.js.map +1 -0
- package/dist/src/codex-native-client-interactions.d.ts +6 -0
- package/dist/src/codex-native-client-interactions.js +124 -0
- package/dist/src/codex-native-client-interactions.js.map +1 -0
- package/dist/src/codex-native-client-rpc.d.ts +21 -0
- package/dist/src/codex-native-client-rpc.js +137 -0
- package/dist/src/codex-native-client-rpc.js.map +1 -0
- package/dist/src/codex-native-client.d.ts +42 -0
- package/dist/src/codex-native-client.js +326 -0
- package/dist/src/codex-native-client.js.map +1 -0
- package/dist/src/codex-native-identity.d.ts +6 -0
- package/dist/src/codex-native-identity.js +42 -0
- package/dist/src/codex-native-identity.js.map +1 -0
- package/dist/src/codex-native-monitor.d.ts +4 -0
- package/dist/src/codex-native-monitor.js +92 -0
- package/dist/src/codex-native-monitor.js.map +1 -0
- package/dist/src/codex-native-outbox.d.ts +16 -0
- package/dist/src/codex-native-outbox.js +120 -0
- package/dist/src/codex-native-outbox.js.map +1 -0
- package/dist/src/codex-native-public-projection.d.ts +545 -0
- package/dist/src/codex-native-public-projection.js +182 -0
- package/dist/src/codex-native-public-projection.js.map +1 -0
- package/dist/src/codex-native-record-store.d.ts +27 -0
- package/dist/src/codex-native-record-store.js +111 -0
- package/dist/src/codex-native-record-store.js.map +1 -0
- package/dist/src/codex-native-response-service.d.ts +69 -0
- package/dist/src/codex-native-response-service.js +244 -0
- package/dist/src/codex-native-response-service.js.map +1 -0
- package/dist/src/codex-native-runtime.d.ts +46 -0
- package/dist/src/codex-native-runtime.js +112 -0
- package/dist/src/codex-native-runtime.js.map +1 -0
- package/dist/src/codex-native-semantic.d.ts +17 -0
- package/dist/src/codex-native-semantic.js +175 -0
- package/dist/src/codex-native-semantic.js.map +1 -0
- package/dist/src/codex-native-snapshot.d.ts +19 -0
- package/dist/src/codex-native-snapshot.js +160 -0
- package/dist/src/codex-native-snapshot.js.map +1 -0
- package/dist/src/codex-native-state-store.d.ts +61 -0
- package/dist/src/codex-native-state-store.js +132 -0
- package/dist/src/codex-native-state-store.js.map +1 -0
- package/dist/src/codex-native-task-service.d.ts +71 -0
- package/dist/src/codex-native-task-service.js +502 -0
- package/dist/src/codex-native-task-service.js.map +1 -0
- package/dist/src/codex-native-types.d.ts +92 -0
- package/dist/src/codex-native-types.js +15 -0
- package/dist/src/codex-native-types.js.map +1 -0
- package/dist/src/codex-permission-surface.d.ts +1 -1
- package/dist/src/codex-permission-surface.js +1 -1
- package/dist/src/codex-permission-surface.js.map +1 -1
- package/dist/src/codex-terminal-agent-adapter.js +3 -1
- package/dist/src/codex-terminal-agent-adapter.js.map +1 -1
- package/dist/src/conversation-list.d.ts +12 -0
- package/dist/src/conversation-list.js +30 -0
- package/dist/src/conversation-list.js.map +1 -0
- package/dist/src/conversation-route-dispatch.d.ts +13 -0
- package/dist/src/conversation-route-dispatch.js +66 -0
- package/dist/src/conversation-route-dispatch.js.map +1 -0
- package/dist/src/conversation-route-legacy.d.ts +18 -0
- package/dist/src/conversation-route-legacy.js +54 -0
- package/dist/src/conversation-route-legacy.js.map +1 -0
- package/dist/src/conversation-route-store.d.ts +51 -0
- package/dist/src/conversation-route-store.js +126 -0
- package/dist/src/conversation-route-store.js.map +1 -0
- package/dist/src/conversation-routing-cli-adapter.d.ts +12 -0
- package/dist/src/conversation-routing-cli-adapter.js +211 -0
- package/dist/src/conversation-routing-cli-adapter.js.map +1 -0
- package/dist/src/conversation-routing-commands.d.ts +11 -0
- package/dist/src/conversation-routing-commands.js +85 -0
- package/dist/src/conversation-routing-commands.js.map +1 -0
- package/dist/src/conversation-routing-home.d.ts +26 -0
- package/dist/src/conversation-routing-home.js +105 -0
- package/dist/src/conversation-routing-home.js.map +1 -0
- package/dist/src/conversation-routing-identity.d.ts +40 -0
- package/dist/src/conversation-routing-identity.js +174 -0
- package/dist/src/conversation-routing-identity.js.map +1 -0
- package/dist/src/conversation-runtime-route-store.d.ts +11 -0
- package/dist/src/conversation-runtime-route-store.js +118 -0
- package/dist/src/conversation-runtime-route-store.js.map +1 -0
- package/dist/src/desktop-async-interactions.d.ts +15 -0
- package/dist/src/desktop-async-interactions.js +88 -0
- package/dist/src/desktop-async-interactions.js.map +1 -0
- package/dist/src/desktop-async-state.d.ts +5 -0
- package/dist/src/desktop-async-state.js +53 -0
- package/dist/src/desktop-async-state.js.map +1 -0
- package/dist/src/desktop-cli-adapter.d.ts +7 -0
- package/dist/src/desktop-cli-adapter.js +322 -0
- package/dist/src/desktop-cli-adapter.js.map +1 -0
- package/dist/src/desktop-cli-controls.d.ts +9 -0
- package/dist/src/desktop-cli-controls.js +45 -0
- package/dist/src/desktop-cli-controls.js.map +1 -0
- package/dist/src/desktop-command-presentation.d.ts +2 -0
- package/dist/src/desktop-command-presentation.js +31 -0
- package/dist/src/desktop-command-presentation.js.map +1 -0
- package/dist/src/desktop-control-semantic.d.ts +8 -0
- package/dist/src/desktop-control-semantic.js +68 -0
- package/dist/src/desktop-control-semantic.js.map +1 -0
- package/dist/src/desktop-identity.d.ts +5 -0
- package/dist/src/desktop-identity.js +40 -0
- package/dist/src/desktop-identity.js.map +1 -0
- package/dist/src/desktop-interaction-projection.d.ts +57 -0
- package/dist/src/desktop-interaction-projection.js +196 -0
- package/dist/src/desktop-interaction-projection.js.map +1 -0
- package/dist/src/desktop-interaction-state.d.ts +3 -0
- package/dist/src/desktop-interaction-state.js +48 -0
- package/dist/src/desktop-interaction-state.js.map +1 -0
- package/dist/src/desktop-ipc-async-answer.d.ts +9 -0
- package/dist/src/desktop-ipc-async-answer.js +71 -0
- package/dist/src/desktop-ipc-async-answer.js.map +1 -0
- package/dist/src/desktop-ipc-client.d.ts +47 -0
- package/dist/src/desktop-ipc-client.js +400 -0
- package/dist/src/desktop-ipc-client.js.map +1 -0
- package/dist/src/desktop-ipc-native-operations.d.ts +11 -0
- package/dist/src/desktop-ipc-native-operations.js +126 -0
- package/dist/src/desktop-ipc-native-operations.js.map +1 -0
- package/dist/src/desktop-ipc-transport.d.ts +13 -0
- package/dist/src/desktop-ipc-transport.js +123 -0
- package/dist/src/desktop-ipc-transport.js.map +1 -0
- package/dist/src/desktop-list.d.ts +25 -0
- package/dist/src/desktop-list.js +55 -0
- package/dist/src/desktop-list.js.map +1 -0
- package/dist/src/desktop-metadata-reader.d.ts +30 -0
- package/dist/src/desktop-metadata-reader.js +182 -0
- package/dist/src/desktop-metadata-reader.js.map +1 -0
- package/dist/src/desktop-monitor.d.ts +4 -0
- package/dist/src/desktop-monitor.js +101 -0
- package/dist/src/desktop-monitor.js.map +1 -0
- package/dist/src/desktop-public-projection.d.ts +6 -0
- package/dist/src/desktop-public-projection.js +134 -0
- package/dist/src/desktop-public-projection.js.map +1 -0
- package/dist/src/desktop-request-interactions.d.ts +14 -0
- package/dist/src/desktop-request-interactions.js +144 -0
- package/dist/src/desktop-request-interactions.js.map +1 -0
- package/dist/src/desktop-response-dispatch.d.ts +14 -0
- package/dist/src/desktop-response-dispatch.js +19 -0
- package/dist/src/desktop-response-dispatch.js.map +1 -0
- package/dist/src/desktop-response-evidence.d.ts +4 -0
- package/dist/src/desktop-response-evidence.js +19 -0
- package/dist/src/desktop-response-evidence.js.map +1 -0
- package/dist/src/desktop-response-service.d.ts +11 -0
- package/dist/src/desktop-response-service.js +188 -0
- package/dist/src/desktop-response-service.js.map +1 -0
- package/dist/src/desktop-response-store.d.ts +35 -0
- package/dist/src/desktop-response-store.js +58 -0
- package/dist/src/desktop-response-store.js.map +1 -0
- package/dist/src/desktop-response-types.d.ts +20 -0
- package/dist/src/desktop-response-types.js +2 -0
- package/dist/src/desktop-response-types.js.map +1 -0
- package/dist/src/desktop-response-value.d.ts +6 -0
- package/dist/src/desktop-response-value.js +31 -0
- package/dist/src/desktop-response-value.js.map +1 -0
- package/dist/src/desktop-runtime.d.ts +153 -0
- package/dist/src/desktop-runtime.js +88 -0
- package/dist/src/desktop-runtime.js.map +1 -0
- package/dist/src/desktop-semantic.d.ts +21 -0
- package/dist/src/desktop-semantic.js +140 -0
- package/dist/src/desktop-semantic.js.map +1 -0
- package/dist/src/desktop-session-catalog.d.ts +68 -0
- package/dist/src/desktop-session-catalog.js +225 -0
- package/dist/src/desktop-session-catalog.js.map +1 -0
- package/dist/src/desktop-session-controls.d.ts +145 -0
- package/dist/src/desktop-session-controls.js +176 -0
- package/dist/src/desktop-session-controls.js.map +1 -0
- package/dist/src/desktop-sidebar-metadata.d.ts +27 -0
- package/dist/src/desktop-sidebar-metadata.js +83 -0
- package/dist/src/desktop-sidebar-metadata.js.map +1 -0
- package/dist/src/desktop-sidebar-projects.d.ts +10 -0
- package/dist/src/desktop-sidebar-projects.js +31 -0
- package/dist/src/desktop-sidebar-projects.js.map +1 -0
- package/dist/src/desktop-sidebar-selection.d.ts +28 -0
- package/dist/src/desktop-sidebar-selection.js +85 -0
- package/dist/src/desktop-sidebar-selection.js.map +1 -0
- package/dist/src/desktop-snapshot-details.d.ts +4 -0
- package/dist/src/desktop-snapshot-details.js +116 -0
- package/dist/src/desktop-snapshot-details.js.map +1 -0
- package/dist/src/desktop-snapshot.d.ts +11 -0
- package/dist/src/desktop-snapshot.js +276 -0
- package/dist/src/desktop-snapshot.js.map +1 -0
- package/dist/src/desktop-state-store.d.ts +72 -0
- package/dist/src/desktop-state-store.js +269 -0
- package/dist/src/desktop-state-store.js.map +1 -0
- package/dist/src/desktop-task-interactions.d.ts +10 -0
- package/dist/src/desktop-task-interactions.js +93 -0
- package/dist/src/desktop-task-interactions.js.map +1 -0
- package/dist/src/desktop-task-recovery.d.ts +38 -0
- package/dist/src/desktop-task-recovery.js +171 -0
- package/dist/src/desktop-task-recovery.js.map +1 -0
- package/dist/src/desktop-task-service.d.ts +54 -0
- package/dist/src/desktop-task-service.js +441 -0
- package/dist/src/desktop-task-service.js.map +1 -0
- package/dist/src/desktop-types.d.ts +281 -0
- package/dist/src/desktop-types.js +13 -0
- package/dist/src/desktop-types.js.map +1 -0
- package/dist/src/host-monitor-reconciliation.js +36 -4
- package/dist/src/host-monitor-reconciliation.js.map +1 -1
- package/dist/src/host-profile-runtime.js +7 -3
- package/dist/src/host-profile-runtime.js.map +1 -1
- package/dist/src/local-codex-cli-adapter.d.ts +7 -0
- package/dist/src/local-codex-cli-adapter.js +13 -0
- package/dist/src/local-codex-cli-adapter.js.map +1 -0
- package/dist/src/openclaw-callback-transport.js +2 -1
- package/dist/src/openclaw-callback-transport.js.map +1 -1
- package/dist/src/semantic-conversation-target.d.ts +4 -0
- package/dist/src/semantic-conversation-target.js +20 -0
- package/dist/src/semantic-conversation-target.js.map +1 -0
- package/dist/src/semantic-permission-control.js +47 -9
- package/dist/src/semantic-permission-control.js.map +1 -1
- package/dist/src/semantic-private-authority-offers.d.ts +1 -1
- package/dist/src/semantic-private-authority-offers.js +3 -1
- package/dist/src/semantic-private-authority-offers.js.map +1 -1
- package/dist/src/semantic-tool-command-helpers.d.ts +6 -0
- package/dist/src/semantic-tool-command-helpers.js +199 -78
- package/dist/src/semantic-tool-command-helpers.js.map +1 -1
- package/dist/src/semantic-tool-descriptions.d.ts +2 -1
- package/dist/src/semantic-tool-descriptions.js +81 -35
- package/dist/src/semantic-tool-descriptions.js.map +1 -1
- package/dist/src/semantic-tool-list-projection.js +66 -2
- package/dist/src/semantic-tool-list-projection.js.map +1 -1
- package/dist/src/semantic-tool-presentation.js +76 -7
- package/dist/src/semantic-tool-presentation.js.map +1 -1
- package/dist/src/semantic-tool-runtime.js +129 -29
- package/dist/src/semantic-tool-runtime.js.map +1 -1
- package/dist/src/semantic-tool-schemas.d.ts +410 -27
- package/dist/src/semantic-tool-schemas.js +176 -88
- package/dist/src/semantic-tool-schemas.js.map +1 -1
- package/dist/src/terminal-action-contracts.js +10 -6
- package/dist/src/terminal-action-contracts.js.map +1 -1
- package/dist/src/terminal-list-cli-adapter.d.ts +1 -0
- package/dist/src/terminal-list-cli-adapter.js +6 -3
- package/dist/src/terminal-list-cli-adapter.js.map +1 -1
- package/dist/src/terminal-model-control-profile.d.ts +3 -1
- package/dist/src/terminal-model-control-profile.js +15 -7
- package/dist/src/terminal-model-control-profile.js.map +1 -1
- package/dist/src/terminal-monitor-decision-policy.d.ts +1 -1
- package/dist/src/terminal-native-inspection-profile.js +4 -0
- package/dist/src/terminal-native-inspection-profile.js.map +1 -1
- package/dist/src/terminal-permission-control-list-projection.d.ts +1 -1
- package/dist/src/terminal-permission-control.js +5 -1
- package/dist/src/terminal-permission-control.js.map +1 -1
- package/dist/src/terminal-questionnaire-adapter.js +5 -2
- package/dist/src/terminal-questionnaire-adapter.js.map +1 -1
- package/dist/src/terminal-user-send-intent.d.ts +2 -0
- package/dist/src/terminal-user-send-intent.js +11 -3
- package/dist/src/terminal-user-send-intent.js.map +1 -1
- package/docs/architecture/current-architecture.md +313 -0
- package/docs/architecture/interactive-terminal-response.md +276 -0
- package/docs/architecture/issue-126-final-report.md +248 -0
- package/docs/architecture/orchestration-refactor-history.md +2987 -0
- package/docs/architecture/orchestration-refactor.md +21 -0
- package/docs/backend-task-recovery.md +89 -0
- package/docs/bidirectional-agent-protocol.md +260 -0
- package/docs/codex-0.160.0-compatibility.md +126 -0
- package/docs/codex-cli-native-compatibility.md +246 -0
- package/docs/codex-desktop-compatibility.md +414 -0
- package/docs/codex-permissions.md +12 -1
- package/docs/openclaw-operations.md +281 -0
- package/docs/openclaw-session-turn-delivery-requirement.md +45 -0
- package/docs/operator-guide.md +543 -0
- package/docs/storage-and-logging.md +91 -0
- package/docs/test-performance-issue-108.md +80 -0
- package/docs/test-performance-issue-120.md +226 -0
- package/docs/testing.md +628 -0
- package/openclaw.plugin.json +7 -3
- package/package.json +6 -12
- package/templates/openclaw-skills/agent-knock-knock/SKILL.md +69 -18
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Test performance report for Issue #108
|
|
2
|
+
|
|
3
|
+
This report was recorded on the same maintainer machine on 2026-08-08 with
|
|
4
|
+
Node.js v24.18.0 on Darwin arm64. Both profiles used the checked-in JSON
|
|
5
|
+
reporter, the same warm shared Node compile-cache mode, and all 698 runtime
|
|
6
|
+
tests. The source checkout was dirty only because the profiling implementation
|
|
7
|
+
and sharding were the changes under measurement.
|
|
8
|
+
|
|
9
|
+
## Summary
|
|
10
|
+
|
|
11
|
+
| Profile | Files | Tests | Concurrency | Result | Wall time | Change |
|
|
12
|
+
| --- | ---: | ---: | ---: | --- | ---: | ---: |
|
|
13
|
+
| Before: one serial `agent-cli.test.ts` | 49 | 698 | Node default | pass | 513.96 s | baseline |
|
|
14
|
+
| Sharded peak throughput | 59 | 698 | Node default | pass | 240.13 s | -53.3% |
|
|
15
|
+
| Final stable default | 59 | 698 | 4 | pass | 301.05 s | -41.4% |
|
|
16
|
+
|
|
17
|
+
The peak-throughput run demonstrated the benefit of sharding, but repeated
|
|
18
|
+
stress runs at concurrency 8 and 6 starved nested CLI/fake-terminal processes:
|
|
19
|
+
test-only 30-second child deadlines fired, and terminal submission fixtures
|
|
20
|
+
could cross production's real bounded deadline. Those runs were rejected even
|
|
21
|
+
though they were faster. The final runner caps concurrency at four and permits
|
|
22
|
+
an explicit `AKK_TEST_CONCURRENCY` override for controlled experiments.
|
|
23
|
+
|
|
24
|
+
The inner loop is separate: the final fast tier contains 27 files and 374 tests
|
|
25
|
+
and completes in under 10 seconds on the same machine.
|
|
26
|
+
|
|
27
|
+
## Critical path before
|
|
28
|
+
|
|
29
|
+
| File | Tests | Worker duration |
|
|
30
|
+
| --- | ---: | ---: |
|
|
31
|
+
| `test/agent-cli.test.ts` | 69 | 512.91 s |
|
|
32
|
+
| `test/codex-no-rollout-binding-cli.test.ts` | 17 | 167.41 s |
|
|
33
|
+
| `test/native-thread-lifecycle-recovery-cli.test.ts` | 19 | 149.46 s |
|
|
34
|
+
| `test/codex-sticky-rollout-lifecycle-cli.test.ts` | 1 | 124.47 s |
|
|
35
|
+
| `test/native-thread-lifecycle-cli.test.ts` | 1 | 49.19 s |
|
|
36
|
+
| `test/callback-cli.test.ts` | 30 | 46.35 s |
|
|
37
|
+
|
|
38
|
+
The 69 `agent-cli` runtime tests were serialized in one 12,149-line file. The
|
|
39
|
+
refactor moved the exact unchanged test bodies into 11 process-isolated shards;
|
|
40
|
+
their concatenated source hash and runtime count match the original.
|
|
41
|
+
|
|
42
|
+
## Critical path after
|
|
43
|
+
|
|
44
|
+
| File | Tests | Worker duration |
|
|
45
|
+
| --- | ---: | ---: |
|
|
46
|
+
| `test/codex-no-rollout-binding-cli.test.ts` | 17 | 167.75 s |
|
|
47
|
+
| `test/native-thread-lifecycle-recovery-cli.test.ts` | 19 | 144.00 s |
|
|
48
|
+
| `test/codex-sticky-rollout-lifecycle-cli.test.ts` | 1 | 119.09 s |
|
|
49
|
+
| Slowest `test/shards/agent-cli-*.test.ts` worker | 5 | 55.74 s |
|
|
50
|
+
| `test/native-thread-lifecycle-cli.test.ts` | 1 | 44.10 s |
|
|
51
|
+
| `test/callback-cli.test.ts` | 30 | 35.57 s |
|
|
52
|
+
|
|
53
|
+
## Why the stable full suite remains above 180 seconds
|
|
54
|
+
|
|
55
|
+
The remaining top three files are real process gates, not obsolete duplicate
|
|
56
|
+
coverage. They repeatedly launch the built CLI plus fake `tmux`, `ps`, `lsof`,
|
|
57
|
+
and SQLite processes to preserve virgin attach/reconcile behavior, exact native
|
|
58
|
+
recovery fences, sticky rollout handling, WAL/checkpoint behavior, and fail-
|
|
59
|
+
closed identity checks. A separate serial verification of only
|
|
60
|
+
`native-thread-lifecycle-recovery-cli.test.ts` and the receipt-fence shard took
|
|
61
|
+
180.08 seconds for 24 passing tests. That pair alone consumes the issue target
|
|
62
|
+
before the other 674 tests run.
|
|
63
|
+
|
|
64
|
+
Reaching a stable full-suite wall below 180 seconds therefore requires a second
|
|
65
|
+
architectural step: inject CLI handlers/providers and clocks for semantic cases,
|
|
66
|
+
split the sticky lifecycle state chain into independent Store-seeded scenarios,
|
|
67
|
+
and retain a thin black-box process layer. This PR intentionally does not delete
|
|
68
|
+
those recent regression fences, shorten production timing windows, disable
|
|
69
|
+
process isolation, or force-exit child processes merely to hit the number.
|
|
70
|
+
|
|
71
|
+
## Reproduce
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm run test:profile -- --output /tmp/akk-profile.json
|
|
75
|
+
AKK_TEST_CONCURRENCY=8 npm run test:profile -- --output /tmp/akk-profile-c8.json
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The JSON contains metadata, totals, every file and test duration, slowest tests,
|
|
79
|
+
and full failure stacks. Compare runs only on the same machine, Node version,
|
|
80
|
+
concurrency, and compile-cache mode.
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# Test performance report for Issue #120
|
|
2
|
+
|
|
3
|
+
This report records the second test-performance phase described by Issue #120.
|
|
4
|
+
Measurements are comparable only when they use the same maintainer machine,
|
|
5
|
+
Node.js version, file concurrency, and warm compile-cache mode. The v0.11.7
|
|
6
|
+
baseline and final profiles were measured on 2026-08-10 with Node.js v24.18.0
|
|
7
|
+
on Darwin arm64, concurrency 4, and a warm shared compile cache.
|
|
8
|
+
|
|
9
|
+
## Baseline
|
|
10
|
+
|
|
11
|
+
| Measurement | v0.11.7 baseline |
|
|
12
|
+
| --- | ---: |
|
|
13
|
+
| Test files | 61 |
|
|
14
|
+
| Runtime tests | 769 |
|
|
15
|
+
| Full `npm test` wall time | 432.31 s |
|
|
16
|
+
| Node test duration | 430.99 s |
|
|
17
|
+
| Fast tier | 28 files / 435 tests / 6.94 s including build |
|
|
18
|
+
| Integration tier | 33 files / 334 tests / approximately 98% of wall time |
|
|
19
|
+
|
|
20
|
+
The count itself was not the bottleneck. The 435-test fast tier completed in
|
|
21
|
+
under seven seconds; repeated CLI processes, fake terminal/process/SQLite
|
|
22
|
+
commands, and real polling or composer-settle windows dominated the full run.
|
|
23
|
+
Increasing file concurrency was not used because the concurrency 6/8 results
|
|
24
|
+
from Issue #108 produced nested-process starvation and false bounded-timeout
|
|
25
|
+
failures.
|
|
26
|
+
|
|
27
|
+
## Critical-path migration inventory
|
|
28
|
+
|
|
29
|
+
| Test family | Before | Migrated shape | Focused after median | Change |
|
|
30
|
+
| --- | ---: | --- | ---: | ---: |
|
|
31
|
+
| `native-thread-lifecycle-recovery-cli.test.ts` | 19 tests / approximately 174 s | 17 in-process semantic cases + 2 process goldens | 25.224 s | -85.5% |
|
|
32
|
+
| `codex-no-rollout-binding-cli.test.ts` | 21 tests / 167.75 s | 18 in-process semantic cases + 3 process goldens | 41.366 s | -75.3% |
|
|
33
|
+
| Sticky rollout lifecycle | 1 stateful process scenario / 119.09 s | 7 independent Store-seeded core cases + 1 process golden | 32.016 s | -73.1% |
|
|
34
|
+
|
|
35
|
+
The sticky semantic cases now live in
|
|
36
|
+
`codex-sticky-rollout-lifecycle-core.test.ts`; the retained executable contract
|
|
37
|
+
remains in `codex-sticky-rollout-lifecycle-cli.test.ts`. The migration changes
|
|
38
|
+
the execution layer, not the safety assertions.
|
|
39
|
+
|
|
40
|
+
The three focused final samples were 25.224/26.437/24.810 seconds for recovery,
|
|
41
|
+
41.706/41.366/41.264 seconds for no-rollout binding, and
|
|
42
|
+
32.046/32.016/31.405 seconds for sticky lifecycle. Earlier development checks
|
|
43
|
+
reached 24.36 seconds and 38.33 seconds for the first two families; those
|
|
44
|
+
one-off values are not substituted for the final repeated medians.
|
|
45
|
+
|
|
46
|
+
## Injectable command boundary
|
|
47
|
+
|
|
48
|
+
The emitted `src/cli.ts` entry is now limited to parsing `process.argv`, calling
|
|
49
|
+
the command core, forwarding stdout, and applying the returned/fatal exit
|
|
50
|
+
status. `src/cli-core.ts` exports `parseCliCommand` and `executeCliCommand`.
|
|
51
|
+
Importing that module does not inspect argv, run a command, write output, or
|
|
52
|
+
exit the process; a dedicated child-process import probe preserves that
|
|
53
|
+
contract.
|
|
54
|
+
|
|
55
|
+
`executeCliCommand` scopes injected dependencies to one asynchronous execution.
|
|
56
|
+
The available seams include:
|
|
57
|
+
|
|
58
|
+
- terminal provider registry and terminal process source;
|
|
59
|
+
- Codex session/rollout and native lifecycle providers plus Claude agent rows;
|
|
60
|
+
- running-agent version and process-birth observations;
|
|
61
|
+
- cwd, environment, pid, wall/monotonic clocks, async/synchronous sleep;
|
|
62
|
+
- stdout, exit handling, and runtime logging.
|
|
63
|
+
|
|
64
|
+
The in-process fixtures use recording terminal providers, mutable process
|
|
65
|
+
snapshots, explicit agent identity adapters, and virtual time. Production
|
|
66
|
+
parsing, lifecycle policy, Store/CAS code, bridge sequencing, and error
|
|
67
|
+
classification still execute; tests no longer pay for a fresh Node CLI plus
|
|
68
|
+
fake executables for every semantic branch.
|
|
69
|
+
|
|
70
|
+
## Semantic coverage moved in-process
|
|
71
|
+
|
|
72
|
+
### Native lifecycle recovery
|
|
73
|
+
|
|
74
|
+
The in-process matrix retains:
|
|
75
|
+
|
|
76
|
+
- exact-before rollback and exact-after roll-forward without replaying the
|
|
77
|
+
native lifecycle command;
|
|
78
|
+
- source/target ownership conflicts, target CAS conflict, and partial-detach
|
|
79
|
+
prevention;
|
|
80
|
+
- composer clear failure, non-empty composer refusal, and stale status-screen
|
|
81
|
+
rejection;
|
|
82
|
+
- status-only recorded-before recovery and verified candidate inode drift;
|
|
83
|
+
- third-identity quarantine, later exact-after recovery, and direct recovery
|
|
84
|
+
before a raw send creates one Turn;
|
|
85
|
+
- Codex resolver failure and no-rollout evidence handling;
|
|
86
|
+
- Claude exact-before rollback, third-identity quarantine, ambiguous exact-PID
|
|
87
|
+
rows, and target ownership conflicts.
|
|
88
|
+
|
|
89
|
+
### Virgin/no-rollout Codex binding
|
|
90
|
+
|
|
91
|
+
The in-process matrix retains:
|
|
92
|
+
|
|
93
|
+
- rejected production preflight cleanup, rollout discovery races, attach setup
|
|
94
|
+
failure, and proved text-dispatch failure before any task input;
|
|
95
|
+
- fenced New/Resume availability after a rejected virgin attach;
|
|
96
|
+
- provisional-orphan reconciliation, external native-thread drift, and PID
|
|
97
|
+
reuse behavior;
|
|
98
|
+
- ambiguous/unverifiable ownership, status-card/rollout disagreement, process
|
|
99
|
+
birth mismatch, and exact status-card binding refinement;
|
|
100
|
+
- suppression of reconcile while Turns, transitions, or dispatch ledgers are
|
|
101
|
+
unresolved;
|
|
102
|
+
- unmanaged lifecycle-token freshness and restorable-origin live-gate fences;
|
|
103
|
+
- native status inspection snapshot, composer, Store-mutation, version, busy
|
|
104
|
+
state, and post-injection process-drift fences.
|
|
105
|
+
|
|
106
|
+
### Sticky rollout lifecycle
|
|
107
|
+
|
|
108
|
+
The former 1,488-line chained scenario is split into independently seeded
|
|
109
|
+
cases for:
|
|
110
|
+
|
|
111
|
+
- draft rejection both before probing and before lifecycle mutation;
|
|
112
|
+
- A -> New B isolation and exact transition/dispatch-ledger commitment;
|
|
113
|
+
- B send rejection on drafts or wrong status, followed by exact B rollout
|
|
114
|
+
materialization with no A leakage;
|
|
115
|
+
- snapshot-bound `previous` navigation A -> B without creating a Turn;
|
|
116
|
+
- B -> New C companion-root handling and exact C materialization;
|
|
117
|
+
- monitor stall handling while preserving the active C binding; and
|
|
118
|
+
- fail-closed behavior for an unknown fourth open rollout without Store or
|
|
119
|
+
terminal mutation.
|
|
120
|
+
|
|
121
|
+
## Retained black-box process contracts
|
|
122
|
+
|
|
123
|
+
The following process tests are intentional. Each proves a boundary that the
|
|
124
|
+
in-process layer does not replace:
|
|
125
|
+
|
|
126
|
+
| Domain | Retained executable contract |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| CLI import/entry | Importing the core is side-effect free; existing CLI UX coverage retains executable argv, output, redaction, and exit behavior. |
|
|
129
|
+
| Virgin Codex attach | The emitted CLI wires real command adapters for tmux/process/SQLite, sends the exact text/Enter vectors, and persists matching Session/Turn binding generations. |
|
|
130
|
+
| Prepared lifecycle crash | A real CLI process exits with the deliberate code 86 after the prepared fence, preserving executable failure classification and recoverable state. |
|
|
131
|
+
| Codex native inspection | The emitted CLI materializes `/status`, waits across the real 121 ms suppression boundary, sends exactly one Enter, redacts status output, and creates no Store artifacts. |
|
|
132
|
+
| Codex recovery | One dispatching exact-before case proves executable wiring, `C-u` composer clearing, `/status` probing, rollback, and no lifecycle replay. |
|
|
133
|
+
| Claude recovery | One submitted exact-after case proves the emitted CLI uses Claude identity evidence to roll the binding forward without replay. |
|
|
134
|
+
| Sticky rollout | One emitted CLI + tmux/process/SQLite-adapter A -> B -> A path proves `/clear`, snapshot-bound previous selection, exact `/resume <uuid>`, and no Turn creation. |
|
|
135
|
+
|
|
136
|
+
Real SQLite WAL/checkpoint, filesystem-lock, Store protocol, compatibility, and
|
|
137
|
+
other process-boundary suites remain in their existing domain files. They were
|
|
138
|
+
not converted or deleted merely to improve this profile.
|
|
139
|
+
|
|
140
|
+
## Fail-closed affected-test workflow
|
|
141
|
+
|
|
142
|
+
`npm run test:affected` is a build-once local feedback command. It reads NUL-safe
|
|
143
|
+
Git path output and, when supplied, an explicit comparison base:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
npm run test:affected
|
|
147
|
+
npm run test:affected -- --base origin/main
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
For a known change it runs the complete fast tier, then the exact mapped
|
|
151
|
+
integration manifest entries. A changed integration test selects itself; a
|
|
152
|
+
fast test or documentation-only change adds no integration worker. Branch
|
|
153
|
+
commits, staged/unstaged work, and untracked files are included when an explicit
|
|
154
|
+
base is used.
|
|
155
|
+
|
|
156
|
+
Selection fails closed to `test:full` when:
|
|
157
|
+
|
|
158
|
+
- the Git diff/base cannot be read or resolved;
|
|
159
|
+
- a mapped test is absent from the integration manifest;
|
|
160
|
+
- a changed path is unknown; or
|
|
161
|
+
- exact Store/protocol, shared production kernel, selector, or architecture
|
|
162
|
+
authority changes.
|
|
163
|
+
|
|
164
|
+
Normal production domains select at most five integration witnesses. Known
|
|
165
|
+
test helpers add their transitive integration consumers. Tier-manifest changes
|
|
166
|
+
require an additive, same-diff content proof, and package plus lockfile changes
|
|
167
|
+
require a synchronized version-only proof; all other manifest semantics remain
|
|
168
|
+
full.
|
|
169
|
+
|
|
170
|
+
The full tier itself contains the complete fast and integration manifests, so
|
|
171
|
+
the fast tier is never omitted. `test:affected` narrows local feedback only;
|
|
172
|
+
`npm test` remains mandatory for merge and release verification.
|
|
173
|
+
|
|
174
|
+
## Compatibility and safety retained
|
|
175
|
+
|
|
176
|
+
This refactor does not change production timing windows or default test
|
|
177
|
+
concurrency, and it does not weaken or remove:
|
|
178
|
+
|
|
179
|
+
- full native UUID, fresh snapshot/candidate token, binding generation, CAS,
|
|
180
|
+
pane/PID/process-birth, cwd, ownership, and capability fences from #87;
|
|
181
|
+
- no-input versus submission-uncertain classification, composer
|
|
182
|
+
clearing/materialization, or single-Enter evidence;
|
|
183
|
+
- exact-before, exact-after, third-identity, candidate inode, PID ownership,
|
|
184
|
+
reconcile-suppression, and sticky/multiple-root behavior;
|
|
185
|
+
- opt-in #88 native Codex and Claude lifecycle live smoke;
|
|
186
|
+
- Store protocol/migration and v0.11.x artifact compatibility; or
|
|
187
|
+
- Codex 0.146.x/0.147.0 and Claude Code 2.1.218/2.1.226 coverage.
|
|
188
|
+
|
|
189
|
+
No supported product behavior or version contract was removed as test cleanup.
|
|
190
|
+
|
|
191
|
+
## Final repeated profile
|
|
192
|
+
|
|
193
|
+
Three successful profiles used the same machine, Node.js v24.18.0, concurrency
|
|
194
|
+
4, and warm compile-cache mode. The profile JSON reports Node test-runner
|
|
195
|
+
duration, so the comparison below uses the baseline Node duration rather than
|
|
196
|
+
mixing it with shell/build wall time.
|
|
197
|
+
|
|
198
|
+
| Measurement | Run 1 | Run 2 | Run 3 | Median |
|
|
199
|
+
| --- | ---: | ---: | ---: | ---: |
|
|
200
|
+
| Files / tests | 65 / 789 | 65 / 789 | 65 / 789 | 65 / 789 |
|
|
201
|
+
| Result | pass | pass | pass | pass |
|
|
202
|
+
| Profile-reported duration | 269.048 s | 262.413 s | 261.837 s | **262.413 s** |
|
|
203
|
+
|
|
204
|
+
The median is 39.1% below the 430.99-second baseline Node duration even though
|
|
205
|
+
the suite grew by four files and 20 tests. A separate ordinary `npm test`
|
|
206
|
+
validation passed 789/789 with 265.392 seconds reported by Node and 266.65
|
|
207
|
+
seconds shell wall time. The final fast tier passed 454/454 in 7.048 seconds of
|
|
208
|
+
Node duration and 8.3 seconds including its build, remaining below the
|
|
209
|
+
10-second limit.
|
|
210
|
+
|
|
211
|
+
Reproduction commands:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
npm run test:profile -- --output /tmp/akk-120-profile-1.json
|
|
215
|
+
npm run test:profile -- --output /tmp/akk-120-profile-2.json
|
|
216
|
+
npm run test:profile -- --output /tmp/akk-120-profile-3.json
|
|
217
|
+
npm run test:fast
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Phase A is achieved: the stable three-run median is 262.413 seconds, 37.587
|
|
221
|
+
seconds inside the 300-second ceiling, and the fast tier remains below 10
|
|
222
|
+
seconds. Phase B is not achieved by this change. Reaching a stable median at or
|
|
223
|
+
below 180 seconds remains follow-up work on repeated semantic subprocesses in
|
|
224
|
+
the agent CLI shards and other process-heavy integration domains. That work
|
|
225
|
+
must preserve the black-box contracts above; it must not be hidden by increased
|
|
226
|
+
concurrency, shorter production waits, or removed safety coverage.
|