fix(transfer): make manifest paths re-exportable - #58
Conversation
Match project selectors against resolved session metadata as well as encoded directory names so every advertised export project can be selected again. Agent: Quintilian
|
[REVIEW] GO — #58 @ 6b11edf — lens: correctness+security+gates, reviewer Hostus (1 of 1) Reviewed the exact one-commit change against origin/main at 16ed634. I read the full diffs for src/lib/transfer.ts and test/transfer.test.ts, then the complete changed files and the surrounding path-resolution helpers, CLI transfer caller, existing path tests, package scripts, and PR rationale. Commands run:
Correctness and security trace: the project selector still preserves encoded exact/child matching. The added path takes the caller-supplied project path through the existing directory inventory, rejects non-directories, compares against the same resolveProjectPath result advertised in the manifest, and then enters the unchanged read/copy export path. It adds no source-session writes, import mutation, authentication boundary, network sink, or permissive failure fallback. Blocking P0/P1 findings: none. Non-blocking follow-ups: none. |
|
[ACCEPTANCE] Station01 real-path verification passed on the exact reviewed candidate Exact sanitized receipt: {"status":"PASS","installedVersion":"0.12.11","allProjectsForm":"default-without-project","candidateHead":"6b11edf48b525cd33fec3ab85b8b9822f0ec9eb1","advertisedProjects":115,"advertisedNonEmpty":91,"reproducingCandidateIndex":0,"baselineExitCode":1,"fixedExitCode":0,"fixedProjectCount":1,"fixedJsonlCount":1,"fixedTotalFiles":1,"sourceFiles":1,"sourceBytes":124036,"sourceImmutable":true}OpenLoops run: The installed The externally created squash merge |
Summary
originalPathback to the Claude project directory that produced itRoot cause
The all-project export resolves
originalPathfrom session metadata. The project-scoped export then tried to find the session directory only by re-encoding that resolved path. When the metadata path was nested below the Claude project directory, the dry run advertised a non-empty project that the real exporter could not select again.Validation
bun run typecheck: exit 0bun run build: exit 0git diff --check origin/main..HEAD: exit 0origin/main..HEAD: no leaks foundProvenance
Todos task:
da229805-f8b8-476a-b82a-f414a103dc28The source-session directories are read only. No sanitizer, copy, import, or source-write behavior changed.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.