Skip to content

Restore official DSH history with bounded reads and community TUI resume - #24681

Draft
nwparker wants to merge 14 commits into
stablyai:mainfrom
nwparker:nwparker/dsh-history-1002
Draft

nwparker wants to merge 14 commits into
stablyai:mainfrom
nwparker:nwparker/dsh-history-1002

Conversation

@nwparker

@nwparker nwparker commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Official DeepSeek Harness 0.2 conversations appear in Orca history and search, and their compressed logs can be opened and exported. Resume restores the exact saved session through the distinct community dsh-tui adapter.

What Changed

The existing execution-host scanner selects the latest numeric generation and reads versions 0–4, including appended Zstandard frames. It excludes inherited fork context, delegated children, injected context and failed model attempts from conversation attribution. Decoded Open log/export keeps path authorization and bounded reads; deletion remains unavailable because generations and forks share identity.

Cancellation now closes acquired descriptors, and regular-file admission refuses FIFOs before reads can block. Search compatibility keeps omitted Qoder/Jcode capabilities independent of unrelated DSH flags, honors explicit provider opt-outs and modern catalogs, and requires DSH opt-in. Main's consent/readiness and unknown-scope handling survives empty modern intersections through its existing no-match scope.

Composed the complete correction with pinned canonical main 58bd15fa3ffa65942d94aee8137e35c27f4368c8 using a normal merge. Resolved search overlaps, a duplicate fixture import and old-host fallback expectations without removing incoming features or changing compiler/test gates.

Why

Official hooks leave the transcript path empty. Reading persisted history through existing scanner, stream, cache and export seams restores it without another store. Descriptor checks and cancellation prevent blocking reads; one compatibility policy prevents one provider's flag from suppressing another provider's requested history.

Linked Issue

History requirements: #14323 and #20443. Neither broader issue is closed here. Official-only launch/ACP restoration is separate scope; community TUI resume does not fulfill the official launcher requirement in #14323.

Visual Proof

Historical captures from the original PR are retained, not fresh acceptance of this merge: before, history, search, decoded log, community exact-session resume. The official capture recorded a human prompt and HTTP 401 rejection, no generated assistant response and zero tokens. No new app launch or paid provider task was performed.

Testing

Checked commit 620d29b73c8096ffa9814b60dc493e5f8233927a, tree fc8529d35303bb4840879b262d25f3a303600602, on macOS with background launch enabled and fresh task roots:

  • Normal focused complete affected run: 2,568 passed, zero failed, 59 existing skips across 286 files. Covers parser/history/import/resume, RPC/relay/native filesystem, cancellation/capability, search service and portable process boundaries.
  • Full pnpm tc, exact-main changed code quality, formatting, max-lines and RPC catalog checks passed. Normal commit hooks passed; committed bytes equal tested bytes.
  • Existing skips retain official DSH capture/CLI, Antigravity capture and platform/native conditions. No timeout, skip, assertion admission or gate was weakened. Live Windows/Linux/SSH/WSL, paired deployment, packaging and authenticated provider acceptance remain unverified.

The first composition run failed on a duplicate import and two DSH fallback expectations; corrected runs above are separate. Earlier whole FAILED operating reports and the old head's six failed CI conclusions remain historical failures, with no diagnosis from rollup alone. Hosted checks on this new head are pending.

AI Disclosure

Review

Self-reviewed source ownership, mixed versions, folder workspaces, budgets, provider/account separation, seed/default behavior and portable spawn. Independent final acceptance remains with the coordinator.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer source copied.

Notes

Original Neil history/correction commits and reconciliation authors remain ancestors; this updates the same owned fork PR without rewriting contributor credit. Codec reference: official source at 639ed015, @deepseek-ai/[email protected]; codec fixtures are synthetic and the sanitized authentication rejection capture is distinct. Community adapter reference is dsh-tui 0.12.0. This remains a draft; no approval, merge, auto-merge, issue closure or workflow rerun is requested.

Checklist

  • Explained before/after, mechanism and approach
  • Preserved original credits and historical visual evidence with limits
  • Considered cross-platform, SSH/WSL/folder ownership and mixed versions
  • Normal affected tests, full typecheck, changed quality and formatting passed
  • Fresh rendered/native provider and hosted CI acceptance

@nwparker
nwparker marked this pull request as ready for review October 2, 2026 10:04
@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 7cb1acc4-57bf-460f-a175-e7bf2b2d2ebc

📥 Commits

Reviewing files that changed from the base of the PR and between b49abdb and cbb12a8.

