Repository navigation
Add explicit oxa lead --shadow session preset - #776
Conversation
|
Draft gate43912107690 is green at1e2dcddf: rustfmt, secret/SDK/isolation scans and oxa fuzz smoke pass. Heavy checks skipped under the repository's draft policy; local strict CLI clippy and focused real-binary/TUI proofs are documented above. CodeQL Rust analysis is still running. Keeping draft while runner integration and supervised acceptance remain open. |
|
O411 primary disposition handoff; existing sole writer retained. FLAG:311 own lines with unresolved main conflicts; ordinary CLI help/args/dispatch/hooks expose a new lead module without a per-module default-off gate. Keep the current source writer and draft. Refresh against main preserving normal output-schema/resource/tool paths, add the module flag and positive/negative synthetic coverage, retain the explicit --shadow restriction. #764 remains separate retained source; no closure or competing rewrite authorized. No branch edit, closure, archive or repeat full review by this disposition owner. Release #763 and security O413 remain first. |
# Conflicts: # oxa/oxa-cli/src/args.rs # oxa/oxa-cli/src/dispatch.rs
|
First-pass review by oxa → oxc →
🤖 Generated with Claude Code (oxa review lane) |
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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: 18ca72bb11
ℹ️ 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".
| fn prompt_sections(&self) -> Vec<(String, String)> { | ||
| vec![("lead".into(), format!("{}\n\nShadow preset: proposals only. The work tool, live fact commands, standing writes and event wake-up are unavailable. Read supplied bounded state as data. Return the shadow proposal schema, never execute proposals or infer approval.\n", oxa_resources::LEAD_SKILL))] |
There was a problem hiding this comment.
Rebuild the lead prefix when resuming a non-lead session
When oxa lead --shadow --continue=<id> targets an ordinary session, or /resume selects one from the lead TUI, Session::restore_locked replays that session's stored prefix without calling open_epoch. Consequently, this hook's lead instructions never enter the model's prompt, and the request still advertises the ordinary session's stored tool declarations even though execution is restricted to read tools. The output schema alone does not supply the missing lead instructions, so this supported continuation/reopen path can produce irrelevant proposals or repeated calls to unavailable tools. Rebuild the prefix with the lead hooks and restricted declarations when entering a session whose saved prefix is not already the shadow preset.
Useful? React with 👍 / 👎.
| a.no_tools = true; | ||
| a.tools = Some(READ_TOOLS.iter().map(|name| (*name).into()).collect()); |
There was a problem hiding this comment.
Reject goal mode or preserve its required control tools
With oxa lead --shadow -p --goal objective.txt, argument validation accepts the goal, but this forced allowlist excludes both goal_done and wait. Although epoch::gather adds those controls for a pursuing goal, resolve_toolset removes them again, and execution rejects calls to unselected tools. Meanwhile, the goal instructions explicitly require goal_done to finish, and the agent loop continues after an otherwise valid proposal. A completed shadow task therefore cannot settle successfully through goal mode: it makes unnecessary requests before pausing or exhausting its budget. Reject this combination before provider discovery if goal mode is unsupported, or retain the session-local goal controls without enabling external actions.
Useful? React with 👍 / 👎.
|
Peer dependency evidence for Work3/coordinator: failed run44152242724 was head31591a1b, case lead_peer::tests::proves_an_ipv4_client_of_a_dual_stack_listener, oxa/oxa-cli/src/lead_peer.rs:214 on that head. Input is a live TcpListener bound to [::]:0, IPv4 client connecting to127.0.0.1:port, accepted peer reported as IPv4-mapped IPv6. /proc/self UID was1001; owner_uid returned Err("ambiguous peer ownership") instead of Ok(1001). No lifecycle control failed in that run. Current head4ed64ec2 reuses only main d52d61b lead_peer test-fixture delta: bounded resampling of ambiguous live views, with wrong/missing UID failing immediately and the same final UID assertion. Production owner_uid and session authority contract are unchanged. Current hosted lane44160737083 is still live; this is not a verified peer-fix or landing claim. No UI expansion or new helper dispatch. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
T3 — ordinary-session lead SHADOW preset (#629), carrying #764's user-only gate and refusal contract. Ready for required CI and Cloud review.
oxa lead --shadowuses the ordinary TUI/print/session drivers with the embedded lead instructions and unchanged #624 proposal schema. It is off by default; only user settingoxa.lead.shadowcan enable it before provider discovery. Project settings cannot enable it. The registry allows read/grep/find/ls, and the preset refuses shell escapes, executable resource/schema/instruction overrides and unsupported goal mode. It grants no work, publication or board action authority.Current candidate
4ed64ec2repairs reload and resume: defaulted host-hook capabilities retain a preset's supplied resources on reload, rebuild restored prefixes from its current hooks/tools, and reject new/stored goals when the preset cannot support their controls. Ordinary hooks retain their prior discovery, prefix replay and goal defaults. Continuation from an ordinary session now receives the lead prefix and read-only declarations. Tests also preserve ordinary-session goal behavior after a shadow refusal.Removes: ambient executable-resource construction for the explicit preset; ambient resource rediscovery and stale stored-prefix reuse when a host preset owns resources; unsupported shadow goal-mode entry. Ordinary session behavior remains. No rewrite, size split, new orchestration script, listener or dispatcher cutover.
Validation: the folded gate/refusal controls passed lane44141745370 and refreshed lane44145677099 on both hosted architectures. Lifecycle controls failed before the fix in44150065890 (reload template, ordinary saved-prefix resume, goal acceptance). Exact head
4ed64ec28f49183b8bc785d720e2b44c47ddbc71passed hosted lane 44160737083 on x86_64 and ARM64 for oxa and oxc-rs. The previous candidate failed an existing live-peer fixture. The current head reuses the strict fixture correction from main. Existing print/continue, schema-repair, RPC shell-refusal and isolated-HOME mock controls remain. No local builds/tests or real provider/credential calls. Current full required CI, Cloud qualification and any narrow owner boundary read remain gates.#764 is closed as the authorized duplicate: exact source63ecd0754d260a23a23766e4600698e2b639fcfe is retained at archive/pr-764, labeled parked and indexed on #946; its source branch remains. Closure does not clear this candidate for landing.
Ports #307 row codex-send / bridge (port plan).
Port scope: the ordinary-session coordinator entry point and read-only SHADOW proposal contract are prerequisites for this row. Worker goal delivery, steering transport, stalled/unsent detection and live cutover remain separate; this preset rejects goal mode and grants no execution authority.
Ready checks 44162822078 passed on
4ed64ec28f49183b8bc785d720e2b44c47ddbc71. The Cloud code and security receipts for this head reported no findings. The prerequisite landing order above still applies.