Repository navigation
fix(ai-vault): discover and parse Devin sessions on Windows - #21337
Conversation
…workspace mapping Devin sessions never appeared in the AI Vault on Windows, and parsed nearly empty elsewhere: - The transcripts root hardcoded the XDG layout (~/.local/share/devin/cli/transcripts), but Devin CLI writes under %APPDATA%/devin/cli/transcripts on Windows. The root is now platform-aware (APPDATA on win32, XDG_DATA_HOME elsewhere) for both local scans and win32 remote hosts, and APPDATA joins the scanner child's env allowlist so relocated AppData resolves. - The parser read metadata.is_user_input / created_at / metrics, which real ATIF-v1.7 transcripts don't carry. It now also accepts the ATIF step shape (source, timestamp, step-level metrics/model_name, plain-string message) while keeping the legacy shape. - ATIF transcripts carry no working_directory, so sessions couldn't group under a workspace. The sibling sessions.db index is now merged through the existing sidecar seam: it fills cwd/title/model/ timestamps, honors the db's hidden flag, and re-merges on db-only changes without re-reading transcripts.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughDevin session discovery now resolves Windows and POSIX transcript roots for local and remote hosts. The parser supports ATIF-v1.7 message, source, timestamp, model, and token fields. The scanner reads sibling Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change preserves platform-specific Devin discovery, transcript parsing, and database enrichment with safe fallback behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 7c3c1ba5-bea0-43f0-9c87-b8c2eac0c4d1
📒 Files selected for processing (14)
src/main/ai-vault/remote-session-large-transcripts.test.tssrc/main/ai-vault/remote-session-scanner-devin-source.tssrc/main/ai-vault/remote-session-scanner-sources.test.tssrc/main/ai-vault/remote-session-scanner-sources.tssrc/main/ai-vault/session-scanner-agent-root-overrides.test.tssrc/main/ai-vault/session-scanner-agent-sources.tssrc/main/ai-vault/session-scanner-devin-db.test.tssrc/main/ai-vault/session-scanner-devin-db.tssrc/main/ai-vault/session-scanner-devin-parser.test.tssrc/main/ai-vault/session-scanner-devin-parser.tssrc/main/ai-vault/session-scanner-parse-cache.tssrc/main/ai-vault/session-scanner-service-env.test.tssrc/main/ai-vault/session-scanner-service-env.tssrc/main/ai-vault/session-scanner-sidecar-enrichment.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
Caution
This PR does not build. session-scanner-agent-sources.ts imports resolveDevinTranscriptsDir from ../devin/devin-cli-data-dir, a module that is not in this PR and does not exist on main. pnpm run typecheck:node fails with TS2307, and session-scanner-devin-db.test.ts fails to load, so the entire Devin discovery/enrichment path is currently unreachable.
Reviewed changes
- Platform-aware Devin transcripts root — local resolution moves behind
resolveDevinTranscriptsDir()(%APPDATA%on win32, XDG/~/.local/shareelsewhere) withDEVIN_HOMEpreserved, andAPPDATAjoins the scanner child env allowlist so a relocated AppData resolves. - Remote Devin source — new
remoteDevinSourcegives remote win32 hostsAppData/Roaming/devin/cli/transcripts; posix roots unchanged. - ATIF-v1.7 parser support — plain-string
message,source-based user/agent/system classification, steptimestamp/metrics/model_name, and token buckets that treatprompt_tokensas already including cached tokens. sessions.dbsidecar enrichment — new reader mapssessionsrows to cwd/title/model/timestamps, honorshidden, caches by path+mtime+size, and merges through the existing sidecar seam; whole-file agents now enrich after read and re-merge on a db-only change.- Test coverage — new db and remote-source suites, an ATIF fixture, platform-aware root fixtures, and a normalized remote issue-path expectation.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…ases - Resolve the platform-aware Devin cli dir in agent-sources instead of importing the shared devin-cli-data-dir module, which is not part of this change (broke typecheck). - Exclude source:'system' steps unconditionally, even when legacy metadata fields would classify them as user/assistant messages. - Guard unix-seconds conversion against out-of-range values so a single bad sessions.db row cannot mark the whole index unreadable.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Invalidate Devin metadata when the WAL changes. · session-scanner-devin-db.ts:76-94
src/main/ai-vault/session-scanner-devin-db.ts:76-94
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winInvalidate Devin metadata when the WAL changes.
devinSessionsDbPathobserves onlysessions.db.devinSessionsIndexForSidecarandparseCachedInLanereuse cached data when that file’s mtime and size are unchanged.SyncDatabasebinds tonode:sqlite, which reads committed WAL frames fromsessions.db-walwhile the main database file can retain its stat until checkpoint.Therefore, a live Devin database in WAL mode can leave DB-derived working directory, title, model, or hidden state stale. A transcript change alone does not refresh
indexCache; it can only trigger another read that returns the same cached index.Include
sessions.db-walin the dependency key while retainingsessions.dbinvalidation, or otherwise invalidate both caches when the WAL changes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: baa3d200-251a-4325-9f45-41560d684e14
📒 Files selected for processing (3)
src/main/ai-vault/session-scanner-agent-sources.tssrc/main/ai-vault/session-scanner-devin-db.tssrc/main/ai-vault/session-scanner-devin-parser.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/main/ai-vault/session-scanner-agent-sources.ts
- src/main/ai-vault/session-scanner-devin-db.ts
- src/main/ai-vault/session-scanner-devin-parser.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Incremental delta since the prior pullfrog review (9f14eb5 → c5aa6df):
- Build blocker fixed — removed the import of the nonexistent
../devin/devin-cli-data-dirmodule and inlined the platform-aware Devin transcripts-root resolution insession-scanner-agent-sources.ts.pnpm tc:nodeis clean and the 116 targeted Devin/root/env tests pass. - System steps excluded from message counts —
session-scanner-devin-parser.tsnow gates both the user and assistant branches onsource !== 'system', so ATIF setup steps can no longer feed the title or preview. - Out-of-range timestamps tolerated —
unixSecondsToIsoreturnsnullfor non-positive or non-finite dates instead of throwing, so one badsessions.dbrow no longer marks the whole index unreadable.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
… stale In WAL mode, committed rows sit in sessions.db-wal while sessions.db keeps its stat until checkpoint, so keying the dependency on the db alone could serve a stale index. The dependency now observes the wal when one exists; the reader still opens sessions.db itself.
There was a problem hiding this comment.
Caution
The new WAL probe imports existsSync from node:fs into a guarded scanner module, so pnpm test now fails session-scanner-fs-import-guard.test.ts. Devin roots can be WSL UNC paths, so the probe needs to go through the WSL gate rather than be allowlisted.
Reviewed changes
Incremental delta since the prior pullfrog review (c5aa6df → c23d49e):
- WAL-aware Devin db dependency —
devinSessionsDbDependencyPathreturnssessions.db-walwhen it exists, elsesessions.db, andcontentDependencyPathnow points at it so a WAL-mode write invalidates the sidecar cache instead of leaving cwd/title/model/hiddenstale. - Sidecar path normalized back to the db —
devinSessionsDbPathForSidecarPathstrips the-walsuffix before SQLite opens it, and the index cache is keyed by the db path rather than the observed path. - Tests — a
devinSessionsDbDependencyPathunit test (db until a wal appears) and a wal-observation test that re-reads when only the wal stat moves.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
existsSync bypasses wslGatedStat and can hang a scan on a stalled 9P mount; the fs-import guard forbids it in session-scanner modules. The dependency path resolution is now async and probes through the gate.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Incremental delta since the prior pullfrog review (c23d49e → 6187f50):
- WAL probe moved behind the WSL gate —
devinSessionsDbDependencyPathis nowasyncand probessessions.db-walwithwslGatedStat(walPath, 'scan'), catching a missing or refused stat to fall back tosessions.db. This removes the rawnode:fsexistsSyncimport that failedsession-scanner-fs-import-guard.test.ts, while preserving the wal-vs-db dependency choice. - Test updated for the async signature — the
devinSessionsDbDependencyPathunit test awaits the helper for both the db-only and wal-present cases.
The previously flagged guard-test blocker is resolved. I confirmed the guard suite and the Devin db suite pass locally (17 tests) and pnpm tc:node is clean, and that the new gated stat cannot nest inside another gate task (session-scanner-discovery.ts:34-58 awaits each gated call sequentially). Prior review threads on the raw node:fs import and the remote-enrichment scope have been resolved.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Honor explicit zero metric values. · session-scanner-devin-parser.ts:96-114
src/main/ai-vault/session-scanner-devin-parser.ts:96-114
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winHonor explicit zero metric values.
firstDevinMetricValueskips finite zero values because it returns only whenvalue > 0. A higher-priority zero can therefore fall through to a lower-priority positive metric, causingconsumeDevinSessionStepto overstatetotalTokens. PreservenumberValueand distinguish an explicit finite numeric zero from missing or unsupported values.Proposed fix
- const value = numberValue(source[key]) - if (value > 0) { + const rawValue = source[key] + const value = numberValue(rawValue) + if ( + value > 0 || + (value === 0 && typeof rawValue === 'number' && Number.isFinite(rawValue)) + ) { return value }
🟡 Minor · Extract text from ATIF array messages. · session-scanner-devin-parser.ts:134-165
src/main/ai-vault/session-scanner-devin-parser.ts:134-165
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winExtract text from ATIF array messages.
ATIF v1.7 allows
step.messageto be a string or an array of content parts.extractContentTextalready supports arrays, butextractDevinStepTextnever passesstep.messageto it. An array message therefore increments the message count but does not contribute to the title or preview.- return extractString(step.text) + return extractContentText(step.message) ?? extractString(step.text)
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 8f2e413d-8cc7-4865-9858-e7ff5120e0ee
📒 Files selected for processing (2)
src/main/ai-vault/session-scanner-devin-db.test.tssrc/main/ai-vault/session-scanner-devin-db.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/main/ai-vault/session-scanner-devin-db.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.
- firstDevinMetricValue skipped explicit numeric zeros, letting a lower-priority positive metric win and overstating token totals. - ATIF allows step.message as an array of content parts; route it through extractContentText so those steps still feed title/preview.
There was a problem hiding this comment.
ℹ️ No critical issues — the delta is a correct, narrow follow-up; one coverage suggestion below.
Reviewed changes
Incremental delta since the prior pullfrog review (6187f50 → 9fbc647):
- Explicit zero metrics honored —
firstDevinMetricValuenow returns a finite numeric0instead of skipping it, so a higher-priority source or key that explicitly reports zero no longer falls through to a lower-priority positive value. - ATIF array messages parsed —
extractDevinStepTextroutes an array-valuedstep.messagethroughextractContentText, so those steps feed title and preview instead of only incrementing the message count.
ℹ️ Both edge-case fixes ship without a regression fixture
extractDevinStepText and firstDevinMetricValue changed behavior for two shapes the existing suites never produce: the ATIF-v1.7 fixture uses plain-string message values, and no Devin test supplies an explicit 0 metric. Without a fixture, a future refactor can silently reintroduce either bug.
Technical details
# Regression coverage for the two parser edge cases
## Affected sites
- `src/main/ai-vault/session-scanner-devin-parser.test.ts` — no case with an array-valued `message` or an explicit `0` metric.
## Required outcome
- A case where a higher-priority metric source/key is explicitly `0` and a lower-priority one is positive asserts the zero wins (guards the `firstDevinMetricValue` change).
- A case with an array-valued `message` asserts the step contributes title/preview text (guards the `extractContentText(step.message)` fallback).DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
The extractDevinStepText fallback that routes an array-valued step.message through extractContentText shipped without a fixture that produces that shape, so a future refactor could silently drop the branch. Pin that an array of text parts feeds the step's title and preview.
|
Added the array-valued I deliberately did not add the suggested explicit-zero case as specified: "a higher-priority metric source/key is explicitly |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Incremental delta since the prior pullfrog review (9fbc647 → fa45d8a):
- Array-message regression fixture —
session-scanner-devin-parser.test.tsnow parses an ATIF step whosemessageis an array of{ text }parts, asserting it contributes tomessageCount,title, and the user preview. This guards theextractContentText(step.message)fallback added in9fbc647; the assertion fails without that fallback, so it is real coverage rather than theatre.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
nwparker
left a comment
There was a problem hiding this comment.
AI-assisted code review of 98fd988: no remaining blocking findings in this PR's documented scope.
Fixed during review: persisted pre-ATIF parser results survived upgrades; a locked sessions.db could be retried for every transcript in one scan; and equal database/WAL stats could reuse the wrong metadata cache entry. Added regression coverage and had the final changes reviewed independently.
Verification: 1,370 AI Vault tests on macOS, 133 targeted tests on native Windows via Orca CLI, Node typecheck, and changed-code quality checks pass. The rendered folder-workspace session shows its title, messages and preview (proof in the description).
Limits: broad Windows suite has baseline failures; legacy SSH filesystem scanning still does not enrich from the remote SQLite index; the newly installed Devin CLI is awaiting browser login for a fresh real-session check. CI is approved and queued.
|
Readiness checklist — PR #21337, revision 9cde006 Verdict: PASS for the reviewed change. All final GitHub checks pass on 9cde006; the PR is approved and all review threads are resolved. Validation limits are recorded below. No new P0, P1, or P2 candidate findings remain after the review fixes. Counsel validation is not required under the checklist's zero-candidate exception.
Validation limits:
Review follow-up: duplicate Devin exports now share the existing scan-local collection. Identity includes agent, execution host, Devin installation and session ID, preserving separate hosts/WSL roots and Codex behavior. Local bounded/unlimited and remote Windows/Linux regressions pass. Both benchmark harnesses use the extracted collection and completed 40,000 differential correctness comparisons each, plus their timing runs and deduplication GC retention checks. Main integration exposed stale tests: the terminal-pane count budget now accounts for its three keyed readers while continuing to reject full-inventory scans; two OMP assertions follow main's recorded-transcript resume contract and retain ID fallback coverage; the relay environment test awaits main's async augmenter. The existing geometry-name lint exemption includes main's browser markup regression test. No OMP or terminal runtime behavior was changed by these test corrections. 1,523 AI Vault/OMP tests pass locally. Windows verified the real Devin session, deduplication and OMP assertions on 13f2aca: 18 tests pass, in addition to the earlier 202-check run. The last commit changes only benchmark imports and the relay assertion; that relay suite passes both tests and the changed-code quality gate passes. All review threads are resolved; final CI and bot review passed. No remaining candidate findings; ready to merge. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Incremental delta since the prior pullfrog review (fa45d8a → 98fd988):
- Stale Devin cache entries invalidated on upgrade —
SCHEMA_VERSIONis bumped to 3, so pre-ATIF Devin rows persisted under schema 2 are discarded whole and re-parsed instead of replaying with empty titles and message counts. This is the codebase's documented mechanism for a parser-semantics change (session-parse-cache-persistence.test.ts:133-145). - Contended database bounded to one attempt per scan —
session-scanner.tswraps the scan inwithDevinSessionsDbScan, andsession-scanner-devin-db.tsrecords a failed db path in anAsyncLocalStorageset. A lockedsessions.dbnow costs one open attempt per scan rather than one per transcript, and the next scan retries. - db↔WAL switch invalidates the index cache — the cached index entry now stores the observed
sidecarPathand requires it to match, so switching betweensessions.dbandsessions.db-walre-reads even when their mtime and size are identical. - Regression coverage — new upgrade-reparse, contention-and-recovery, db→WAL-identical-stat, and relocated/empty platform data-directory tests.
I verified the five touched suites pass locally (124 tests) and that the AsyncLocalStorage context reaches the parse lane, so the per-scan bound is genuinely exercised rather than only satisfied by the mock. The scan-body re-indent in session-scanner.ts is otherwise mechanical. No new issues.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Important
The new agent_logs discovery root can list the same Devin session twice when it exists in both transcripts and agent_logs, because nothing dedupes Devin rows by session_id. Please confirm the two directories can never hold the same session on one install, or collapse the duplicate.
Reviewed changes
Incremental delta since the prior pullfrog review (98fd988 → 9763f42):
agent_logsdiscovery added — Devin's siblingagent_logsdirectory is now scanned alongsidetranscriptson local, WSL, and remote hosts. The local roots merge under one per-agent discovery limit (mergeRootDiscoveries: true), andremoteDevinSourcetakes adirectoryargument so the same source is registered twice.- Root-resolution tests — local, relocated/empty platform-data, WSL, and remote fixtures now assert both directories are returned.
- Enrichment scan parameterized — the
sessions.dbenrichment scan test now runs for atranscriptsand anagent_logstranscript.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — the Devin cross-root dedupe is correct; one minor cleanup below.
Reviewed changes
Incremental delta since the prior pullfrog review (9763f42 → c225063):
- Generic post-parse dedupe extracted — new
session-root-dedup.tsholdsdedupeScannedSessionsandScannedSessionCollection, which now handle Codex (delegating tocodexSessionAliasKey/codexSessionAliasBeats) and Devin. Devin rows collapse on(executionHostId, install dir, sessionId), choosing the newest export and preferringagent_logson ties; the local and remote scanners plus the cutoff type switched to the generic names. - Codex-only exports removed —
codex-session-root-dedup.tsdropsdedupeCodexSessionsBySessionIdandCodexSessionCollectionand exports the two alias helpers for delegation. - Dedupe regression tests — new
session-scanner-devin-dedup.test.tscovers local both-roots collapse while still filling the scan limit, remote win32/linux collapse, and winner/isolation unit cases; the Codex collection/root-dedup, cutoff, and unlimited-dedup suites were retargeted to the generic names. - Terminal-pane budget test —
pane-title-update-global-scan-budget.test.tsxraises the bucket-read budget fromWORKSPACE_COUNT * 2to* 3to account for main's per-workspace sleep-state reader (test-only; the guard still rejects full-inventory scans by ~290×).
The prior open finding (no cross-root Devin sessionId dedupe) is addressed by 4e7cdc2060. I read the delta end-to-end and ran the touched suites (45 AI Vault dedupe tests + the renderer budget test) locally — all pass.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Incremental delta since the prior pullfrog review (c225063 → 9cde006):
- Benchmark scripts repointed —
config/scripts/session-dedup-batches-benchmark.mjsandconfig/scripts/session-scan-cutoff-benchmark.mjsnow importScannedSessionCollection/dedupeScannedSessionsfromsession-root-dedupinstead of the removed Codex-only exports, so both perf harnesses run again. This closes the prior review's finding. - Async relay augmenter awaited —
src/relay/omp-fresh-launch-environment.test.tsnowawaits theaddEnvAugmentercallback before asserting its empty result.
I verified the delta locally: the dedup benchmark completes its 40,000 differential batches (exit 0), the cutoff benchmark's new import specifiers bundle and resolve, and the relay suite passes (2 tests). A repo-wide search finds no remaining CodexSessionCollection/dedupeCodexSessionsBySessionId references. The one prior pullfrog thread (stale benchmark imports) is resolved.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
On Windows, Orca looked for Devin chat history in the wrong folder, so no Devin sessions ever showed up in the AI Vault — and because they were never found, they also couldn't be grouped under a workspace or resumed. Even on macOS/Linux, Devin transcripts written by the current Devin CLI (ATIF-v1.7 format) parsed as nearly empty: no title, no messages, no token counts. This change makes Orca look in the right place on every platform, read the real transcript format, and pull workspace/title details from Devin's own session index.
What Changed
%APPDATA%/devin/cli/transcripts), macOS and Linux ($XDG_DATA_HOMEor~/.local/share), and on remote Windows hosts scanned over SSH. Local sessions now carry real titles, message previews, token counts, and group under the correct workspace.session-scanner-agent-sources.ts: Devin transcripts root is now platform-aware (APPDATAon win32,XDG_DATA_HOMEelsewhere);DEVIN_HOMEoverride still works.remote-session-scanner-devin-source.ts(new): remote Windows hosts resolveAppData/Roaming/devin/cli/transcripts.session-scanner-service-env.ts:APPDATAjoins the scanner child's env allowlist so relocated AppData folders resolve.session-scanner-devin-parser.ts: accepts both the real ATIF-v1.7 step shape (source,timestamp, step-levelmetrics/model_name, plain-stringmessage) and the legacymetadata.*shape.source: 'system'steps are excluded unconditionally. ATIFprompt_tokensalready includes cached tokens, so cached tokens are no longer double-counted.session-scanner-devin-db.ts(new) +session-scanner-sidecar-enrichment.ts: ATIF transcripts carry noworking_directory, so the siblingsessions.dbindex is merged through the existing sidecar seam — filling cwd/title/model/timestamps, honoring Devin'shiddenflag, and re-merging when only the db changes without re-reading transcripts. Missing/corrupt dbs degrade to transcript-only listing and retry on the next scan.Devin 3000.10.31 exports ATIF to
agent_logs/devin-<session-id>.jsonwhen launched with--export. Discovery now includes this sibling directory on local, WSL and remote hosts, while retainingtranscriptsfor older versions. Both directories use the same session index, joined by the transcript’ssession_id, and share the local per-agent discovery limit. Duplicate exports now collapse to one row per execution host, Devin installation, and session ID in local and remote scans. The newest export wins;agent_logswins ties. The existing scan collection is reused so aliases do not consume the visible-session limit, while Codex identity rules are preserved. Explicit transcript-directory overrides remain isolated. A print-mode run without--exportproduced no ATIF file in the Windows verification; database-only sessions are outside this transcript scanner’s scope.Why
The transcripts root hardcoded the XDG layout on every platform, so Windows installs were invisible. The parser read a
metadata.*shape that current Devin transcripts don't emit. For workspace mapping, readingsessions.dbwas the only source ofworking_directory— the alternative (embedding it in transcripts) isn't ours to change. Using the existing sidecar-enrichment seam avoided a parallel post-parse system and gives dependency-stat invalidation for free.Scope note: the
sessions.dbmerge is wired into the local scanner only. The legacy SSH filesystem fallback gets transcript discovery/parsing; database enrichment in that fallback remains a follow-up. Hosts running the full scanner use their local database.Linked Issue
Fixes #21330
Visual Proof
Rendered verification in a hidden macOS Electron build, using a synthetic ATIF-v1.7 transcript plus a SQLite session index. The session appears under its folder workspace with its title, two messages, model, first prompt, and assistant preview. Native Windows scanner checks are recorded below.
Testing
Verification through
9cde00651c0:awin, reached through Orca CLI): 202 checks passed in 16 suites on the deduplication revision;13f2aca92ccadditionally passes 18 real-session, deduplication, and OMP integration checks. Coverage includes relocated/missing AppData, real SQLite enrichment, upgrade cache invalidation, contention recovery, remote paths, and large remote transcripts. The authenticated real-session check also passes on this revision.--export: the scanner found all four messages, model, 35,559 tokens, assistant previews, and the correct workspace from the real database. The binary was checksum-verified against its official manifest.AI Disclosure
Implemented with AI assistance (Devin, Cognition). Approach, code review, and verification by the contributor.
Review
The final benchmark review identified two stale imports after extracting the scan collection. Both harnesses now use the new module and names and run successfully. A relay test now awaits main’s async environment augmenter.
CI’s newer main includes #20634, which intentionally prefers a recorded OMP transcript path when resuming. Two integration tests still expected a session ID; their assertions now follow that contract and preserve the existing ID-fallback checks. No OMP runtime behavior was changed by this PR.
The final bot review found duplicate rows when the same Devin session existed in both export directories. Added local bounded/unlimited and remote Windows/Linux regressions, plus host/install isolation and deterministic winner checks. CI also exposed an outdated terminal-pane count budget from main: tracing measured three keyed readers (activity status, card inputs, sleep state), so the test now budgets those three readers while continuing to reject full-inventory scans.
Current
mainwas merged to validate the integration. CI exposed a false-positive naming error in main’s new browser-markup test:shapesis the drawing compositor’s geometry field. The existing annotator exception now includes that one regression test; no assertion or runtime behavior was changed.Additional review found and fixed three cache problems: old persisted Devin results needed invalidation after the parser changed; a contended index was retried once per transcript instead of once per scan; and switching between the database and its write-ahead log could reuse cached metadata when their size and modification time matched. Regression tests cover all three, plus relocated and missing platform data-directory variables. A second code review found no blocking issues.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
AppData/Roaminglayout.DEVIN_HOMEandXDG_DATA_HOMEoverrides preserved.joinRemotePath+RemoteHostPlatform; remote sessions currently list transcript-only (see scope note above).metadata.*transcript shape still parses; missingsessions.dblists sessions transcript-only.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)