feat(web): expose Web Session provenance - #398
Conversation
tt-a1i
left a comment
There was a problem hiding this comment.
Reviewed integrated head d7f3c98 (tree 34602d43a1c9e127ab48cd7944eb9210ecec8741, main c1c60cd). The feature delta is three files / 36 additions: additive Web Session metadata derived from the dedicated Session directory and current Session manager. No model-visible tools/context, permissions, or persisted Session state are changed.
Independent review of the frozen tree found no blocking issue. Both in-memory and persisted-current projections were checked; an extra persisted-session probe verified current controller=web, selected controller=none, archived readOnly=false, and no provenance fields written into JSONL. The persisted-current case is not yet a permanent regression test, but the actual path passes.
Validation: bun run check passed; bun run test passed (Node 1427 passed / 1 skipped / 0 failed; Vitest 30 passed); focused adapter tests 13/13. No installed Pi or UI acceptance is claimed.
This technical approval does not replace required CI or the repository rule requiring approval from someone other than the last pusher. No merge has been performed.
Problem
Related to #347. Web Session summaries did not expose their source or identify the Session controlled by the current Web runtime. This left the Web/terminal boundary implicit for API consumers.
Value
Make Web Session provenance explicit while retaining Pi Session files and the existing Web runtime as the sources of truth.
Approach
source: "web-session",origin: "web",controller, andreadOnly: falseto Web Session summaries.controller: "web"for the current runtime Session andcontroller: "none"for other Sessions in its Web Session directory. This describes the current runtime's projection, not a global ownership lock.Validation
Temporary integration with main
c1c60cd9e357044b53042ab23963d053b46dae9f, using the frozen lockfile and Pi 0.85.1:bun run check: passed.bun run test: Node 1427 passed, 1 skipped, 0 failed; Vitest 30 passed.Remote CI and required approval must apply to the final pushed head. No installed Pi or manual UI acceptance is claimed; this PR adds API metadata and has no UI changes.