Repository navigation
fix(ai): distinguish pending turn readback and consolidate conversation APIs - #354
Open
ice-black-tea wants to merge 2 commits into
Open
ice-black-tea wants to merge 2 commits into
ice-black-tea wants to merge 2 commits into
Conversation
ice-black-tea
marked this pull request as ready for review
November 23, 2026 16:30
ice-black-tea
marked this pull request as draft
November 23, 2026 16:58
ice-black-tea
marked this pull request as ready for review
November 23, 2026 17:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
History.session_turn()read of an authorized, admitted, still-active turn can now reportSESSION_TURN_PENDINGwhen its timeline commit has not been published yet. An absent admission, a missing terminal commit and recovery-required storage retain their existing behavior.Original turn-publication verification
20 tests passed across
test_session_timeline.py,test_session_timeline_repository_ownership.pyandtest_session_timeline_recovery.py. Covers access checks, pending versus unadmitted and recovery, terminal consistency, and revision advancement exactly once.git diff --checkpassed.Public API and ownership
History.session_detail(...).timelinefor a history page andHistory.session_turn(...)for an exact published turn. Remove the forwardingHistory.session_timeline(...)method. Keep the distinct live Runtime timeline and observer interfaces./api/session/events?session_id=…&view=chat. Remove Chat mode from/api/executions/{id}/events; that endpoint remains dedicated to diagnostics. Requests with the retired selector are rejected rather than silently switched to a more detailed stream. Exact Web readback no longer substitutes the latest page for the requested execution.SessionServiceis owned and exported bylinktools.ai.session, notlinktools.ai.execution. Keepproject_event_payloadatlinktools.ai.execution.events, and keep the live tool projector public; materializing stored transcript tool history stays private to History.persistence.objects.runtime_domain_uses_object_store: every real persistence domain is object-capable. Keep input validation and actual storage-route/retention decisions at their respective boundaries.Focus: conversation-facing SDK, Web, and directly related persistence contracts. No DDL, wire-storage, authorization, execution diagnostics, coordination, or provider API changes. The separately documented
Runtime.attachalias is not removed here.Cleanup verification
Candidate
fef6e3e56910: 248 tests passed in the focused History, persistence and ownership suite; 75 passed and one skipped in the Web/CLI suite (the suites overlap). The pending-read DOM scenario passed independently. The package architecture gate, configured Ruff rule selection, JavaScript syntax check andgit diff --checkpassed. Full merge CI is separate.File-by-file review
Changed = in the combined PR diff; Reviewed = source/contract inspected; References = call sites or exports searched; Verification = read or exercised for a regression. This table reports the actual review scope, not every file in the package.
AGENTS.mdlinktools-ai/AGENTS.mdlinktools-ai/docs/capability-ownership.mdlinktools-ai/docs/domain-composition.mdlinktools-ai/docs/runtime-capabilities.mdlinktools-ai/docs/runtime-history.mdlinktools-ai/docs/storage-cache-design.mdlinktools-ai/docs/storage-caching.mdlinktools-ai/docs/web-console.mdlinktools-ai/linktools.ymllinktools-ai/pyproject.tomllinktools-ai/src/linktools/ai/__init__.pylinktools-ai/src/linktools/ai/acp.pylinktools-ai/src/linktools/ai/errors.pylinktools-ai/src/linktools/ai/execution/__init__.pylinktools-ai/src/linktools/ai/execution/_service.pylinktools-ai/src/linktools/ai/execution/_service_api.pylinktools-ai/src/linktools/ai/execution/events.pylinktools-ai/src/linktools/ai/execution/handle.pylinktools-ai/src/linktools/ai/execution/tree.pylinktools-ai/src/linktools/ai/history/__init__.pylinktools-ai/src/linktools/ai/history/_history.pylinktools-ai/src/linktools/ai/history/_session_timeline.pylinktools-ai/src/linktools/ai/migrate/_database.pylinktools-ai/src/linktools/ai/persistence/__init__.pylinktools-ai/src/linktools/ai/persistence/_conversation_repositories.pylinktools-ai/src/linktools/ai/persistence/_materializer.pylinktools-ai/src/linktools/ai/persistence/_object_router.pylinktools-ai/src/linktools/ai/persistence/_plan.pylinktools-ai/src/linktools/ai/persistence/_retention.pylinktools-ai/src/linktools/ai/persistence/_root.pylinktools-ai/src/linktools/ai/persistence/_runtime_commands.pylinktools-ai/src/linktools/ai/persistence/_runtime_state.pylinktools-ai/src/linktools/ai/persistence/contracts.pylinktools-ai/src/linktools/ai/persistence/objects.pylinktools-ai/src/linktools/ai/runtime/__init__.pylinktools-ai/src/linktools/ai/runtime/_agent.pylinktools-ai/src/linktools/ai/runtime/_domains.pylinktools-ai/src/linktools/ai/runtime/_factory.pylinktools-ai/src/linktools/ai/runtime/_local.pylinktools-ai/src/linktools/ai/runtime/_runtime_service.pylinktools-ai/src/linktools/ai/runtime/_session.pylinktools-ai/src/linktools/ai/runtime/agent_execution.pylinktools-ai/src/linktools/ai/session/__init__.pylinktools-ai/src/linktools/ai/session/_contracts.pylinktools-ai/src/linktools/ai/session/_process.pylinktools-ai/src/linktools/ai/session/_service.pylinktools-ai/src/linktools/ai/storage/__init__.pylinktools-ai/src/linktools/ai/storage/_database.pylinktools-ai/src/linktools/ai/storage/_route.pylinktools-ai/src/linktools/ai/storage/_turn.pylinktools-ai/src/linktools/ai/web/_app.pylinktools-ai/src/linktools/ai/web/assets/app.jslinktools-ai/src/linktools/commands/ai/_common.pymanage.pyscripts/check/ai/__main__.pytests/ai/AGENTS.mdtests/ai/_measure_sync_session_io.pytests/ai/test_architecture.pytests/ai/test_archive_object_router.pytests/ai/test_chat_tool_process.pytests/ai/test_cli_turn_sync.pytests/ai/test_conversation_output_retention.pytests/ai/test_conversation_turn_codec.pytests/ai/test_live_history_projection.pytests/ai/test_retention_publication_proof.pytests/ai/test_runtime_session_inactivity.pytests/ai/test_session_actor_identity.pytests/ai/test_session_timeline.pytests/ai/test_session_timeline_recovery.pytests/ai/test_session_timeline_repository_ownership.pytests/ai/test_session_timeline_runtime.pytests/ai/test_session_turn_notices.pytests/ai/test_session_watch.pytests/ai/test_spec_capability_contracts.pytests/ai/test_sqlite_history_recovery.pytests/ai/test_storage_resource_contracts.pytests/ai/test_structured_output_preview.pytests/ai/test_web_console.pytests/ai/test_web_console_client.pytests/ai/test_web_console_startup.pytests/ai/test_web_console_viewers.pytests/ai/test_web_local_coordination.pytests/ai/test_web_session_detail_capture.pytests/ai/web_console_dom.mjs