Files
dev/codex-rs/app-server-protocol
5f8f3a994a feat(reward-signals): content-free router-training feedback (#8)
Add a new `codex-reward-signals` crate and wire it into the TUI so the
Hanzo router gets production training feedback. Signals are content-free:
a response id, an enum, and (for ratings) a small integer — never any
prompt/response/file/code text.

Signals emitted:
- rating (1..3) on exit via a one-shot prompt; 0/Esc/Enter => dismiss
- regenerate on backtrack/re-run of a turn
- abandon on Ctrl+C interrupt mid-generation

The client POSTs {gateway_base}/v1/feedback with the same bearer token the
model client uses, fire-and-forget and silent on any failure. The exit
rating uses a bounded (<=1500ms) synchronous send since a detached task
would be killed on process exit. Gated to the Hanzo gateway; opt out via
HANZO_FEEDBACK=0|false|off or config `reward_signals = false`.

Response ids (previously discarded from ResponseEvent::Completed) are now
threaded through SamplingRequestResult -> turn state -> TurnCompleteEvent
-> app-server Turn.response_id -> ChatWidget.last_request_id.

Bumps hanzo-node to 0.6.53.

Co-authored-by: hanzo-dev <[email protected]>

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-16 10:31:48 -07:00
..