feat(overseer): hub-owned converse context from convo_turns - #106
feat(overseer): hub-owned converse context from convo_turns#106heavygee wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5097bcca66
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98ee43d13b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
98ee43d to
b43d7ca
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b43d7cad7e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Addressed remaining Codex P2s in
Hub: 39 pass (converseContext, overseer routes, overseerEntity). Web: OverseerChatDebugControls test pass. |
e62cb17 to
55ca5c5
Compare
d3770d5 to
99e4b40
Compare
55ca5c5 to
284c12c
Compare
99e4b40 to
4a76baa
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a76baaf09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const events = overseer.queryEvents({ | ||
| eventType: OVERSEER_CONVO_TURN_EVENT_TYPE, | ||
| limit: limit + 1 | ||
| }) |
There was a problem hiding this comment.
Select recent turns by timestamp before limiting
When more than limit + 1 turns exist and /overseer/convo-turns receives a delayed or backfilled ts, this still asks queryEvents for an ID-ordered limited window and only sorts that subset afterward. A late-inserted old turn can therefore displace a genuinely newer turn from hydration and brain context. Fresh evidence beyond the resolved thread is that queryEvents still executes ORDER BY id DESC LIMIT ?; query the window by ts DESC, id DESC before reversing it.
Useful? React with 👍 / 👎.
| }) | ||
| } | ||
| } | ||
| setTurns(next) |
There was a problem hiding this comment.
Preserve operator text after a rejected request
When overseerConverse rejects with a network error or a non-BrainUnavailableError server failure, finally clears loading, which reruns this hydration effect; because that failed exchange was not persisted, setTurns(next) removes the locally appended operator message while the input was already cleared. The operator consequently loses the question they may need to retry or copy. Refresh only after an acknowledged response, or retain/restore the failed operator text when merging the snapshot.
Useful? React with 👍 / 👎.
caff271 to
b3465a9
Compare
Assemble budgeted prior convo_turn history on every converse call so text/voice transports stop restarting cold. Add GET /converse/recent for talk-to hydrate; UI sends only the latest operator line. Fixes #105. Co-authored-by: Cursor <cursoragent@cursor.com>
- Rehydrate talk-to on every panel open; block send until hydrate settles - Report truncated when store query clips older turns (limit+1 probe) - Dedupe dangling operator retry after a completed pair without the broken preceding-role check
- Skip hub rehydrate while converse is in flight; re-sync after reply - Sort hydrated convo_turn window by ts (id tie-break), not id-only reverse - Persist offline/unconfigured brain replies via recordConvoTurn on the route - Complete dangling operator rows via completeConvoTurn when assembler dedupes Co-authored-by: Cursor <cursoragent@cursor.com>
1949d77 to
0ef4d51
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
Stacked on #104 (relay-ping / prefix fix). Review/merge after it.
Summary
convo_turnhistory on everyPOST /overseer/converseand keeps only the latest operator line from the client (transports no longer own the thread).GET /overseer/converse/recentfor talk-to / voice hydrate after reload.query_dispositions.Fixes #105.
Test plan
bun testhubconverseContext+ overseer routesbun run typecheck(cli/web/hub)/overseer— prior turns visible; follow-up question has prior contextIssues
Fixes #105
Made with Cursor