Skip to content

Add grounded Sam learning assistant - #214

Open
davidortinau wants to merge 9 commits into
mainfrom
davidortinau-research-agent-harnesses
Open

Add grounded Sam learning assistant#214
davidortinau wants to merge 9 commits into
mainfrom
davidortinau-research-agent-harnesses

Conversation

@davidortinau

Copy link
Copy Markdown
Owner

Sam needs to be a durable language-learning partner without inventing learner state or bypassing SentenceStudio's application boundaries. This change replaces the earlier narrow conversation agent with a grounded, tenant-scoped assistant that can teach, retain protected history, explain its evidence, and propose guarded app operations.

What changed

  • Adds the typed Sam/Coach contracts, capability registry, grounding and repair pipeline, limitation model, observation trace, response reports, and opportunity telemetry.
  • Adds encrypted PostgreSQL conversation history, turn fencing, learner-controlled memory, retention, deletion, export, and account-erasure integration.
  • Reuses application services for learner-scoped reads and guarded writes, with explicit confirmation, idempotency, receipts, and bounded undo where supported.
  • Adds the persistent shell-level Sam overlay for web and macOS, including conversation paging, rename, close/reopen, delete, export, reporting, localization, accessibility, and responsive panel states.
  • Hardens feedback preview/submission, theme isolation, authentication handoff, local database volume selection, Aspire recovery, and native DevFlow migration validation.
  • Adds provider-specific migrations, CI gates, operational runbooks, a content-free opportunity digest, and broad API/UI/PostgreSQL/JavaScript coverage.

Review notes

  • Production promotion and the production soak are not performed by this PR. Sam remains configuration-gated so rollout can follow the documented foundation gate and soak runbook.
  • Coach history and reports are PostgreSQL-only. Mobile application data migrations retain paired PostgreSQL and SQLite copies where the shared model changes.
  • The persistent Sam control is the single entry point. The duplicate dashboard card was removed.
  • Agent E2E stacks must use a separately materialized AppHost path. --isolated from the same AppHost path can take ownership of the live stack, so recovery now verifies API health and the mounted database volume instead of trusting a WebApp redirect alone.

Validation

  • API tests: 4,518 passed, 0 failed, 0 skipped against scratch PostgreSQL
  • Unit tests: 1,755 passed, 0 failed
  • UI tests: 2,130 passed, 0 failed
  • WebApp tests: 11 passed; 22 live-only tests remained environment-gated
  • JavaScript tests: 167 passed, 0 failed
  • Shell guard tests: 14 clone-volume, 7 Aspire recovery, and 12 volume-validation cases passed
  • EF migration attribute and pairing gate passed
  • Native net11.0-macos migration and schema sanity gate passed through DevFlow
  • AppHost and WebApp builds passed
  • Live Canvas verification covered Sam visibility, conversation resume, saved-conversation navigation, teaching responses, and removal of the duplicate dashboard card

davidortinau and others added 9 commits August 25, 2026 15:18
Build Sam as a persistent language-learning assistant with guarded app operations, durable encrypted conversations, learner-controlled memory, evidence-backed responses, repair disclosures, and opportunity telemetry.\n\nAdd the shared web and macOS surfaces, provider-specific migrations, recovery tooling, runbooks, and comprehensive API, UI, PostgreSQL, JavaScript, and native migration coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>\nCopilot-Session: 163ed41e-3832-4c08-a70e-97e5ce42b13f
The SentenceStudio.Application namespace shadows the MAUI Application type in native heads. Fully qualify the base type so iOS and the other native projects compile consistently.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 163ed41e-3832-4c08-a70e-97e5ce42b13f
Make Sam modal on mobile with a scrim, safe full-screen controls, isolated message scrolling, and exact scroll restoration. Add a tenant-scoped deterministic latest-study read with grounded evidence, durable history, neutral non-plan refusals, and display-language copy.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 163ed41e-3832-4c08-a70e-97e5ce42b13f
Make GPT-5.6 Sol the explicit fail-closed default, keep all task-aware and fallback selections within the OpenAI catalog, validate VS Code sessions, migrate stale Ralph state, and require explicit GPT models in issue assignment workflows.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 163ed41e-3832-4c08-a70e-97e5ce42b13f
Register voice discovery only when ElevenLabs is configured, return service unavailable from the authenticated endpoint otherwise, and cover both configured and unconfigured host startup.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 163ed41e-3832-4c08-a70e-97e5ce42b13f
Keep authoritative migration and schema failures fatal while excluding unrelated SQLite errors emitted after the schema sanity signal. Add log-only regression coverage for production failure messages and post-startup CoreSync noise.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 163ed41e-3832-4c08-a70e-97e5ce42b13f
Build publish manifests from explicit environment values only so Development Sam defaults cannot leak into production. Preserve local configuration behavior and cover fail-closed and explicit production manifests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 163ed41e-3832-4c08-a70e-97e5ce42b13f
Declare a dedicated secret AppHost parameter, forward it only to the API, and cover the generated manifest so production remains fail-closed without exposing or reusing key material.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 163ed41e-3832-4c08-a70e-97e5ce42b13f
Give the production shell and every viewport-bound interactive surface explicit CSS safe-area ownership while keeping backdrops edge-to-edge. Cover portrait, landscape, asymmetric insets, modal, offcanvas, Coach, Sam, Scene, quiz, toast, and Resources geometry.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 163ed41e-3832-4c08-a70e-97e5ce42b13f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant