feat(web): project Pi trust state in snapshots - #360
Conversation
Signed-off-by: seekskyworld <djh1813553759@gmail.com>
tt-a1i
left a comment
There was a problem hiding this comment.
Exact-head review found no new P2+ in the narrow original projection; focused protocol/adapter/runtime tests passed 44/44. Relative to current main, however, the value is already covered by #442’s richer Pi-owned getProjectTrustStatus/trustInfo and GET /api/trust projection, including stored decision, restricted/unknown state and refresh-required facts. Recommend treating this proposal as superseded rather than adding a parallel reduced trust field. The branch also conflicts with main and has a historical Node 24 CLI smoke failure; the latter is not established as a regression from this diff. No merge or closure performed.
|
Closing as superseded by the richer Pi-owned trust projection integrated in #442. Current main preserves stored decision, restricted/unknown state, resource provenance and refresh-required facts; adding this older parallel trust field would duplicate that source of truth. Thank you for the proposal and implementation. The useful unarchive work in #361 is being handled separately with author attribution. |
Problem
Implements the snapshot portion of #343. Web clients could not distinguish the active workspace trust state before invoking operations.
Value
The browser can show whether the current workspace is trusted without owning or persisting a second permission policy.
Approach
Read Pi SettingsManager trust state through the Web runtime, map it to bounded
trusted/untrusted/unknownvalues, and include it in the existing runtime snapshot projection. Unbound or unreadable state fails closed tounknown.Validation
npx tsc --noEmitnode --test --experimental-strip-types tests/web/protocol.test.ts tests/web/pi-adapter.test.ts tests/web/pi-runtime.test.ts(44 passed)git diff --checkImpact