📒 Files selected for processing (72)
  • docs/reference/dsh-session-history.md
  • src/main/ai-vault-search/session-search-service-registry.ts
  • src/main/ai-vault/__fixtures__/dsh-codec-v0.jsonl
  • src/main/ai-vault/__fixtures__/dsh-codec-v1.jsonl
  • src/main/ai-vault/__fixtures__/dsh-codec-v2.jsonl
  • src/main/ai-vault/__fixtures__/dsh-codec-v3.jsonl
  • src/main/ai-vault/__fixtures__/dsh-codec-v4.jsonl
  • src/main/ai-vault/__fixtures__/dsh-v4-auth-rejected.jsonl
  • src/main/ai-vault/dsh-decoded-log-snapshot.test.ts
  • src/main/ai-vault/dsh-decoded-log-snapshot.ts
  • src/main/ai-vault/remote-session-scan-concurrency.ts
  • src/main/ai-vault/remote-session-scanner-discovery.ts
  • src/main/ai-vault/remote-session-scanner-dsh-source.ts
  • src/main/ai-vault/remote-session-scanner-dsh.test.ts
  • src/main/ai-vault/remote-session-scanner-sources.ts
  • src/main/ai-vault/remote-session-scanner-types.ts
  • src/main/ai-vault/remote-session-scanner.ts
  • src/main/ai-vault/remote-session-transcript-read.ts
  • src/main/ai-vault/session-scanner-agent-parser.ts
  • src/main/ai-vault/session-scanner-agent-sources.ts
  • src/main/ai-vault/session-scanner-discovery.ts
  • src/main/ai-vault/session-scanner-dsh-capture.test.ts
  • src/main/ai-vault/session-scanner-dsh-codec.test.ts
  • src/main/ai-vault/session-scanner-dsh-generations.ts
  • src/main/ai-vault/session-scanner-dsh-message.ts
  • src/main/ai-vault/session-scanner-dsh-parser.ts
  • src/main/ai-vault/session-scanner-dsh-source.ts
  • src/main/ai-vault/session-scanner-dsh-stream.ts
  • src/main/ai-vault/session-scanner-dsh-zstd.test.ts
  • src/main/ai-vault/session-scanner-dsh-zstd.ts
  • src/main/ai-vault/session-scanner-dsh.test.ts
  • src/main/ai-vault/session-scanner-every-agent-fixture.ts
  • src/main/ai-vault/session-scanner-parse-cache.ts
  • src/main/ai-vault/session-scanner-service-env.test.ts
  • src/main/ai-vault/session-scanner-service-env.ts
  • src/main/ai-vault/session-scanner-source-discovery.ts
  • src/main/ai-vault/session-scanner-test-fixtures.ts
  • src/main/ai-vault/session-scanner-types.ts
  • src/main/ipc/filesystem.test.ts
  • src/main/ipc/filesystem/filesystem-read-handlers.ts
  • src/main/providers/filesystem-provider-contract.ts
  • src/main/providers/ssh-filesystem-dsh-log.ts
  • src/main/providers/ssh-filesystem-provider-stream.test.ts
  • src/main/providers/ssh-filesystem-provider.ts
  • src/preload/api/filesystem-api.ts
  • src/relay/ai-vault-dsh-transcript.test.ts
  • src/relay/ai-vault-service-entry.ts
  • src/relay/ai-vault-transcript-stream.ts
  • src/relay/fs-handler-dsh-log.test.ts
  • src/relay/fs-handler.ts
  • src/relay/session-search-transport.test.ts
  • src/renderer/src/components/editor/EditorPanelHeaderPath.tsx
  • src/renderer/src/components/editor/dsh-decoded-log-export.ts
  • src/renderer/src/components/editor/useEditorPanelFileContentLoader.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-log-open.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-log-open.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-path-actions.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/ai-vault-resume-command.ts
  • src/renderer/src/runtime/runtime-file-client-types.ts
  • src/renderer/src/runtime/runtime-file-read-client.ts
  • src/shared/ai-vault-resume-command.ts
  • src/shared/ai-vault-search-client.test.ts
  • src/shared/ai-vault-search-client.ts
  • src/shared/ai-vault-search-contract.ts
  • src/shared/ai-vault-session-deletion.ts
  • src/shared/ai-vault-types.ts
  • src/shared/dsh-session-paths.test.ts
  • src/shared/dsh-session-paths.ts
  • tests/e2e/ai-vault-dsh-real-history.spec.ts
  • tests/e2e/helpers/e2e-completed-onboarding-profile.ts
  • tests/e2e/helpers/orca-app.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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.

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes

This run re-reviewed the commit added on top of bc2560d300 — a localization pass over the DSH history surfaces, with no functional change.

  • Localized the decoded-log export errors (updateHost, failed) and the SSH-host-mismatch toast through translate, adding the matching en.json keys and correcting a missing object separator.
  • Verified each new key resolves (auto.components.editor.dshDecodedLogExport.*, EditorPanelHeader.exportDecodedDshLog, aiVaultSessionLogOpen.openTranscriptHost), en.json parses, and translate is imported in the edited modules; this matches the established hand-authored-key convention.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@nwparker
nwparker marked this pull request as draft October 4, 2026 08:41
@nwparker nwparker changed the title feat(dsh): read and resume official Harness session history Restore official DSH history with bounded reads and community TUI resume Oct 4, 2026
@EDM-luoZ

Copy link
Copy Markdown

Hi @nwparker — thanks for putting this together, it's exactly what #27943 is asking for. Is there anything blocking this from moving out of draft? Anything the community can help with — e.g. splitting the local-only half out first, as the issue suggests?

Happy to pull the branch and run it against a real dsh install (CLI sessions plus DSH Desktop's separate harness/sessions root, v3/v4 zstd files) if testing evidence would help move it forward.

parkgogogo added a commit to parkgogogo/orca that referenced this pull request Oct 19, 2026
Adds a shared DSH session-log layer (src/main/dsh/session-log) and moves
the AI Vault DSH parser onto it.

- Formats v0–v4: v0 flat payloads, v0–v3 user-role tool-result wrappers,
  v4 first-class tool messages; packed stream deltas skipped; a format
  newer than v4 is reported instead of misread. Codec fixtures come from
  stablyai#24681, where the published dsh-session-format codecs validated them.
- Fork history: a seeded v2+ session owns only what follows its LAST
  `session/end-seed` marked inherited (dsh-session Session constructor);
  unmarked end-seed events close constructor setup and cut nothing; v0/v1
  use seedLength. Titles, first prompt, counts and search use own history.
- Generations: discovery offers only the newest `session[.vN].jsonl[.zstd]`
  of a session dir (generation 0 included), withholding an ambiguous
  compressed/plain pair, so search no longer indexes superseded files.
- Search: reasoning, tool calls and tool output reach transcript
  consumers; the list preview still shows prompts and replies only.
- Model from request/context (latest wins); incremental frame decoding
  for appends, used by the native chat reader next.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
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.

2 participants