feat(agent): bind sessions safely - #94
ben-ranford wants to merge 11 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27077f1478
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🟡 Changes recommended
Resolve the two moderate session-bridge correctness issues before approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds an opt-in session-to-agent bridge for snapshots, diagnostics, and idempotent cancellation while preserving application-owned authorization.
Changes:
- Adds full/patch snapshot support and cancellation wiring.
- Adds focused tests and ownership documentation.
- Refreshes generated API and dependency inventories.
File summaries
| File | Review notes |
|---|---|
scripts/rigor/generated/public-api.txt |
Generated API inventory updated. |
scripts/rigor/generated/dependency-inventory.json |
Generated dependency inventory updated. |
runtime/agent/session_bridge.go |
Two moderate issues: validate snapshot hash metadata, and make concurrent snapshot baseline handling deterministic. |
runtime/agent/session_bridge_test.go |
Adds snapshot and cancellation coverage. |
docs/config-ownership.md |
Add the required changelog entry for the user-visible bridge change (nit). |
Review details
Suppressed comments (2)
docs/config-ownership.md:38
- This adds an exported, user-visible session bridge, but
CHANGELOG.md'sUnreleasedsection remains empty. The repository policy requires updating it for user-visible behavior changes (CONTRIBUTING.md:38), so add the bridge release-note entry before merging.
`agent.BindSession` is an opt-in local-checkout API. It supplies a session's
snapshot envelope and an idempotent cancellation callback, while the
application continues to supply the action registry, authorization,
confirmation, and policy callbacks in `agent.Options`. It does not select a
transport or grant action authority.
runtime/agent/session_bridge.go:44
Server.Servedispatches non-control requests, including snapshots, to up toMaxInFlightworkers, so this singlepreviousbaseline is not tied to request order. A valid full request followed by a patch can be scheduled with the patch first and be rejected as stale, or another snapshot can replace the baseline before the patch; the bridge therefore behaves nondeterministically under concurrent clients/requests. Serialize snapshot handling in the server or retain per-revision baselines instead of relying on one implicit previous state.
mu sync.Mutex
previous state.State[M]
hasPrevious bool
cancelOnce sync.Once
- Files reviewed: 3/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ea7ba2902
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c56579d73a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08172e552f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sonar API auditReviewed commit: Live public SonarCloud API queries for PR #94 returned:
Audited via CLI at 2026-09-14T13:10:27.202527+00:00. Project visibility was verified as public. No findings were changed or suppressed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c15f393cf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fca8a18658
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 659870bc08
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sonar API auditReviewed commit: Live public SonarCloud API queries for PR #94 returned:
Audited via CLI at 2026-09-14T13:50:12.117394+00:00. Project visibility was verified as public. No findings were changed or suppressed. |
Sonar API auditReviewed commit: Live public SonarCloud API queries for PR #94 returned:
Audited via CLI at 2026-09-14T14:21:13.602077+00:00. Project visibility was verified as public. No findings were changed or suppressed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53a035df02
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Sonar API auditReviewed commit: Live public SonarCloud API queries for PR #94 returned:
Audited via CLI at 2026-09-14T14:35:09.750319+00:00. Project visibility was verified as public. No findings were changed or suppressed. |
6aa707a to
fe6602d
Compare



Summary
Closes #62
Validation
make ci— exit 0 (/tmp/stave-62-make-ci-final.log), includes repository fast/verify gates.Release Notes
Scope firewall: A review item belongs here only if it directly prevents #62 acceptance and is an incremental correction in the initially touched production surface. Shared files or wording do not justify adjacent work.