Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
209 commits
Select commit Hold shift + click to select a range
b4dd288
fix(tests): make incremental-parse cwd-independent; accept bun or bro…
AnzoBenjamin Sep 21, 2026
40fbd88
fix: make write_audit_findings wire JSON Schema pattern-portable
AnzoBenjamin Sep 22, 2026
43a6bef
docs: refresh knowledge for write_audit_findings wire-schema contract
AnzoBenjamin Sep 22, 2026
a5637fa
feat: M1 of our improvements
AnzoBenjamin Sep 23, 2026
af4f809
fix: close gate-robustness gaps (Q2/Q4) in reviewer lifecycle
AnzoBenjamin Sep 23, 2026
2a002d2
fix: complete M3 remediation waves, gate repair cycles, and watchdog/…
AnzoBenjamin Sep 23, 2026
becc9e0
fix: land M4 wave — bounded perf guards, benchmark evidence, CLI repairs
AnzoBenjamin Sep 24, 2026
6af3339
fix: spawn-settle flake fix, pre-push gate fixes, M3-T2 benchmark
AnzoBenjamin Sep 24, 2026
31d1899
fix: certify M3-T2 wave with scan-cap tests, honest benchmark notes
AnzoBenjamin Sep 24, 2026
32e3584
Merge branch 'main' into fix/env-test-drift
AnzoBenjamin Sep 24, 2026
9700a54
fix: certify M3-T3 wave — drain/TOCTOU/guarded-submit tests + sdk/cli…
AnzoBenjamin Sep 24, 2026
e0e5d8f
fix: wire teardownE2eMocks into agents/e2e suites (bleed-parity)
AnzoBenjamin Sep 24, 2026
ff3edc9
docs: cli knowledge refresh for M3-T3 test wave (memory-drift guard)
AnzoBenjamin Sep 24, 2026
b5b6877
docs: session plan bookkeeping — M1-T7 claimed for committed-surface …
AnzoBenjamin Sep 24, 2026
8ee29f5
fix: CI green — sanitize flake-ledger artifact name, hermetic dead-pi…
AnzoBenjamin Sep 24, 2026
ec97559
fix: addressing our timing out tests
AnzoBenjamin Sep 25, 2026
b702e34
fix: addressing our failing tests
AnzoBenjamin Sep 25, 2026
78523a5
fix: addressing our failing tests
AnzoBenjamin Sep 25, 2026
bca04eb
fix: addressing our failing tests
AnzoBenjamin Sep 25, 2026
0dec8a9
fix: harden CLI auto-update flow and lift editor output ceiling
AnzoBenjamin Sep 25, 2026
cf0b27e
docs: refresh cli/common knowledge staleness entries for wrapper hard…
AnzoBenjamin Sep 25, 2026
7b1955a
Merge branch 'main' into fix/env-test-drift
AnzoBenjamin Sep 25, 2026
3a232de
feat: group discovery tool output into collapsible sections
AnzoBenjamin Sep 25, 2026
093fcee
fix: keep editor receipts and subagent crashes from failing the paren…
AnzoBenjamin Sep 25, 2026
feff3fd
Merge remote-tracking branch 'origin/fix/env-test-drift' into fix/env…
AnzoBenjamin Sep 25, 2026
fb5827c
docs: refresh cli knowledge for grouped discovery rendering
AnzoBenjamin Sep 25, 2026
059fd22
Merge branch 'main' into fix/env-test-drift
AnzoBenjamin Sep 25, 2026
bb96323
fix: retry empty LLM streams, harden spawn receipts, and forward prov…
AnzoBenjamin Sep 25, 2026
bc7af03
fix(harness): M4-S6/M5-T7 sweeps + audit/subagent resilience
AnzoBenjamin Sep 25, 2026
3ee631e
docs(knowledge): refresh cli/common staleness entries for M4-S6/M5-T7…
AnzoBenjamin Sep 25, 2026
79ba767
fix(agents): preserve repair finding attestations
AnzoBenjamin Sep 26, 2026
c872635
feat(security): isolate child env secrets and gate client MCP configs
AnzoBenjamin Sep 26, 2026
10e048a
fix(security): gate Chrome --no-sandbox in browser_logs (SB-7)
AnzoBenjamin Sep 26, 2026
ba65225
fix(mcp): rename client identity from codebuff to openbuff
AnzoBenjamin Sep 26, 2026
ad75fa6
feat(preflight): tree-sitter syntax check for 10 more languages
AnzoBenjamin Sep 26, 2026
398a77a
fix(p0-t7): dedupe MCP merge, async diff-stats, bg cost, buffbench docs
AnzoBenjamin Sep 26, 2026
6da9561
feat(p0-t6,p0-t7): shared language-family helper + stats gate
AnzoBenjamin Sep 26, 2026
b30dcfd
fix(p0-t2,li-11): one-shot approval keeps profile; parse .c grammar
AnzoBenjamin Sep 26, 2026
e66f2f0
feat(p0-t3,p0-t4): tmux bash -n guard; CDP pipe transport (SB-5,SB-7)
AnzoBenjamin Sep 26, 2026
92039a5
feat(p0-t8): structured JSON/SARIF diagnostic parsers (LI-05)
AnzoBenjamin Sep 26, 2026
04536f5
feat(p1-t2): MCP origin registry + single connect-time $VAR resolve
AnzoBenjamin Sep 27, 2026
4426d6c
fix(sb2): strip generic provider keys from child + blender env
AnzoBenjamin Sep 27, 2026
9042071
fix(sec-5): bind terminal-command approvals to the exact command hash
AnzoBenjamin Sep 27, 2026
823eab6
fix(sec-3): block client-origin MCP SSRF targets; delimit untrusted t…
AnzoBenjamin Sep 27, 2026
fb69c5e
docs(knowledge): refresh common + cli staleness-guard entries
AnzoBenjamin Sep 27, 2026
1ffbaa5
feat(X1-X6): cross-cutting foundations + P0-T5 EV-3 gate
AnzoBenjamin Sep 27, 2026
7b88a3d
test(x1): pin CODEBUFF_RG_PATH env-override contract with golden vectors
AnzoBenjamin Sep 27, 2026
74452d4
docs(plan): mark the X-1 rg env-override vector as landed
AnzoBenjamin Sep 27, 2026
2c64602
feat(x5): sidecar supervisor (completes the X-1…X-6 commit)
AnzoBenjamin Sep 27, 2026
cf28111
chore(tools): regenerate tool-definition mirrors after the X-1 mapper…
AnzoBenjamin Sep 27, 2026
6b28691
docs(knowledge): refresh staleness entries; track the .agents tools m…
AnzoBenjamin Sep 27, 2026
d63c3a0
feat(p1-t1): ACP v1 agent skeleton on @agentclientprotocol/sdk
AnzoBenjamin Sep 27, 2026
b884aba
chore(p1-t1): track bun.lock for the ACP dependency; reconcile roadma…
AnzoBenjamin Sep 27, 2026
8ac23e0
feat(p1-t1): session/load, reverse requests, and Openbuff ACP extensi…
AnzoBenjamin Sep 27, 2026
36c7365
feat(acp): live session-data store for getReceipts/gateState extensio…
AnzoBenjamin Sep 27, 2026
ee7def8
feat(acp): durable per-session receipt journal for session/load restore
AnzoBenjamin Sep 27, 2026
acf89a5
feat(p1-t2): first-call approval gate for client-origin MCP tools
AnzoBenjamin Sep 27, 2026
b6705a2
feat(acp): wire durable journal restore into session/load
AnzoBenjamin Sep 27, 2026
7b9711c
feat(p1-t2): openbuff serve ACP bridge (stdio + unix-socket) with ses…
AnzoBenjamin Sep 28, 2026
92cd6cb
docs(cli): refresh knowledge.md staleness touch for serve subcommand
AnzoBenjamin Sep 28, 2026
dc929c2
Merge branch 'main' into feat/polyglot-reaudit-roadmap
AnzoBenjamin Sep 28, 2026
696a91a
feat(p1-t2): wire openbuff serve into the CLI + client-origin MCP mar…
AnzoBenjamin Sep 28, 2026
c31bc61
docs(cli): refresh knowledge.md staleness touch for serve dispatch wi…
AnzoBenjamin Sep 28, 2026
782def7
feat(p1-t2): attach client MCP servers to serve runs + serve agent se…
AnzoBenjamin Sep 28, 2026
c62d377
docs(cli): refresh knowledge.md for serve mcp attach + agent selection
AnzoBenjamin Sep 28, 2026
303a363
feat(pr-t1): typed handoff outcome on runtime receipts (D19)
AnzoBenjamin Sep 28, 2026
bac0e6e
feat(spawn): last_message fragment merge + oversize output artifact s…
AnzoBenjamin Sep 28, 2026
590875a
feat(tools): schema-driven unserialize of stringified JSON tool args
AnzoBenjamin Sep 28, 2026
c25aefc
feat(edit): plain-text SEARCH/REPLACE edit blocks behind OPENBUFF_EDI…
AnzoBenjamin Sep 28, 2026
94fd0e1
feat(gate): content-hash review receipts + docs-only reviewer skip (P…
AnzoBenjamin Sep 28, 2026
5ed94fc
fix(pruner): guard non-object JSON part values in tool summaries (PR-…
AnzoBenjamin Sep 28, 2026
98c5eed
feat(pruner): knowledge-memory retention floor + D21 walker regressio…
AnzoBenjamin Sep 28, 2026
6918fe9
feat(archive): evicted tool results become retrievable records + mult…
AnzoBenjamin Sep 28, 2026
57f95ae
feat(recall): FTS5-indexed recall_context over compaction archives (C…
AnzoBenjamin Sep 28, 2026
30cbfc9
test(p2-t2): pin compaction-archive cross-session persistence (CQ-T2/…
AnzoBenjamin Sep 28, 2026
7ab227a
docs(plan): record P2-T2 archive-persistence slice (CQ-T2/D26 durabil…
AnzoBenjamin Sep 28, 2026
cb89f42
fix(cli): word-boundary credential-key redaction keeps token/secret m…
AnzoBenjamin Sep 28, 2026
c2a58d0
feat(runtime): inject IdGen through AgentRuntimeDeps (P2-T1 slice 1) …
AnzoBenjamin Sep 28, 2026
0e5352d
fix(sdk): declare @types/ws devDependency to fix CI typecheck
AnzoBenjamin Sep 28, 2026
c646f19
fix(sdk): unbreak SDK dts build (bun:sqlite ts-ignore + Client-free M…
AnzoBenjamin Sep 28, 2026
4962bb3
fix(ci): lazy edit-blocks surface + mtime-deterministic indexer test
AnzoBenjamin Sep 28, 2026
f27a782
feat(agent-runtime): inject Clock through AgentRuntimeDeps (P2-T1 clo…
AnzoBenjamin Sep 28, 2026
25cce87
docs(common): note P2-T1 Clock injection, refresh drift staleness
AnzoBenjamin Sep 28, 2026
c2fc512
feat(agent-runtime): append-only run journal on bun:sqlite (P2-T2 sli…
AnzoBenjamin Sep 28, 2026
d0110ce
docs(common): note P2-T2 run journal contracts + refresh memory-drift…
AnzoBenjamin Sep 28, 2026
a2cca2e
feat(scripts): determinism enforcement guard for agent-runtime (P2-T1…
AnzoBenjamin Sep 28, 2026
1221c7e
feat(agent-runtime): journal fidelity — real stepNumber + full LLM pa…
AnzoBenjamin Sep 28, 2026
a195166
feat(agent-runtime): child-journal resume planning (P2-T2 slice 2)
AnzoBenjamin Sep 28, 2026
b39b369
feat(agent-runtime): thread Clock through deferred timestamp sites (P…
AnzoBenjamin Sep 28, 2026
1df5c91
feat(agent-runtime): finish Clock threading for deferred timestamp ca…
AnzoBenjamin Sep 28, 2026
5297315
feat(agent-runtime): background-agent resume policy for run journal (…
AnzoBenjamin Sep 28, 2026
8e0767c
feat(agent-runtime): loop-entry run-journal resume report (P2-T2)
AnzoBenjamin Sep 28, 2026
e3949f6
docs(plan): record P2-T1b finish, P2-T2 slice 3 and loop-entry resume…
AnzoBenjamin Sep 28, 2026
d2b2bf4
feat: roadmap language-fit audit acceptance and reliability hardening
AnzoBenjamin Sep 30, 2026
bb648e3
feat(cli): OpenTUI 0.5.12 Stage 1 — renderer/pins flip with fail-clos…
AnzoBenjamin Sep 30, 2026
34635e9
feat(cli): OpenTUI 0.5.12 Stage 2 — native markdown rendering with le…
AnzoBenjamin Sep 30, 2026
6c00394
feat(cli): OpenTUI 0.5.12 Stage 3 — native diff renderable + drop leg…
AnzoBenjamin Sep 30, 2026
d96bf36
feat(cli): OpenTUI 0.5.12 Stage 4 — native image renderable + drop re…
AnzoBenjamin Sep 30, 2026
9d392f7
test(cli): fix cross-file mock pollution in image-block tests
AnzoBenjamin Sep 30, 2026
f9f4381
docs(cli): refresh knowledge.md for OpenTUI 0.5 native renderables (D…
AnzoBenjamin Sep 30, 2026
152062a
feat(cli): OpenTUI 0.5.12 Stage 5 — OPENTUI_LIBC-aware native bundlin…
AnzoBenjamin Sep 30, 2026
a5bc39c
docs(cli): knowledge refresh for D47 Stage 5 packaging (staleness gua…
AnzoBenjamin Sep 30, 2026
dcd21fd
feat: ACP ext-v1 protocol + event bridge, journal replay driver, nati…
AnzoBenjamin Sep 30, 2026
61117e8
docs(cli): knowledge refresh for the native code renderer (four-strea…
AnzoBenjamin Sep 30, 2026
3c3313a
docs(common): knowledge refresh for the ext-v1 protocol module
AnzoBenjamin Sep 30, 2026
969cbb1
feat(sdk,cli): ACP serve ext-v1 methods, streaming security, and serv…
AnzoBenjamin Sep 30, 2026
150c92d
docs(cli): knowledge refresh for the P1-T2 serve-trust + credentialEn…
AnzoBenjamin Sep 30, 2026
9cff454
feat(sdk,cli): openbuff mcp stdio MCP server (read-only, P1-T4)
AnzoBenjamin Oct 1, 2026
79a3fa0
docs(cli): knowledge refresh for the P1-T4 openbuff mcp wave
AnzoBenjamin Oct 1, 2026
92b9d64
feat(cli,sdk): P1-T5 headless/CI `openbuff run` + opt-in `openbuff mc…
AnzoBenjamin Oct 1, 2026
0da1ebf
feat(sdk,cli,agent-runtime): P1-T3 protocol client binding + P2-T2 jo…
AnzoBenjamin Oct 1, 2026
ff9b074
docs(cli,common): knowledge refresh for the P1-T3 + P2-T2 wave
AnzoBenjamin Oct 1, 2026
0e5cb8e
fix sdk build: structural McpServer + indexer paths; add openbuff rep…
AnzoBenjamin Oct 1, 2026
e985381
fix test-sdk CI holdback expectation; wire P1-T7 notifications; add /…
AnzoBenjamin Oct 1, 2026
7895cef
fix(base2): mtime-granularity-tolerant gate marker cache (test-agents…
AnzoBenjamin Oct 1, 2026
47c2381
fix cli .scm test crash (local bunfig preload); add detach-on-exit
AnzoBenjamin Oct 1, 2026
27b2def
docs(cli): reword knowledge entry so the memory-drift guard passes
AnzoBenjamin Oct 1, 2026
a62135c
fix(code-map): load tree-sitter queries via fs at query-load time (re…
AnzoBenjamin Oct 1, 2026
1dde21b
chore(bunfig): drop setup-scm-loader preloads (queries load via fs at…
AnzoBenjamin Oct 1, 2026
d94fa38
fix(code-map): restore tree-sitter query loading under Bun (regressio…
AnzoBenjamin Oct 1, 2026
2e4c8c9
fix(cli,tests): spread real codebuff-client exports in mock.module stub
AnzoBenjamin Oct 1, 2026
84f4f67
feat(cli): turn snapshots v1 + mock.module leak hardening + flake fix
AnzoBenjamin Oct 1, 2026
1aa5666
feat(cli): shell turn snapshots + remaining mock.module leak hardening
AnzoBenjamin Oct 1, 2026
b61a839
feat(cli,sdk,common,agents): finish P1 roadmap through P1-T10
AnzoBenjamin Oct 1, 2026
b3c719d
feat(rust,sdk,cli): X-3b openbuff-native substrate + CI matrix, X-5 s…
AnzoBenjamin Oct 1, 2026
bfb370f
docs: fix pre-push memory-drift guard findings (README path + knowled…
AnzoBenjamin Oct 1, 2026
a8dda45
docs(common): repo-root-qualify src paths in 2026-10-01 knowledge entry
AnzoBenjamin Oct 1, 2026
2ed5b2c
ci(rust): fix cross-compile link failures in rust-workspace matrix
AnzoBenjamin Oct 1, 2026
bb6b0c2
ci(rust): use live macos-15-intel runner for darwin leg (macos-13 ret…
AnzoBenjamin Oct 2, 2026
3ad97a0
feat(cli): /bisect-turn bisection + fail-closed guards; fix --attach …
AnzoBenjamin Oct 2, 2026
3277391
feat(cli): /bisect-turn --keep-best; mark P2-T4 done in plan
AnzoBenjamin Oct 2, 2026
9182a84
feat(sdk,cli,agent-runtime,common): complete remaining P2 roadmap wave
AnzoBenjamin Oct 2, 2026
cbce70b
feat(sdk,cli,agent-runtime): land P2-T2/T7/T8 deferred sub-slices
AnzoBenjamin Oct 2, 2026
27cedc5
docs(common): knowledge refresh for P2-T7/T8 journal + supervision co…
AnzoBenjamin Oct 2, 2026
2be9e6b
feat(cli,agent-runtime): ship write-side journal retention + process-…
AnzoBenjamin Oct 2, 2026
b2de084
fix(sdk,agent-runtime): make declaration build compile without bun-types
AnzoBenjamin Oct 2, 2026
e58ba77
test(cli): make journal suite mock.module stubs delegate unless armed
AnzoBenjamin Oct 2, 2026
8eda3f3
docs(cli): knowledge refresh 2026-10-02e for armed/delegating mock.mo…
AnzoBenjamin Oct 2, 2026
6f07222
test(cli): snapshot real exports before mock.module to stop test-cli …
AnzoBenjamin Oct 2, 2026
8df0aa4
docs(cli): document mock.module namespace-snapshot hang trap
AnzoBenjamin Oct 2, 2026
af756a0
test(cli): replace journal-suite mock.module stubs with spyOn
AnzoBenjamin Oct 3, 2026
38783aa
fix(cli): render markdown agent-card body at box level
AnzoBenjamin Oct 3, 2026
d4bbfec
feat(scripts): add guard:mock-module and wire into check-ci-local Step F
AnzoBenjamin Oct 3, 2026
224f237
test(cli,cix): make tsx render tests visible and leak-free in CI
AnzoBenjamin Oct 3, 2026
6f6dc33
test(cli): hide no more — cross-file mock leak fixes for the tsx CI wave
AnzoBenjamin Oct 3, 2026
b9f3cec
test(cli): disarm the remaining tree-sitter stubs and drain the oauth…
AnzoBenjamin Oct 3, 2026
1351144
feat(cli): test-only OAuth redirect-port seam + per-test ports
AnzoBenjamin Oct 3, 2026
b4e8e92
test(cli,sdk,agent-runtime): harden registry-wide mock.module leaks a…
AnzoBenjamin Oct 3, 2026
c636c70
feat(scripts): mock-module-guard second check + comment stripping
AnzoBenjamin Oct 3, 2026
85d7045
docs: testing.md Test-infra notes + knowledge refresh 2026-10-04
AnzoBenjamin Oct 3, 2026
c207611
docs: reword sdk dist-artifact mentions for the memory-drift path che…
AnzoBenjamin Oct 3, 2026
e36884b
test(cli): arm/delegate the remaining intentional mock.module stubs
AnzoBenjamin Oct 3, 2026
1b44b9b
feat(cli): test-only seams for logger and tree-sitter singleton state
AnzoBenjamin Oct 3, 2026
f6544ff
ci: build sdk dist only for cli matrix entries
AnzoBenjamin Oct 3, 2026
e6799cf
docs: knowledge refresh 2026-10-04b
AnzoBenjamin Oct 3, 2026
68e000f
feat: implement P3 semantic code intelligence (LSP, SCIP, PageRank, t…
AnzoBenjamin Oct 3, 2026
0b91f10
fix: register LSP tools in neutral tier and sanitize preflight env
AnzoBenjamin Oct 3, 2026
ed333c2
fix: remediate P3 audit findings (LSP wiring, bounded IO, hardening, …
AnzoBenjamin Oct 4, 2026
049eb84
fix: update base2 disclosure expected surfaces for the four LSP tools
AnzoBenjamin Oct 4, 2026
bca9392
fix: P3 advisory fixes + F1/F4/LSP-fixture pins + OpenAI token calibr…
AnzoBenjamin Oct 4, 2026
6df7be0
chore: register calibrate:openai-tokens script for memory-drift coverage
AnzoBenjamin Oct 4, 2026
538db85
fix: perf-baseline assertions throw for library callers; CASE 13 slac…
AnzoBenjamin Oct 4, 2026
02eab54
fix: remediate deep-audit findings across security, correctness, and …
AnzoBenjamin Oct 4, 2026
4800c19
fix: sync tools.ts mirror and refresh knowledge staleness entries
AnzoBenjamin Oct 4, 2026
221bb24
fix: clear check:ci-local gates blocking the roadmap branch push
AnzoBenjamin Oct 4, 2026
cc60dda
docs(cli): refresh knowledge.md for 221bb2455 gate remediation
AnzoBenjamin Oct 4, 2026
2ee002b
refactor(agent-runtime): address reviewer advisories in spawn-agent-u…
AnzoBenjamin Oct 4, 2026
0f57cb0
fix: arm-gate test mocks to stop cross-suite worker leaks
AnzoBenjamin Oct 5, 2026
d870ebe
fix: land P3 coherence-audit remediation wave across sdk, indexer, an…
AnzoBenjamin Oct 5, 2026
2120d7e
docs: refresh cli/common knowledge files for P3 coherence-audit wave …
AnzoBenjamin Oct 5, 2026
1d300d0
fix: land P2 coherence-audit remediation wave across supervision, das…
AnzoBenjamin Oct 5, 2026
3c66467
feat(agent-runtime): add supervised restart policy and incremental st…
AnzoBenjamin Oct 5, 2026
fa57188
feat(sdk): wire bounded supervised-spawn restart policy
AnzoBenjamin Oct 5, 2026
435be74
feat(sdk): default process supervision on where the child can launch
AnzoBenjamin Oct 6, 2026
90a94f0
docs: refresh cli/common knowledge files for P2 coherence-audit wave
AnzoBenjamin Oct 6, 2026
1566514
fix(agent-runtime): keep context-pruner children in-process under fla…
AnzoBenjamin Oct 6, 2026
c714384
feat(agent-runtime): add supervised self-exec child mode for compiled…
AnzoBenjamin Oct 6, 2026
04b113b
docs: refresh cli/knowledge.md for P2-T8d self-exec wave (staleness g…
AnzoBenjamin Oct 6, 2026
f8c7901
fix(agent-runtime): kill child on internal error before settling crash
AnzoBenjamin Oct 6, 2026
9e9b4c2
fix(cli): render markdown text blocks at box level (fixes TextNodeRen…
AnzoBenjamin Oct 6, 2026
c768606
fix(cli): memoize native SyntaxStyle per palette (fixes streaming mem…
AnzoBenjamin Oct 6, 2026
d2515cd
fix(perf): memoize syntax styles + event-loop yield gates in indexer
AnzoBenjamin Oct 6, 2026
43550b5
fix(code-map): memoize tree-sitter grammars before query load
AnzoBenjamin Oct 6, 2026
5cac84a
docs(cli): refresh knowledge.md (grammar memoization note)
AnzoBenjamin Oct 6, 2026
840bee1
fix(indexer): make getStatus a read-only peek + pin cross-root index …
AnzoBenjamin Oct 6, 2026
513b9d4
docs(indexer): correct adoptMergedIndex lost-CAS + epoch doc wording …
AnzoBenjamin Oct 6, 2026
843666c
fix(cli): rework viewport virtualization on measured heights (fixes s…
AnzoBenjamin Oct 7, 2026
98e4adc
fix(agent-runtime,cli): repair agent spawn crashes + scroll snap-back
AnzoBenjamin Oct 7, 2026
bee1afc
fix(runtime,cli,indexer,sdk): spawn, scroll, index caps, parse budget
AnzoBenjamin Oct 7, 2026
4ec550a
fix(cli): clamp OSC probe timers to the shared global deadline (fixes…
AnzoBenjamin Oct 7, 2026
b077fde
docs(knowledge): staleness guard touches for 4ec550a42 and bee1afc9a
AnzoBenjamin Oct 7, 2026
14ee99b
test(sdk): spread real code-map/parse exports in session-state mocks …
AnzoBenjamin Oct 7, 2026
079d190
fix(common,agent-runtime): re-coerce degraded zod husks at the spawn …
AnzoBenjamin Oct 7, 2026
a0c7025
fix(common,agent-runtime): serialize transport schemas with unreprese…
AnzoBenjamin Oct 7, 2026
509ad46
fix(agent-runtime): rehydrate zod schemas at child spawn entry boundary
AnzoBenjamin Oct 8, 2026
d503dc9
fix(cli): cap paste/overflow output and bound index-status peek cache
AnzoBenjamin Oct 8, 2026
0779b8c
fix(agents,agent-runtime): harvest fragmented thinker output and hard…
AnzoBenjamin Oct 8, 2026
5016f3f
feat(cli): render spawn-agent outputs as text and show live prompt hints
AnzoBenjamin Oct 8, 2026
5d2b52e
feat(cli): render librarian agent output as human-readable text
AnzoBenjamin Oct 8, 2026
ee48519
fix(cli): guard markdown before <text> wrap and fix streaming scan al…
AnzoBenjamin Oct 9, 2026
02470a8
feat: harness audit — token pricing, MCP gates, browser-use perms, ba…
AnzoBenjamin Oct 9, 2026
2937ddb
chore: touch knowledge.md files to satisfy memory-drift guard
AnzoBenjamin Oct 9, 2026
7a18f25
fix(agents): update basher and audit-contracts tests for new defaults
AnzoBenjamin Oct 9, 2026
cf067f3
fix(cli,indexer): expand subagent streams; stop false idx-degraded
AnzoBenjamin Oct 9, 2026
fc94169
docs(cli): refresh knowledge.md for subagent-stream + idx fixes
AnzoBenjamin Oct 9, 2026
67a7527
fix(common): harden agent-template schema members across the JSON spa…
AnzoBenjamin Oct 9, 2026
ef416ea
docs(common): refresh knowledge.md for agent-validation hardening (me…
AnzoBenjamin Oct 9, 2026
5cad9fb
fix(runtime,common): idle-aware supervised deadline + total schema tr…
AnzoBenjamin Oct 9, 2026
32cbacb
fix(common): transport unrepresentable-emission schemas verbatim; chi…
AnzoBenjamin Oct 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
282 changes: 282 additions & 0 deletions .agents/sessions/audit-phases-p0-p3-2026-10/AUDIT-REPORT.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

145 changes: 145 additions & 0 deletions .agents/sessions/audit-phases-p0-p3-2026-10/findings/shard-p1-cli.md

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

95 changes: 95 additions & 0 deletions .agents/sessions/audit-polyglot-2026-09/AUDIT-REPORT.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Audit findings: shard-agent-runtime

- Subsystems: agent-runtime.agent-loop, agent-runtime.streaming-parse, agent-runtime.token-counting, agent-runtime.context-management, agent-runtime.edit-transaction, agent-runtime.background-jobs, agent-runtime.orchestration, agent-runtime.sandboxing
- Features: xml-tool-call-streaming-parser, bpe-token-estimation, handleSteps-generator-re-drive, quickjs-isolation-P9-T4, background-agent-jobs-supervision, orchestration-ledger, preflight-syntax-validation, edit-transaction-machinery, semantic-compaction-governor, base2-gate-workflow, agent-attempt-selection
- Files covered: 16
- Snapshot: 4fc76b0bd48a0b11d651b8f4647bb302dc95344c8b5749411ed1f5fcc3e7a0ba

## [MEDIUM] performance — packages/agent-runtime/src/util/token-counter.ts — BPE token estimation is a pure CPU-bound kernel where a Rust tiktoken binding would make counts exact and fast
- **Risk:** Counts are estimates, not real tokenization: per-family fudge factors (1.35 Anthropic / 1.1 Gemini / 1.0 OpenAI) approximate provider tokenizers and the 20k-char sample extrapolation adds ~2% error on mixed content, so compaction trigger/eviction decisions near budget boundaries can flip on estimate error alone. The pathological-input cap (MAX_BPE_ENCODE_CHARS=100k, 20k sample) exists only because gpt-tokenizer's JS BPE is pathologically slow — a 5MB body previously stalled CI >2 minutes. All of this cost and error is concentrated in a pure, side-effect-free function.
- **Fix:** Move BPE encoding into a Rust tiktoken napi/WASM kernel exposing exact per-model tokenizer counts; keep the TS LRU cache, WeakMap incremental counter, and fudge-factor fallback as the degradation path. Difficulty: low-medium (pure function, clean interface, existing measure scripts to validate parity).
- **Evidence:** token-counter.ts:27-70 (MAX_BPE_ENCODE_CHARS doc: 'a single ~5MB tool-result body measured >2 minutes per encode locally and stalled the CI agent-runtime suite'; BPE_SAMPLE_CHARS: 'stays within ~2% for mixed prose/code'); :80-103 (fudgeFactorForModel constants 1.35/1.0/1.1); :60-66 (dependency comment 'gpt-tokenizer's BPE is pathologically slow')

## [MEDIUM] security — packages/agent-runtime/src/run-programmatic-step.ts — handleSteps re-drive runs non-serializable in-process generators via new Function in the host realm; QuickJS (P9-T4) should be a persistent VM with bytecode serialization, not just an isolate
- **Risk:** String handleSteps executes in the host realm via new Function, so untrusted/compromised template code reaches host globals (ORCH-2 test documents this as current behavior; the trust allowlist only gates provenance, not capability). Generator state lives in a module-level in-memory registry: abnormal exits leak the generator, a recycled runId can resume a stale generator (the code warns on this collision), and a process restart silently discards all in-flight programmatic state. A persistent QuickJS VM per run unlocks true isolation (host globals unreachable) AND true generator serialization/replay (JS_WriteObject bytecode serialization / heap snapshots), replacing the leak- and collision-prone registry with durable, resumable state — a benefit the SPEC's isolation framing alone does not capture.
- **Fix:** Implement P9-T4 as a persistent per-run QuickJS VM (not per-step instantiation): hold the VM across STEP/STEP_ALL yields like the current registry does, keep HandleStepsYieldValueSchema as the host<->VM boundary, and use QuickJS bytecode/heap serialization to checkpoint generator state for durable resume. Difficulty: medium-high (yield marshaling, async tool-call plumbing across the boundary).
- **Evidence:** run-programmatic-step.ts:55-57 ('Generator state can't be serialized, so we store it in memory'), :61-134 (AgentRunContextRegistry incl. runIdToOwnerAgentId collision detection), :318-327 ('new Function' materialization + TRUSTED_STRING_HANDLE_STEPS_EXECUTION_SOURCES allowlist), __tests__/sandbox-generator.test.ts:154-159 (ORCH-2: 'string handleSteps generator runs in the host realm via new Function, so host globals ARE reachable... test should be INVERTED when a real QuickJS/isolate sandbox lands')

## [MEDIUM] state-mutation — packages/agent-runtime/src/util/background-agent-jobs.ts — Background-agent supervision is an in-process Map + view-owned AbortControllers; crash recovery is reconcile-and-mark-interrupted, not real supervision
- **Risk:** Cancel authority for a running background agent lives on an in-process adapter view; the sweep must special-case non-terminal views or cancellation is stranded. On process crash, every running agent is lost and recovery is reconcile-and-mark-'interrupted' — no OS-level process tree survives to be reaped, killed, or resource-capped. Caps (MAX_RUNNING_BACKGROUND_AGENT_JOBS, per-root limits, TTL sweeps) are application heuristics standing in for OS accounting. This is exactly the supervision gap the SPEC's Rust jobd assignment exists to fill, but the SPEC should state that supervision of agent runs — not just job spawning — migrates to jobd.
- **Fix:** Keep this module as a thin TS adapter, but plan migrating supervision (not just launch) to the Rust jobd: child process per long-lived agent job, PID/cgroup tracking, hard kill, crash-survivable job state. Difficulty: medium-high (in-process async-generator agents would need a process or worker boundary; chunk streaming becomes IPC).
- **Evidence:** background-agent-jobs.ts:263-267 ('the view owns this job's AbortController, so dropping the view of a job whose core state is non-terminal would leave nothing able to cancel it'), :269-304 (sweepBackgroundAgentJobs heuristic eviction), :611-622 (reconcileInterruptedBackgroundAgentIntents), orchestration-ledger.ts:100-134 (reconcileInterruptedLedgerSpawns marks spawns 'interrupted' on resume)

## [MEDIUM] correctness — packages/agent-runtime/src/util/preflight-syntax-validation.ts — Preflight syntax validation is Bun-only for JS/TS (fails open in Node) and heuristic-only for Python/Go; tree-sitter via Rust closes both gaps
- **Risk:** In Node deployments, malformed JS/TS edits pass preflight (fail-open), enabling the exact cascade of stacked broken edits the gate exists to prevent; the hand-rolled Python indent/delimiter and Go block heuristics have both false positives and false negatives versus real parsers. A Rust tree-sitter binding (already present via @codebuff/code-map for other languages) would give uniform real grammar validation across JS/TS/Python/Go and remove the Bun-only dependency.
- **Fix:** Route all languages through the tree-sitter grammars already exposed via @codebuff/code-map (detectSyntaxErrorViaTreeSitter), with a Rust napi binding for parse throughput; keep Bun.Transpiler only as an optional fast path. Difficulty: low-medium. Aligns with SPEC's Rust index/code-intel assignment.
- **Evidence:** preflight-syntax-validation.ts:11-14 ('Bun.Transpiler is only available in the Bun runtime... skips preflight in Node'), :155-160 (fail-open 'valid: true' when Bun is undefined), :173-260 (validatePythonSyntax indent heuristics), :262-300 (validateGoSyntax heuristics)

## [LOW] performance — packages/agent-runtime/src/util/stream-xml-parser.ts — TS is clearly right for the streaming XML tool-call parser: bounded, allocation-light byte scanning at network cadence
- **Risk:** None material. Per-chunk work is O(chunk size) with a bounded tag-tail rescan window; total work is linear in payload; chunks arrive at LLM network cadence, so compute is orders of magnitude below transport latency. A Rust port would add a per-chunk FFI boundary whose marshaling cost exceeds the scan itself, for zero observable latency gain.
- **Fix:** None — keep TS. Do not spend roadmap capacity here.
- **Evidence:** stream-xml-parser.ts:44-58 (MAX_TAG_TAIL_CARRYOVER 'per-chunk rescan window ... stays O(tag length), not O(payload)'), :30-36 (bounded buffer + overflow discard framing), :214-247 (single-pass tag scans, zero-copy slices); tool-stream-parser.ts:107-130 (per-chunk parseStreamChunk call, streamed-through filteredText)

## [LOW] performance — packages/agent-runtime/src/process-edit-transaction.ts — Edit-transaction diff/patch kernel is a plausible future Rust napi kernel; the transaction orchestration itself belongs in TS
- **Risk:** The diff/patch kernel is O(n·m) on large files and the closest-match levenshtein fallback is O(n·m) in time/memory on large oldStrings, but these run per edit call (not per stream chunk) and the module's complexity is dominated by correctness logic (capability-token validation, failure classification, recovery guidance) that is deeply typed and protocol-coupled — a poor rewrite target.
- **Fix:** Optional future napi kernel (Rust 'similar' for diff, SIMD levenshtein) applied only above a size threshold; keep the transaction state machine, capability validation, and failure classification in TS. Difficulty: medium. Partially supports SPEC's Rust-kernel direction; no urgency.
- **Evidence:** process-edit-transaction.ts:1 ('import { applyPatch, createPatch, diffChars } from diff'), :374-379 (createPatch per changed file); process-str-replace.ts (levenshteinDistance/findClosestMatches fallback matching); structural-read.ts (stripStringsAndComments char scans)

## [LOW] api-contract — packages/agent-runtime/src/util/context-pruning.ts — Context-budget arithmetic must stay TS and should be codegen-shared, not language-ported (duplicated inline constants in the serialized pruner agent)
- **Risk:** Not a language-choice issue, but the protocol-first TS core carries a literal-duplication tax: context-pruning.ts explicitly maintains a hand-copied constant block inside the serialized context-pruner handleSteps, kept in sync only by an RF-3 test. Any language migration of budget arithmetic would multiply this sync burden.
- **Fix:** Codegen: emit the shared constant block from context-pruning.ts into the serialized agent source at build time, retiring the RF-3 sync test. No language change. Difficulty: low.
- **Evidence:** run-programmatic-step.ts:253-327 (orchestrationControlPlane injection 'because handleSteps is serialized and cannot import it'), context-pruning.ts:50-58 ('SINGLE SOURCE OF TRUTH ... re-copy to the pruner. Sync is guarded by RF-3 test ... until codegen/shared literal source is implemented')

## [LOW] error-handling — packages/agent-runtime/src/util/orchestration-ledger.ts — TS is clearly right for the orchestration ledger: tiny event-sourcing append with sha256 checksum; durability is bounded by AgentState, not language
- **Risk:** None justifying migration. The append/compaction/revision-conflict logic is small, zod-validated, and pure TS; checksum cost is trivial. Its durability is inherited from AgentState persistence, which is the actual weak point (see background-jobs finding), not the ledger code itself.
- **Fix:** Keep TS. If/when background-agent supervision moves to Rust jobd, ride the ledger's durability on the same durable store jobd owns rather than inventing a second one. Difficulty: n/a now.
- **Evidence:** orchestration-ledger.ts:17-21 (createHash('sha256').update(JSON.stringify(...))), :46-59 (zod-validated append, revision conflict throw), :28-44 (compactEvents bounded retention)

## [LOW] test-coverage — packages/agent-runtime/src/orchestration/workflow-engine.ts — TS is clearly right for the advisory workflow engine and agent-attempt selection; no language opportunity
- **Risk:** None. Both are small, pure, synchronous TS modules; the workflow engine is deliberately non-authoritative telemetry, and attempt selection is a plain filter/sort. Any rewrite (Rust/Go) would add a boundary across a Zod-validated protocol for no gain.
- **Fix:** None — keep TS in both.
- **Evidence:** workflow-engine.ts:1-10 ('ADVISORY / TELEMETRY-ONLY ... The controlling turn lifecycle ... lives in createBase2's serialized handleSteps generator'); select-agent-attempt.ts:66-115 (pure scoring sort)

## [LOW] performance — packages/agent-runtime/src/run-agent-step.ts — TS is clearly right for the agent loop drivers (loopAgentSteps / mainPrompt): I/O-bound orchestration dominated by LLM latency
- **Risk:** None from a language perspective: the loop is I/O-bound on LLM calls with per-iteration O(messages) accounting already mitigated by IncrementalTokenCounter (per-message WeakMap memoization) and the governor. The genuine risk here is complexity (a ~1800-line generator loop), which a language change would worsen, not fix.
- **Fix:** None on language. Treat any extraction of loop concerns as a TS refactor, not a polyglot migration.
- **Evidence:** run-agent-step.ts:1254-3044 (loopAgentSteps span), :1926-1947 region (IncrementalTokenCounter wiring replacing whole-history recounts); main-prompt.ts:27-167 (mainPrompt orchestration)

## [LOW] dependency-hygiene — packages/agent-runtime/src/util/token-counter.ts — gpt-tokenizer single-encoder dependency drives the whole fudge-factor and cap apparatus in token counting
- **Risk:** The module's design is shaped around one dependency limitation: a single gpt-4o BPE tokenizer plus three hand-tuned fudge factors to approximate other providers, a special-token escape hack (BPE_SPECIAL_TOKEN_ESCAPE), a cache band chosen to avoid the dependency's memory behavior, and a CI-stalling pathological input. This is dependency-driven complexity a real per-model tokenizer would eliminate.
- **Fix:** A Rust tiktoken napi kernel replaces this dependency outright and removes the fudge-factor approximation layer; alternatively add tiktoken-js only if a TS-only path is preferred. Difficulty: low-medium either way.
- **Evidence:** token-counter.ts:1 ('import { encode } from gpt-tokenizer/esm/model/gpt-4o'), :60-66 (dependency performance note), :80-103 (fudge factors compensating for the single-tokenizer approximation)

## Coverage receipt

### Subsystems
- agent-runtime.agent-loop
- agent-runtime.streaming-parse
- agent-runtime.token-counting
- agent-runtime.context-management
- agent-runtime.edit-transaction
- agent-runtime.background-jobs
- agent-runtime.orchestration
- agent-runtime.sandboxing

### Features
- xml-tool-call-streaming-parser
- bpe-token-estimation
- handleSteps-generator-re-drive
- quickjs-isolation-P9-T4
- background-agent-jobs-supervision
- orchestration-ledger
- preflight-syntax-validation
- edit-transaction-machinery
- semantic-compaction-governor
- base2-gate-workflow
- agent-attempt-selection

### Files
- packages/agent-runtime/src/run-agent-step.ts
- packages/agent-runtime/src/main-prompt.ts
- packages/agent-runtime/src/run-programmatic-step.ts
- packages/agent-runtime/src/tool-stream-parser.ts
- packages/agent-runtime/src/util/stream-xml-parser.ts
- packages/agent-runtime/src/util/token-counter.ts
- packages/agent-runtime/src/util/context-pruning.ts
- packages/agent-runtime/src/util/context-budget.ts
- packages/agent-runtime/src/process-edit-transaction.ts
- packages/agent-runtime/src/process-structured-edit.ts
- packages/agent-runtime/src/orchestration/workflow-engine.ts
- packages/agent-runtime/src/orchestration/select-agent-attempt.ts
- packages/agent-runtime/src/util/background-agent-jobs.ts
- packages/agent-runtime/src/util/orchestration-ledger.ts
- packages/agent-runtime/src/util/preflight-syntax-validation.ts
- packages/agent-runtime/src/__tests__/sandbox-generator.test.ts

### Domains
- security
- correctness
- state-mutation
- performance
- api-contract
- error-handling
- test-coverage
- dependency-hygiene
Loading
Loading