Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .iolaus/evidence/subagent-batch-grouping/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Observed Subagent Batch Grouping

Final runtime evidence: `p2-dialog/receipt.json` (PASS, OpenCode 2.2.1, ten checks, including mixed-call dialog regression). Earlier batching evidence remains in `verified/`.
Reproduce with `node script/qa-subagent-batches.mjs <directory-under-.iolaus/evidence>` after `bun run check:package`.

## Verification

- `bun test`: 382 pass, 0 fail, 2884 assertions across 25 files after the P2 dialog fix.
- `bun run typecheck`: exit 0.
- `bun run check:package`: PASS, bundled build and 91 active files checked.
- `bun run check:reference`: PASS, 800 immutable snapshot files checked.
- `git diff --check`: exit 0.
- The first regression run failed on actual controller/store output `1,10,11,12,2,...`; the final suite checks grouping, source-flow isolation, nested parent links, followups, reload, legacy preservation, unknown-identity isolation and forged metadata through real observer hooks/controllers.

## Runtime Evidence

`verified/hooks.ndjson` contains only tool/session/message IDs and delivered-context message types. It demonstrates that actual tool hooks can correlate their assistant message with the preceding delivered user request, without reading the host database. `verified/groups.json` records source keys, status, timestamps and ordered node IDs/parents.

`verified/twelve-node-details.txt` shows 1 through 12 in order. `verified/historical-label.txt` shows a failed 31-hour historical aggregate beside a fresh successful 1/1 request batch taking zero seconds. `verified/scheduled-batches.txt` and the groups receipt separate scheduled flows from observed batches. `verified/batch-details.txt`, `verified/direct-child-opened.txt` and `verified/routes.ndjson` verify exact direct-child navigation.

`p2-dialog/` reruns all prior checks against the fixed dialog. `mixed-calls-parent.txt` shows cards in recorded order `1-native-parent`, `2-grandchild`, `3-independent`, without scheduling-wave connectors, and identifies `Child calls: 2-grandchild`. `mixed-calls-child.txt` shows the next `j` selection and `Parent call: 1-native-parent`; `mixed-calls-independent.txt` shows the next `j` selection with no parent or children. `mixed-calls-child-reselected.txt` records `k` returning to the child. `mixed-calls-exact-child-opened.txt` and `routes.ndjson`, checked against the sandbox node execution session ID, verify Enter opens that exact nested child. The scheduled layout still uses the original dependency waves; the new unit regression explicitly checks scheduled ordering and layers are unchanged.

The P2 QA run passed on its first attempt. Its receipt confirms all opened database paths were inside the sandbox, real configuration hashes were unchanged, no sandbox processes remained, and the sandbox was removed.

The script uses a local mock provider and private standalone TUI instances with isolated HOME, XDG and IOLAUS_HOME. Only the sandbox Iolaus database is read/seeded with SQLite. Receipts record open database paths, unchanged real configuration hashes, sandbox removal and zero remaining sandbox processes. No real service was restarted, no global configuration changed, and no production host database was opened directly.

## Retained Attempts

- `live-initial/receipt.json`: eight initial runtime checks passed.
- `live-final/receipt.json` and `failure.txt`: harness sent the next prompt before Escape finished closing the dialog, causing keystrokes to reach dialog actions. Fixed by waiting for closure and asserting the owner route.
- `live-final-2/receipt.json` and `failure.txt`: the QA-only queue tool defaulted to Code Mode, so a native mock call could not execute it. Fixed its registration with `codemode: false`; the final run proves queued admission does not steal the current request's sequential call.

## Boundaries

Live restart validation resumes a completed native child's followup and records its new descendant in the original batch. In-flight observed recovery remains covered by the existing real-controller recovery test. Missing/compacted request identity is tested at the observer boundary and deliberately produces unique per-call batches; this run did not force live compaction. Explicit later followups intentionally retain the original clock/count rather than pretending to be new work. No speculative legacy split or migration occurs.

The mixed-call live case uses a 175-column terminal; it does not claim additional narrow-terminal coverage. The existing 12-call case still exercises wrapping. Earlier `verified/` evidence alone did not cover mixed root/child/root chronology and therefore did not close the review P2; `p2-dialog/` supplies that missing coverage.
55 changes: 55 additions & 0 deletions .iolaus/evidence/subagent-batch-grouping/live-final-2/failure.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
QA_DONE +
┃ J9fV1d
┃ QA_DONE

