Repository navigation
fix(agent,workbench): isolate unreadable recall records and rebind retired UI watches - #6638
Conversation
…tired UI watches Isolate per-record JSON/metadata decode errors in EventLog transcript/recall maintenance, RootStore session catalog outcome pagination, and agent-native Recall/catalog queries so historical records written under an earlier schema surface as Recall gaps or skipped catalog entries without breaking healthy sessions or introducing legacy decoders. Reset Client::binding_retired after owned-session refreshes, refresh stale UiScope/ApplicationHost bindings on read-only queries and subscriptions, and reconnect persistent workbench observation loops cleanly across service activation handoffs without flashing browser refresh errors. Historical local records can be migrated offline via the Python 3 stdlib script linked in the PR. Generated-by: Antigravity
421c92e to
63d7770
Compare
Astro-Han
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent. It is not an independent human review and does not replace one.
This is a focused follow-up on the terminal-list reconnection change at 63d7770f2d43f868c8ce0f916e03adae65ca9fe5.
P2: the new Stream<unknown> annotation breaks the product UI typecheck. It erases the typed watchList result before completed(outcome) and the subsequent resources/nextOffset access. The generated workbench UI check reports TS2345 at terminalState.ts:182 and TS18046 at lines 183–184. Preserve the stream's completion/result type across reconnects rather than widening it to unknown.
I checked the actual diff, the local Stream<T> and completed<T> definitions, and the hosted product logs. The parent 24d8efc6 passes the same generated UI typecheck in job 127001763523. After this merge, job 127020024355 fails with the three errors above; current rust-preview at 390360d0a3b4e9c605b1c3b895c79cb408f7cf49 still fails identically in job 127048365878. The affected file is byte-identical between this PR and the current branch.
I have not completed an independent review of the other Recall/rebinding changes, the offline migration script, or native recovery behavior, and I did not build the Rust/UI workspace locally. This finding concerns the confirmed product check regression.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
| await host.query('terminal', 'list', { sessionId: session, offset }), | ||
| ); | ||
| for (let reconnects = 0; current(); ) { | ||
| let opened: Stream<unknown> | null = null; |
There was a problem hiding this comment.
[P2] Keep the typed terminal completion stream across reconnects
Widening opened to Stream<unknown> discards the return type of host.subscribe('terminal', 'watchList', ...). After opened.next(), completed(outcome) no longer receives its required completed/failed union, and its result has no known resources or nextOffset. The normal generated workbench UI typecheck now fails with TS2345 at line 182 and TS18046 at lines 183–184. The parent product check passes; both the merge and current Rust branch fail at this same file. Retain an appropriately typed completion stream when adding the reconnect loop.
There was a problem hiding this comment.
Fixed by #6641. I checked the scoped const opened change and the successful product job 127128784359 at a98b7d485b2dcbd3ca0d8ffc89acc074627e8e0b: its actual log includes generation of the complete workbench ui_types project followed by a successful TypeScript check. This is more than the separate SDK acceptance check. The corrected terminalState.ts blob is unchanged in current Rust 06e9852cf961c6b617abcc4b8cecfdd3b2d31f4f.
This clears this type-check regression; it does not establish completion of the other Recall, reconnect or offline migration verification in #6638, or success of the entire current CI run.
Automated review notice: This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
…efresh worker labels - Remove the hardcoded MAX_PAGES = 16 limit in assembleChildren and rely on visited continuation cursors so long-lived Bots do not truncate child sessions. - Reconnect createBotWorkers on observation cancellation (#6638) and skip continuation reads when the catalog revision is unchanged. - Read entry() reactively for BotWaiting and BotReply with a stable waiting key, pass the current-pane fallback to createMessageSenders, and use worker-specific visible copy as accessibilityLabel. Generated-by: Antigravity
Refs #6504. Let the user reach a Bot's workers directly from its Chat without introducing additional stored state: - Link worker-triggered Bot replies (`origin: bot_worker`) to the worker's execution record, resolving worker titles and existence through `createMessageSenders` (archived included) and rendering the wake `SenderBadge` in Trajectory. - Subscribe to the Host's `agent.catalog` child stream (`scope: children`) for the current visible Bot, following continuation cursors across pages and reconnecting across observation cancellations (`#6638`). - Show running and waiting workers at the end of the Bot's Chat (waiting first) with live reactive title updates and distinct per-worker accessible labels. - Open workers in a side pane when one fits, falling back to the current pane on narrow layouts, open preview panels, or terminal TUI. Generated-by: Claude Code Generated-by: Antigravity Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Wang <[email protected]>
Summary
Recallsearch andcatalogbrowsing without runtime compatibility shims:StoreError::Jsonas an isolatedunreadable_sourcefailure inEventLogtranscript/recall maintenance (platform/event-log/src/transcript/directory.rs) so an historical source event written under an earlier schema (such as pre-SourceCapturemodel_requestedevents) is recorded intranscript_failuresand surfaced throughRecallPage.gaps(complete: false) instead of aborting partition search, while SQLite/storage and invariant errors continue to fail fast.EventLog::root_catalog_record_outcomes/RootStore::scoped_session_outcomes) so all-sessionRecallsearches (Recall::list/Recall::query/Recall::find/search::titles) andagent.list(catalog_page) isolate unreadable session metadata/workspace bindings intogapsor skipped entries with preserved keyset cursors, while targeted single-sessionRecallqueries (session_id: Some(...)) still return the error directly.UiScope/ApplicationHostbindings and reconnect persistent workbench watches across service reconfiguration:Client::binding_retiredafter a successful owned-sessionClient::refresh()(products/maka/client/src/lib.rs), refreshowner.read_uion retired/staleServices::capture()inUiScope(products/maka/workbench/src/bindings/ui_services.rs), retry read-onlyUiScope/ApplicationClientqueries & subscriptions once when admission retires a cached binding (products/maka/workbench/src/bindings.rs), and refresh the rootApplicationHostwhenmanagement.watchupdates UI sources (products/maka/workbench/app/plugins/registry.ts).*_observation_cancelledandclient subscription cancelledas clean activation handoffs (isObservationCancelledinproducts/maka/workbench/app/text.ts) and reconnect persistent UI streams (browsing.ts,Checklist.tsx,CurrentFile.tsx,workspaceFileState.ts,botTranscriptCore.ts,messageSenders.ts,terminalState.ts,sessionGoal.ts, andConversation.tsx) without flashing bottom-left"刷新浏览器"errors or dropping mounted session state.One-time migration for existing data
Offline migration script, unit tests, and backup/restore instructions:
https://gist.github.com/M4n5ter/291dc2f494a66ec779b8559b5362a330
The runtime retains only the strict current event and session configuration schemas (zero legacy compatibility branches). Existing local stores containing pre-
SourceCapturemodel_requestedevents or pre-BindingRefinline session workspaces can be migrated offline in one step after stopping Maka and its Host:Verification
cargo fmt --all -- --check— passcargo clippy --locked -p maka-event-log -p maka-assistant -p maka-app-client -p maka-workbench --all-targets -- -D warnings -A clippy::too_many_arguments— passcargo nextest run -p maka-event-log --lib projection_classification recall catalog— passcargo nextest run -p maka-assistant --lib— passcargo test -p maka-agent-native --lib recall -- --test-threads=2— 6/6 passcargo test -p maka-agent-native --lib owner::tests::catalog -- --test-threads=2— 3/3 passcargo nextest run -j 4 -p maka-app-client --lib— 29/29 passcargo test -p maka-workbench --lib -- --test-threads=2— 13/13 passnode --test products/maka/workbench/tests/*.test.mjs— 90/90 passnode scripts/ci.mjs check format && node scripts/ci.mjs check licenses && node scripts/ci.mjs check notices— passnode packages/plugin-sdk/scripts/generate.mjs check && node node_modules/typescript/bin/tsc -p packages/plugin-sdk/tsconfig.acceptance.json && node node_modules/typescript/bin/tsc -p products/maka/bundle/tsconfig.json— passpython3 -W error::ResourceWarning -m unittest -v test_migration.py(3/3 pass), plus preview and--applyagainst a temporary SQLite backup of~/.maka/application/host(1legacymodel_requestedevent and6source prefix rows migrated cleanly, second run reported0remaining records,PRAGMA integrity_checkreturnedok).AI use
Select exactly one:
Tool(s) and scope: Antigravity — root-cause investigation, per-record
Recall/catalogfault isolation, workbenchUiScope/ApplicationHostrebinding and stream reconnection, tests, documentation updates, and the offline data migration Gist.Checklist
Does this PR entail a change in behavior?