Repository navigation
feat: local session store and API (Phase 2, sessions PR 1/2) - #11
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: André Oliveira <coliveira.andre@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: André Oliveira <coliveira.andre@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: André Oliveira <coliveira.andre@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: André Oliveira <coliveira.andre@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: André Oliveira <coliveira.andre@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: André Oliveira <coliveira.andre@gmail.com>
Compose the SQLite store and SessionService in the CLI: - record each discovery as a revision; - serve the session API; - list sessions with --sessions; - opt out with --no-store. Store failures exit with code 2 and an actionable message. Corrupt files are quarantined. Docs: ADR 0006, the sessions guide, and updates to README, roadmap, architecture, security, alpha guide and package READMEs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: André Oliveira <coliveira.andre@gmail.com>
- Set busy_timeout on every connection before any work, and re-read the schema version under the write lock, so concurrent first opens succeed. - Probe integrity through a read-only connection so a corrupt file's WAL is quarantined intact instead of being deleted on close. - Prune backups by schema version, then time. - Report a read-only store file as unwritable (exit 2). - Include the view identity in the revision fingerprint so a changed view (e.g. framework labels) is never served from a stale revision. - Disable the store when its directory is inside the analyzed project. - CLI and docs no longer claim the Studio already saves sessions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: André Oliveira <coliveira.andre@gmail.com>
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
PR 1 of 2 for the Phase 2 sessions slice (spec, approved 2026-11-16; plan). It persists discovered graph revisions and Sandbox sessions in a local SQLite store outside the analyzed project. The Studio UI that uses the store is PR 2.
@archwise/application:WorkspaceRepository,RevisionRepository,SessionRepository,Clock,IdGenerator,Digest;SessionService: reserves a fresh session per launch, persists it on the first Sandbox save, and supports list, resume-in-place, rename and delete;@archwise/application/testing.@archwise/storage(new): built onnode:sqlite, with no new npm dependency (ADR 0006). It provides:ARCHWISE_DATA_DIRoverride and mode0700;storage-inward-onlyboundary rule, with regression tests.archwise.graphrevision through the new adapter;/api/v1/sessions*, requiring the capability cookie, a same-originOriginon mutations, JSON bodies, a 300 kB limit, and 404s that never echo input;--sessionsand--no-storeflags;docs/sessions.md, plus updates to README, roadmap (Phase 2 status), architecture, security, code organization, the Alpha guide and package READMEs, and a changeset.Verification
pnpm check(pnpm 10.34.9, Node 26, macOS): 329 Vitest + 16 Node integration tests pass.--sessionsempty, then--serve, then save over HTTP, then kill the process, then--sessionslists the session. The analyzed fixture stays byte-identical.integrity_checkon every launch, wherequick_checkmight do.Review notes
archwise.graphrevisions are now produced by the CLI./api/v1/graphand--graphare unchanged.Checklist
Signed-off-bytrailer.🤖 Generated with Claude Code