↳ Continue subagent — Later followup Context
15 tokens
QA_DONE 0% used
$0.01 spent
Build · GPT-5.5 · 104ms · 526.3 tok/s
Iolaus
QA_DONE
Recent
Build · GPT-5.5 · 116ms · 576.9 tok/s ✓ Calls · request w2YR3trO
1/1 · done in 0s
QA_DONE ✓ Calls · request KZE9lrDF
13/13 · done in 16s
Build · GPT-5.5 · 125ms · 666.7 tok/s ✓ Flow · Source B
1/1 · done in 0s
┃ +5 older (details: ctrl+x d)
┃ QA_PLAN:
┃ W1t7Im5hbWUiOiJzdWJhZ2VudCIsImFyZ3MiOnsiYWdlbnQiOiJxdWljayIsImRlc2NyaXB0aW9uIjoiRm9yYmlkZGVuIGZsb3cgZm9sbG93dXAiLCJwcm9tcHQiOi Click for details · ctrl+x d
┃ JObyIsInNlc3Npb25JRCI6InNlc19lNzg5NGJkZjJmZmVFSk0zeldmazZwVGNuYyJ9fV1d
┃

↳ Continue subagent — Forbidden flow followup

QA_DONE

Build · GPT-5.5 · 23ms · 1000.0 tok/s

┃
┃ QA_PLAN:
┃ W1t7Im5hbWUiOiJxYV9xdWV1ZSIsImFyZ3MiOnsicHJvbXB0IjoiUUFfUExBTjpXMXQ3SW01aGJXVWlPaUp6ZFdKaFoyVnVkQ0lzSW1GeVozTWlPbnNpWVdkbGJuUW
┃ lPaUp4ZFdsamF5SXNJbVJsYzJOeWFYQjBhVzl1SWpvaVVYVmxkV1ZrSUhKbGNYVmxjM1FnWTJocGJHUWlMQ0p3Y205dGNIUWlPaUpEU0VsTVJGOVBTeUo5ZlYxZCJ9
┃ fV0sW3sibmFtZSI6InN1YmFnZW50IiwiYXJncyI6eyJhZ2VudCI6InF1aWNrIiwiZGVzY3JpcHRpb24iOiJCZWZvcmUgcXVldWVkIGRlbGl2ZXJ5IiwicHJvbXB0Ij
┃ oiQ0hJTERfT0sifX1dXQ==
┃

✗ qa_queue [prompt=QA_PLAN:
W1t7Im5hbWUiOiJzdWJhZ2VudCIsImFyZ3MiOnsiYWdlbnQiOiJxdWljayIsImRlc2NyaXB0aW9uIjoiUXVldWVkIHJlcXVlc3QgY2hpbGQiLCJwcm9tcHQiOiJD
SElMRF9PSyJ9fV1d]
⬖ Getting started ✕
✓ Quick Subagent — Before queued delivery
OpenCode includes free models so
QA_DONE you can start immediately.

Build · GPT-5.5 · 63ms · 1071.4 tok/s Connect from 75+ providers to
use other models, including
┃ Claude, GPT, Gemini etc
┃
┃ Connect provider /connect
┃ Build · GPT-5.5 OpenAI
╹▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/project 15 (0%) · $0.01 ctrl+p commands /…/qc…/T/iolaus-batches-fvTOXV/project

45 changes: 45 additions & 0 deletions .iolaus/evidence/subagent-batch-grouping/live-final-2/receipt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"verdict": "FAIL",
"failure": "Error: timeout: queued input delivered\n at until (file:///Users/Bryan/Programme/Project/AI/opencode-iolaus-wt/iolaus-subagent-batch-grouping/script/qa-subagent-batches.mjs:23:9)\n at async file:///Users/Bryan/Programme/Project/AI/opencode-iolaus-wt/iolaus-subagent-batch-grouping/script/qa-subagent-batches.mjs:160:3",
"version": "opencode v2.2.1",
"checks": [
"One real user request: 2 parallel + 10 sequential calls share one request batch; next request isolates old failure/count/time; stable 1..12 definition order",
"Native nesting inherits exact observed run and local parent edge",
"Two scheduled flows keep distinct observed batches, including nested descendants; scheduled definitions unchanged; no cross-group edges",
"Host restart/reload: later-request explicit native followup reopens original node, descendant inherits original batch, no new followup batch",
"Scheduled continuation guard still refuses before observation"
],
"isolation": [
{
"pids": [
1934,
1958
],
"databasePaths": [
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/data/opencode/opencode.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/home/.iolaus/iolaus.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/data/opencode/opencode.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/data/opencode/opencode.db-wal",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/home/.iolaus/iolaus.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/home/.iolaus/iolaus.db-wal"
]
},
{
"pids": [
2613,
2637
],
"databasePaths": [
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/data/opencode/opencode.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/home/.iolaus/iolaus.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/data/opencode/opencode.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/data/opencode/opencode.db-wal",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/home/.iolaus/iolaus.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-fvTOXV/home/.iolaus/iolaus.db-wal"
]
}
],
"hostConfigUnchanged": true,
"remainingSandboxProcesses": "",
"sandboxRemoved": true
}
55 changes: 55 additions & 0 deletions .iolaus/evidence/subagent-batch-grouping/live-final/failure.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
QA_DONE +

