Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 6:06 PM ET / 22:06 UTC. ClawSweeper reviewWhat this changesThe branch lets Merge readinessThis is a focused, source-backed repair for the linked default-tree visibility bug, not obsolete work. The implementation reuses the canonical row-aware checker and adds session-incarnation fencing before transcript reads; however, it intentionally extends a durable parent relationship into read-only history access, so it needs explicit maintainer security-boundary approval before merge. Priority: P1 Review scores
Verification
How this fits togetherSession tools resolve a requested key, decide whether the requesting agent may see that session, and then call the Gateway for the transcript. This PR changes the history path to consult the durable session row used by listings instead of relying only on a recency-filtered spawned-session list. flowchart TD
A[Agent calls sessions_history] --> B[Resolve canonical session key]
B --> C[Gateway session description]
C --> D[Row-aware tree visibility check]
D --> E[Verify session incarnation]
E --> F[Gateway chat history]
F --> G[Sanitized history tool result]
Decision needed
Why: The code proves the former history/list mismatch and contains the authorization expansion with an existing row checker and incarnation fence, but the acceptable lifetime of transcript access is an authorization-policy decision rather than a mechanical defect fix. Before merge
Findings
Agent review detailsSecurityNeeds attention: No concrete implementation vulnerability was found, but the diff intentionally expands a transcript-authorization boundary and needs maintainer policy approval before merge. PR surfaceSource +102, Tests +185. Total +287 across 5 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Approve the narrow durable-lineage rule for read-only history if it matches the intended tree policy, keep direct send and status on their existing policy, and merge only after the current head has a clear required-check result. Do we have a high-confidence way to reproduce the issue? Yes, at source level with high confidence: current main lists rows using durable parent metadata but direct history synthesizes a row from a recency-filtered spawned set. The linked report also supplies a concrete released-version reproduction, while this read-only review did not execute it locally. Is this the best way to solve the issue? Yes, conditional on approving the authorization policy: the branch reuses the canonical row checker, queries only the requested row, preserves the legacy fail-closed fallback, and uses the existing incarnation-admission mechanism before the transcript read. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 59982714ee48. LabelsLabel justifications:
EvidenceSecurity concerns:
What 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 (8 earlier review cycles)
|
159db2b to
d42d1ce
Compare
d42d1ce to
1aa1ed5
Compare
1aa1ed5 to
c4018c0
Compare
c4018c0 to
d49a7ae
Compare
Signed-off-by: Ho Lim <[email protected]>
Signed-off-by: Ho Lim <[email protected]>
Signed-off-by: Ho Lim <[email protected]>
d49a7ae to
3686e66
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
AI-assisted: yes. I reviewed the change and understand the session-visibility and incarnation-fencing behavior.
Closes #114180
What Problem This Solves
Under the default
treevisibility,sessions_listcan return an older durable child session whilesessions_historyrejects the same key after the display-recency window expires. Direct history authorization currently depends on a recency-filtered spawned-session listing instead of the target row's stored lineage.Why This Change Was Made
Read-only direct history access now obtains the exact target row through
sessions.describeand applies the existing canonical row-visibility checker. A successful durable-lineage grant carries the row'ssessionId, andrunWithScopedSessionAccessrevalidates that incarnation beforechat.history.If the exact row is unavailable or the Gateway lacks the method, the code falls back to the existing fail-closed direct guard. The scope intentionally remains limited to
sessions_history; direct send and status behavior is unchanged and remains an explicit maintainer policy decision.User Impact
A parent can read an older child's durable history without widening visibility to every same-agent session. Unrelated sessions remain forbidden, and a session replaced between authorization and transcript read is rejected.
Evidence
parentSessionKeymatches the requester.sessions.describe -> chat.history.chat.historydispatches remain 0; replacement-incarnation dispatches remain 0; unavailablesessions.describefalls back to the existing deny path.sessions-accessandsessions-history-toolin 3.92s with one worker.oxfmt, changed-fileoxlint, andgit diff --checkpass.codex review --base origin/maincompleted with no actionable findings and confirmed canonical row-checker ownership, fail-closed fallback, andsessionIdfencing.3686e66076f2010cbd02c7003653cefa38dd0057, merge basee4b6bde45a0769865219fa0b086618c66decdc13.chat.historydispatches remained 0.Signed-off-by: Ho Lim [email protected]