Repository navigation
fix(gateway): scope session data lookups by agent [AI] - #81386
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. from source inspection: current main has run lookup, usage, memory-core, and memory-wiki paths calling combined session-store loading without carrying an agent scope. I did not establish a live multi-agent Gateway reproduction in this read-only review. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land a maintainer-approved version that scopes no-agent Gateway and memory reads to the effective/default agent, keeps protocol and SDK contracts aligned, and includes focused regression tests plus redacted multi-agent proof. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main has run lookup, usage, memory-core, and memory-wiki paths calling combined session-store loading without carrying an agent scope. I did not establish a live multi-agent Gateway reproduction in this read-only review. Is this the best way to solve the issue? Yes for the code direction: carrying the effective or requested agent scope into the existing loader and call sites is the narrow maintainable fix. It is not merge-ready until the external PR supplies real behavior proof and a maintainer approves the protected data-scope change. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 5774517fcee6. |
|
Reviewed by automation; no code change was required for this comment. Quoted comment from @clawsweeper:
|
* fix: scope gateway session lookups by agent * addressing review-skill * addressing review-skill * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing review-skill * addressing review-skill * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing ci * addressing ci * fix: complete root-cause handling * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * Fix Swift protocol optional initializer defaults * Stabilize node command lookup in approval test * Fix browser proxy approval test node lookup * Trim unrelated changes from issue 642 fix * Remove unrelated formatting churn from issue 642 fix * Fix Swift protocol generator lint * docs: add changelog entry for PR merge
* fix: scope gateway session lookups by agent * addressing review-skill * addressing review-skill * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing review-skill * addressing review-skill * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing ci * addressing ci * fix: complete root-cause handling * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * Fix Swift protocol optional initializer defaults * Stabilize node command lookup in approval test * Fix browser proxy approval test node lookup * Trim unrelated changes from issue 642 fix * Remove unrelated formatting churn from issue 642 fix * Fix Swift protocol generator lint * docs: add changelog entry for PR merge
* fix: scope gateway session lookups by agent * addressing review-skill * addressing review-skill * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing review-skill * addressing review-skill * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing ci * addressing ci * fix: complete root-cause handling * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * Fix Swift protocol optional initializer defaults * Stabilize node command lookup in approval test * Fix browser proxy approval test node lookup * Trim unrelated changes from issue 642 fix * Remove unrelated formatting churn from issue 642 fix * Fix Swift protocol generator lint * docs: add changelog entry for PR merge
* fix: scope gateway session lookups by agent * addressing review-skill * addressing review-skill * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing review-skill * addressing review-skill * addressing review-skill * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing ci * addressing ci * fix: complete root-cause handling * addressing review-skill * addressing codex review * addressing codex review * addressing codex review * addressing codex review * addressing codex review * Fix Swift protocol optional initializer defaults * Stabilize node command lookup in approval test * Fix browser proxy approval test node lookup * Trim unrelated changes from issue 642 fix * Remove unrelated formatting churn from issue 642 fix * Fix Swift protocol generator lint * docs: add changelog entry for PR merge
Summary
agentIdthrough run lookup, artifact, abort, usage, memory search, and wiki search/read paths; defaulted affected gateway-style reads to the effective/default agent when no agent is supplied.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
Root Cause (if applicable)
Regression Test Plan (if applicable)
src/gateway/server-session-key.test.ts,src/gateway/server-methods/artifacts.test.ts,src/gateway/server-methods/usage.sessions-usage.test.ts,extensions/memory-core/src/session-search-visibility.test.ts,extensions/memory-wiki/src/query.test.ts,extensions/memory-wiki/src/gateway.test.tsUser-visible / Behavior Changes
Gateway usage, artifact, wiki, and memory transcript queries without an explicit
agentIdnow operate within the effective/default agent scope instead of broad configured-agent discovery.Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) YesYes, explain risk + mitigation: Data access is narrowed by threading agent scope through affected session, artifact, usage, memory, and wiki lookup paths. This is intended hardening and does not add new access.Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations
agentId, and default behavior follows the effective/default agent scope.