Repository navigation
feat(audit): record session action decisions - #129093
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 3:16 AM ET / 07:16 UTC. ClawSweeper reviewWhat this changesAdds privacy-preserving execution-audit receipts for session-tool decisions and an additive Gateway session-sharing API that represents present, unknown, or absent actor evidence. Merge readinessKeep open for maintainer review. Source review found no new blocking patch defect, but the PR remains necessary on current main and its Codex-lifecycle rationale could not be independently checked because the required sibling checkout is unavailable. Priority: P1 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherSession tools authorize access to other agent sessions, while Gateway sharing APIs manage session visibility and membership. The change records decision facts through the audit writer and gives current clients an additive way to display actor evidence without fabricating an identity. flowchart LR
A[Session tool request] --> B[Visibility decision]
B --> C[Session action or denial]
B --> D[Audit receipt queue]
D --> E[Private audit writer]
C --> F[Gateway sharing API]
F --> G[Web and native clients]
Decision needed
Why: Repository policy makes direct inspection of the Codex contract a prerequisite for a verdict when the PR relies on that contract, and the local review environment cannot perform it. Before merge
Agent review detailsSecurityNone. PR surfaceSource +511, Tests +989, Docs +50, Other +200. Total +1750 across 46 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the private audit producer and additive evidence-aware projection, then establish the required direct Codex lifecycle-contract check before landing. Do we have a high-confidence way to reproduce the issue? Not applicable: this is an additive audit and protocol feature rather than a report of broken existing behavior; focused source tests describe the intended authority and compatibility cases. Is this the best way to solve the issue? Yes, provisionally: a private owner-bound receipt plus an additive evidence API avoids fabricating principals or weakening the original response schema, but the Codex lifecycle premise still needs direct verification. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8c203185d7ed. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (10 earlier review cycles; latest 8 shown)
|
bcf6904 to
61d19e4
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
55b8209 to
4c7c304
Compare
c465155 to
2feda83
Compare
2fd310a to
db176b9
Compare
* feat(audit): record session action decisions * fix(protocol): preserve session sharing client compatibility
What this solves
Session access denials and session actions lacked durable, privacy-preserving execution-audit facts. Sharing attribution also collapsed principal-bearing, principal-less, and absent actor evidence into fabricated or ambiguous identities.
What changed
session.sharing.actorandSessionMember.addedBycontracts for representable rows.session.sharing.evidenceandsession.members.listEvidencefor principal-less evidence; older clients ignore the additive event and still receivesessions.changedrefreshes./dock-*outside run audit because it completes before run admission.Final restack
C01 landed in #129092 as merge commit
96de6f405b2b730c5eebd816f0f27c9e1012a829. This branch mechanically replayed only the two sealed C05 commits onto that exact result:6d834d0e3154c3875a092ec09fd231d9d8affdc6db176b92fe1bc123870a96d4c0e478a31439d13608de1e19cd720b43ebc7fa58d810d0a15638e6c6git range-diffreports both commits unchanged (=). Stable patch IDs remain exactly:8d6c4b99c498e8f68fcc06ff54bd071039ddda7bf32a42d1d997766f312f1645846499b4fab9d6e5No later
maindrift was queried or incorporated.Proof on the integrated head
GatewayModelsCompatibilityTests: 14/14 passed.check:changedagainst the landed C01 merge passed: core/core-test/UI/extensions types, core/extensions/scripts/apps lint, formatting, Plugin SDK export and surface guards, protocol/architecture/dead-export/database-first/native-schema/import-cycle checks, and routed macOS CI tests.Compatibility and storage
The change is additive at the Gateway protocol boundary and does not bump the protocol or SQLite schema version. Representable legacy rows retain their required actor/member shapes. Unknown or absent actor evidence is never fabricated into a principal; unrepresentable legacy member lists return a typed visible error naming
session.members.listEvidence.Review dispositions
v2026.7.1-2(0790d9f593ad), predates the session-sharing API's introducing commit62513433846f; only beta/unreleased tags contain that RPC. Root compatibility policy therefore does not treat its synthesized actor as a shipped contract. Returning a visible upgrade-method error for the unrepresentable beta shape preserves truthful tri-state attribution instead of fabricating a principal.mainrefresh is skipped under the campaign’s no-drift-chasing rule: the branch is mergeable, the only required foundation is landed, and the exact integrated proportional gate is green.Production delta remains
+844/-335; tests+1412/-325; generated native models+100/-0; docs+51/-1. Positive production growth is the private typed policy owner, bounded audit producers, additive evidence API/event, and native/web consumers. It does not add a second writer, store, key, or policy tree.Codex contract evidence
The acting agent personally inspected sibling Codex revision
f1087ff151b06e781ecb086068d45fcc62d02da3, including:../codex/codex-rs/app-server-protocol/src/protocol/v2/thread.rs:59,:332,:516../codex/codex-rs/core/src/tasks/mod.rs:279,:494../codex/codex-rs/core/src/state/turn.rs:74../codex/codex-rs/core/src/session/mod.rs:2236,:4088../codex/codex-rs/app-server/src/request_processors/thread_lifecycle.rs:217,:420These owners confirm explicit thread/turn lifecycle boundaries, replacement cancellation, exact active-turn context, and teardown semantics; retained or delayed session operations therefore require authority revalidation at their emission boundary.
No Agent Transcript section is included because consent was not provided.