Skip to content

v2.2.3-preview.32

@benbrandt benbrandt tagged this 26 Oct 12:00
## Summary

Fourth standalone extraction from #655, after #676, #677, and #680
landed. **Two source files, +34/-27 lines.** Based directly on current
`main` (`1685cde`), preserving native child model reporting from #678.

Group the existing command/fuzzy-search/guardian reporters, image
bookkeeping, reasoning deduplication, and message-phase map into
`CodexItemStreamState`.

- Each event handler still allocates exactly one private instance, with
the same seven field types and initializers.
- Every existing access goes through that instance. No state sharing,
injection, lifetime extension, routing changes, or new standard-subagent
code is introduced.
- Plans, errors, tool-call tracking, session state, and subagent
ownership are untouched.

This makes the existing rendering-state boundary explicit and usable
today without landing the later lifecycle changes. It is not the change
that makes child rendering survive parent handler replacement; that
belongs in the complete live-subagent core.

## Behavior-preservation evidence

A source comparison against `main` verified that the constructor and all
method bodies are byte-identical after removing the added
`this.itemStreams.` prefix, and that all seven initializers match their
original declarations. The three reporter classes have no constructor
side effects.

No tests or snapshots were added, updated, or removed. Existing
event-driven suites provide the output-regression coverage, including
AIR and v1/v2 paths.

## Validation

- `npm ci --ignore-scripts`
- `npm run typecheck`
- `npm run build`
- `npm test`: **1,915 passed**, 36 skipped
- `npm run test:integration`: **7 passed**, with the real Codex 0.164.0
app-server and a local mock model
- `npm run bundle:all`: all six targets compile
- Live-model no-tool smoke: ACP text chunks formed
`item-state-refactor-ok`
- `git diff --check`

The full live-model E2E suite and execution of every cross-platform
binary were not run. Existing dependency audit findings are outside this
refactor.
Assets 2
Loading