Skip to content

feat(web): expose Web Session provenance - #398

Open
testikun wants to merge 2 commits into
openpi-dev:mainfrom
testikun:codex/issue-347-web-session-provenance
Open

feat(web): expose Web Session provenance#398
testikun wants to merge 2 commits into
openpi-dev:mainfrom
testikun:codex/issue-347-web-session-provenance

Conversation

@testikun

@testikun testikun commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

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

  • Add source: "web-session", origin: "web", controller, and readOnly: false to Web Session summaries.
  • Derive controller: "web" for the current runtime Session and controller: "none" for other Sessions in its Web Session directory. This describes the current runtime's projection, not a global ownership lock.
  • No new storage, permissions, model-visible tools/context, or lifecycle mutations are introduced.
  • Integrate current main while preserving the author's commits. The feature delta against main remains three files, 36 added lines.

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.
  • Focused adapter tests: 13 passed, 0 failed, on both the original PR head and the integrated tree.

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.

@tt-a1i tt-a1i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants