Skip to content

refactor: resolve session artifact paths without a store - #3134

Open
thymikee wants to merge 1 commit into
fix/daemon-review-hardeningfrom
refactor/session-artifact-paths
Open

thymikee wants to merge 1 commit into
fix/daemon-review-hardeningfrom
refactor/session-artifact-paths

Conversation

@thymikee

@thymikee thymikee commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Session directory and app-log paths now come from the existing artifact-path module. Stale-claim recovery resolves paths from the dead owner's state directory directly, without constructing a session store. Store consumers delegate to the same validated functions.

Removes the SessionStore.expandHome forwarder and migrates all nine production callers to expandSessionPath. Path sanitization, errors, filenames and cwd handling are preserved. Moves the existing path tests to their defining modules, retaining their assertions.

Depends on #3133. Ref #3116. Ten files, 191 gross changed lines.

Validation

Tested 64f40ac3bf5b081a98b09b204bf72a482c8d3a7d:

  • 38 focused tests pass across four files; zero skips.
  • Quick checks and Fallow pass.
  • Exact-head affected checks pass: 388 files, 2,709 related tests; zero skips.
  • Independent read-only audit confirms preserved path validation/layout, recorded-owner recovery scope, complete caller migration and test discovery. No findings.
  • CI-owned coverage and provider checks remain pending.

Review in cubic

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.94 MB 4.94 MB -357 B
Package (unpacked) 4.94 MB 4.94 MB -357 B
Package (download) 1.48 MB 1.48 MB +162 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.7 ms 27.6 ms -0.1 ms
CLI --help 82.3 ms 81.8 ms -0.4 ms

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 10 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/host-kit/src/session-paths.test.ts
@thymikee

thymikee commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

This PR is ready at 64f40ac. The code looks right, and the moved tests keep their assertions. All 14 checks pass, and there are no conflicts. It waits only on its base, #3133, landing. Not blocking, and you can take or leave these: device-claim-reconciliation.ts line 28 still joins safeSessionName(claim.session) itself, so it skips the empty, . and .. refusal in resolveSessionDir, and durable-capture-resource.ts line 58 does the same from a package that cannot import src/daemon, so a follow-up could route the first through resolveSessionDir and inject it into capture-kit; the doc on isSafeSessionSegment still names SessionStore.resolveSessionDir, and it should point at resolveSessionDir in session-artifact-paths.ts. I did not run the tests, and I read the #3138 follow-up only through your comment, not its diff.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 3, 2026
@thymikee
thymikee added this pull request to stack #3146 October 3, 2026 08:46

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

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant