Skip to content

feat(harness): discover Assistant history without native startup [SAP-3292] - #1001

Closed
ynadge wants to merge 1 commit into
assistant-paused-restorationfrom
assistant-history-discovery
Closed

ynadge wants to merge 1 commit into
assistant-paused-restorationfrom
assistant-history-discovery

Conversation

@ynadge

@ynadge ynadge commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Primary change type

  • Feature

Problem and motivation

Assistant-only sessions can have retained history without a Terminal vendor ID, and native availability cannot be inferred from the presence of that record.

Summary and scope

Add authorized workspace history discovery by Studio ID. Keep same-folder conversations distinct and expose missing, partial, and unavailable record states. Native Resume starts unchecked; listing performs no native startup or inspection. Recheck every binding after the complete list is read so account changes cannot return an earlier authority's metadata.

Related work

Related issue: https://linear.app/sapiom/issue/SAP-3292

Depends on #1000. Native stack target: main. This is the E0 metadata portion of planned PR7; selected native inspection follows separately.

Validation

pnpm --filter @sapiom/harness exec vitest run src/core/assistant-history.test.ts src/server/assistant-records.test.ts — 10 passed
pnpm --filter @sapiom/harness typecheck — passed after the concurrent End helper correction
pnpm exec eslint packages/harness/src/core/assistant-history.ts packages/harness/src/server/assistant-records.ts packages/harness/src/shared/assistant-history.ts — passed
git diff --check — passed

Tests and documentation

Real metadata/record stores exercise same-folder identities, no vendor ID, native-root deletion, record corruption, partial records, and account changes during listing. Route tests cover boot authorization, strict queries and bounded errors. Updated retained-history documentation. Incremental size: 410 changed lines including tests and changeset; pr:size is absent in this repository.

Compatibility and release impact

  • Breaking or externally visible changes: additive metadata endpoint; existing Terminal history contracts remain compatible.
  • Changeset: added for @sapiom/harness.
  • Fix-forward: correct metadata discovery in a follow-up while retaining original bindings and records.

Security

  • No secrets, credentials, private data, or unsanitized logs included.
  • No suspected vulnerability disclosed publicly.

AI assistance

  • AI assistance used: Codex implemented and reviewed discovery and tests. A failing parallel-error case led to draining every page read before returning its failure.

Checklist

  • CONTRIBUTING.md read; maintainer-authorized issue work.
  • One focused increment, tests, relevant checks, documentation, and release impact addressed above.
  • I can explain and maintain the submitted changes.

Devin Review

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c8c800b3-3dcf-41c4-a0e2-5f16864ba089

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

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