┃
┃ You are a subagent spawned by another session.
┃ CHILD_OK
┃

QA_DONE

Quick · GPT-5.5 · 10ms · 714.3 tok/s

































┃
┃ Subagents Shell Terminals esc
┃
┃ No active subagents
┃
┃
┃
┃
┃
┃ show inactive ctrl+a tabs ←/→
┃

27 changes: 27 additions & 0 deletions .iolaus/evidence/subagent-batch-grouping/live-final/receipt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"verdict": "FAIL",
"failure": "Error: timeout: plan finished\n at until (file:///Users/Bryan/Programme/Project/AI/opencode-iolaus-wt/iolaus-subagent-batch-grouping/script/qa-subagent-batches.mjs:23:9)\n at async submit (file:///Users/Bryan/Programme/Project/AI/opencode-iolaus-wt/iolaus-subagent-batch-grouping/script/qa-subagent-batches.mjs:92:18)\n at async file:///Users/Bryan/Programme/Project/AI/opencode-iolaus-wt/iolaus-subagent-batch-grouping/script/qa-subagent-batches.mjs:130:3",
"version": "opencode v2.2.1",
"checks": [
"One real user request: 2 parallel + 10 sequential calls share one request batch; next request isolates old failure/count/time; stable 1..12 definition order"
],
"isolation": [
{
"pids": [
99906,
99931
],
"databasePaths": [
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-l6LBXN/data/opencode/opencode.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-l6LBXN/home/.iolaus/iolaus.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-l6LBXN/data/opencode/opencode.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-l6LBXN/data/opencode/opencode.db-wal",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-l6LBXN/home/.iolaus/iolaus.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-l6LBXN/home/.iolaus/iolaus.db-wal"
]
}
],
"hostConfigUnchanged": true,
"remainingSandboxProcesses": "",
"sandboxRemoved": true
}
61 changes: 61 additions & 0 deletions .iolaus/evidence/subagent-batch-grouping/live-initial/receipt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"verdict": "PASS",
"version": "opencode v2.2.1",
"checks": [
"One real user request: 2 parallel + 10 sequential calls share one request batch; next request isolates old failure/count/time; stable 1..12 definition order",
"Native nesting inherits exact observed run and local parent edge",
"Two scheduled flows keep distinct observed batches, including nested descendants; scheduled definitions unchanged; no cross-group edges",
"Host restart/reload: later-request explicit native followup reopens original node, descendant inherits original batch, no new followup batch",
"Scheduled continuation guard still refuses before observation",
"Seeded isolated legacy unkeyed aggregate retained without reassignment or append",
"Real 2.2 tool hooks expose current assistant in delivered context; persisted user IDs used instead of admission or assistant IDs",
"Real TUI labels observed details as Calls/request; Enter still opens direct child"
],
"isolation": [
{
"pids": [
97672,
97702
],
"databasePaths": [
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/data/opencode/opencode.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/home/.iolaus/iolaus.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/data/opencode/opencode.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/data/opencode/opencode.db-wal",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/home/.iolaus/iolaus.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/home/.iolaus/iolaus.db-wal"
]
},
{
"pids": [
98391,
98415
],
"databasePaths": [
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/data/opencode/opencode.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/home/.iolaus/iolaus.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/data/opencode/opencode.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/data/opencode/opencode.db-wal",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/home/.iolaus/iolaus.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/home/.iolaus/iolaus.db-wal"
]
},
{
"pids": [
98714,
98740
],
"databasePaths": [
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/data/opencode/opencode.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/home/.iolaus/iolaus.db-shm",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/data/opencode/opencode.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/data/opencode/opencode.db-wal",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/home/.iolaus/iolaus.db",
"/private/var/folders/cy/qc1d9pgd1hq599hhhw_z2l2w0000gn/T/iolaus-batches-nnHhqQ/home/.iolaus/iolaus.db-wal"
]
}
],
"hostConfigUnchanged": true,
"remainingSandboxProcesses": "",
"sandboxRemoved": true
}
Loading
Loading