feat(web): add session unarchive operation - #361
Conversation
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
tt-a1i
left a comment
There was a problem hiding this comment.
Exact-head review: the unarchive operation is useful and no P2+ defect was confirmed in that slice. Focused adapter/host tests passed 32/32. An additional real-file probe verified concurrent/idempotent unarchive, unchanged canonical JSONL bytes/cwd, and restored state after adapter restart. However this PR also includes the entire older #360 trust projection, now overlapping main’s richer getProjectTrustStatus/trustInfo implementation. Recommendation: retain only the unarchive contribution with original author credit, preserve current main trust semantics, then validate the integrated result. Do not merge this full branch as-is; it also has current main conflicts. No source edits or merge performed.
…444) Integrate Session-scoped terminal details from #389, Pi thinking reads from #375, and unarchive from #361 while preserving current trust diagnostics. Add authenticated endpoint and persistent unarchive integration tests. Co-authored-by: testikun <320479488+testikun@users.noreply.github.com> Co-authored-by: seekskyworld <djh1813553759@gmail.com>
|
The useful unarchive implementation is integrated into main through #444 (1919542), with original contributor seekskyworld credited as a co-author. The inherited #360 trust projection was omitted because main already has the richer Pi-owned trust implementation. Added validation covers idempotency, restart, authentication and unchanged canonical Session bytes; full local tests and all CI passed. Closing this source PR as integrated. |
Problem
Implements the reversible archive-management slice of #347. The Web API could archive sessions but offered no way to restore one.
Value
Archived Session metadata can be restored without deleting or rewriting the canonical Session file.
Approach
Add
PiWebAdapter.unarchiveSessionusing the existing atomic archive metadata transaction and exposePOST /api/sessions/unarchive. The operation validates the canonical Session through the same adapter boundary and emits asession_unarchivedevent.Validation
npx tsc --noEmitnode --test --experimental-strip-types tests/web/web-host.test.ts tests/web/pi-adapter.test.ts(32 passed)git diff --checkImpact
archived-sessions.jsonatomically.