Expose coherent conversation situations in UI and telemetry - #328
Merged
Merged
Conversation
| if (typeof value === 'boolean') { | ||
| return value ? 'Yes' : 'No'; | ||
| } | ||
| if (value === null || value === undefined || value === '') { |
| if (typeof value === 'boolean') { | ||
| return value ? 'Yes' : 'No'; | ||
| } | ||
| if (value === null || value === undefined || value === '') { |
| normalised = normalised.replace(tzinfo=timezone.utc) | ||
| return normalised.isoformat() | ||
| if isinstance(value, (set, frozenset)): | ||
| return sorted(value, key=lambda item: str(item)) |
There was a problem hiding this comment.
Pull request overview
This PR completes an end-to-end “conversation situation” carrier surface: it adds a UI inspector for the shared situation and retained exact observations, and updates backend/telemetry tooling so consumers can fetch a coherent, authority-bound carrier snapshot while keeping compact locators small.
Changes:
- Adds a session-scoped “Situation” inspector UI (refresh/close/Escape, live-region status, JSON export) with safe rendering and retention/omission disclosure.
- Extends chat-history and telemetry read paths so
chat_history_get_segmentscarries situation + observations (paged under stdio guard), whileconversation_telemetry_get_locatorstays compact and exposes only freshness/availability metadata plus a descriptor for the full carrier read. - Updates backend generate/read-back behaviour, deterministic browser fixtures, and test coverage to treat situation/observations/omission state as one coherent snapshot at read boundaries.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/frontend/chatTabConversationLlmTelemetryCopy.test.js | Asserts telemetry copy payload includes updated agent instructions referencing carrier-bearing chat_history_get_segments. |
| tests/backend/test_von_generate_conversation_session_override.py | Expands generate tests to verify canonical carrier read-back and conflict/failure behaviour for situation + observations. |
| tests/backend/test_telemetry_read_delegation_stdio.py | Adds end-to-end stdio paging tests for carrier reads and verifies compact locator behaviour. |
| tests/backend/test_internal_mcp_locator_tools.py | Validates internal MCP chat_history_get_segments returns provenanced carrier state. |
| tests/backend/test_conversation_telemetry_locator_service.py | Ensures locator exposes freshness metadata (without embedding carrier content) and keeps carrier descriptors. |
| tests/backend/test_chat_history_service_segments.py | Adds coverage for returning carrier state in a single DB read and for compact locator projection fields. |
| tests/backend/test_browser_test_auth_service.py | Updates fixture tests to seed situation/observations and avoid duplicating durable records. |
| src/frontend/web/von_interface/templates/chat_tab.html | Adds “Situation” toggle button and the situation panel markup to the chat tab. |
| src/frontend/web/von_interface/static/styles.css | Introduces styling for the situation toggle/panel and responsive layout behaviour. |
| src/frontend/web/von_interface/static/js/test/chatTab.test.js | Adds focused UI tests for carrier merging/reset behaviour, safe rendering, refresh, and export payload. |
| src/frontend/web/von_interface/static/js/chatTab.js | Implements situation state caching/merging, panel wiring, refresh flow, and JSON export. |
| src/backend/services/conversation_telemetry_locator_service.py | Adds situation/observation freshness metadata to the compact conversation telemetry locator and updates descriptor purpose text. |
| src/backend/services/chat_history_service.py | Refactors bounded carrier-state extraction and adds optional inclusion of carrier state in get_chat_history_segments and locator projection. |
| src/backend/services/browser_test_auth_service.py | Seeds fixture sessions with situation + observations and records update counts in fixture creation results. |
| src/backend/server/routes/von_routes.py | Adds fail-soft post-persistence carrier read-back to return one coherent canonical snapshot in generate responses. |
| src/backend/server/routes/generate_route_support.py | Extends generate success payload to include situation, observations, and observation state. |
| src/backend/mcp_server/vontology_mcp.json | Updates MCP tool descriptions and schemas to document carrier-bearing reads and paging parameters. |
| src/backend/integrations/internal_mcp/catalogue.py | Adds deterministic delegated telemetry paging (stdio-guard-aware) and returns carrier state via chat_history_get_segments. |
| docs/engineering/contextual_knowledge_evolution.md | Updates design guidance to treat situation/observations/omission state as one coherent snapshot at read boundaries. |
Comment on lines
+16178
to
+16182
| dict(payload), | ||
| indent=2, | ||
| ensure_ascii=True, | ||
| default=_delegated_telemetry_json_default, | ||
| ) |
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.
What changed
chat_history_get_segmentswhile keepingconversation_telemetry_get_locatorcompact with availability/revision/count metadata and a descriptor for the full readWhy
JVNAUTOSCI-2613 established conversations as distinguished carriers of a provisional shared situation. The remaining product and diagnostic seams did not make that carrier inspectable to users or available to telemetry consumers, and independent field merges could combine state from different carrier revisions. This completes those end-to-end seams without adding a new orchestration stage or promoting the situation to canonical domain knowledge.
Validation
git diff --checkpassedchatTabsuite is 229/231; the two failures reproduce unchanged onorigin/main(a stale Prompt-label assertion and an unrelated queued-composer assertion)