Skip to content

fix(fleet): retain bounded inspection in read-only Workflow agents - #6423

Open
Hmbown wants to merge 2 commits into
integration/2026-09-22-web-cifrom
fix/read-only-agent-inspection-0.10.1
Open

Hmbown wants to merge 2 commits into
integration/2026-09-22-web-cifrom
fix/read-only-agent-inspection-0.10.1

Conversation

@Hmbown

@Hmbown Hmbown commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Scope

A bounded 0.10.1 Workflow/Fleet reliability fix, stacked on #6407. Retarget to main after that integration PR merges; this PR itself must not merge before its checks are green.

No-Issue: This fixes read-only agent regressions reproduced during the founder-requested 0.10.1 release work; model replacement remains separate work.

  • Stop adding a second File-only tool list to read-only Workflow steps. The existing child grant still intersects role, parent permissions and explicit scope; verifiers retain the bounded Run surface.
  • Give normally write-capable identities explicitly narrowed to read-only the existing classifier-bounded inspection shell, not arbitrary execution. A parent with no shell stays shell-less; explicit parent denials still win.
  • Keep the stopship fixture's intentionally File-only contract explicit.
  • Do not misdiagnose missing tools or source paths as provider/model access failures.
  • Update the existing agent guide with the precise inspection boundary.

This does not introduce silent model fallback, relax saved route pins, remove approval gates, grant writes or allow arbitrary test programs to an inspection agent.

Verification

  • cargo fmt --all -- --check: passed.
  • TUI Clippy, all targets/all features/locked, with the exact CI warning flags: passed.
  • 15 targeted tests passed, 0 failed; 13230 unrelated tests not selected. Includes actual Git commands through the isolated child executor, command/write denials, explicit parent denial, verifier visibility and dispatch, Workflow narrowing and stopship gate receipts.
  • Dead-code budget: 279, passed. Blocking-call budget: 578 sites/171 files, passed.
  • git diff --check and feature-release-note gate: passed.
  • Public patch verified byte-for-byte identical to the local tested commit; only these five files are added on top of Integration: website wave 1 + 0.10.1 CI/automation slices #6407, with no unrelated website or importer changes.

Hosted CI and an installed-runtime/provider qualification remain pending. The source/test evidence is not a claim that the currently installed binary has changed.

Hosted CI follow-up

The first exact-head run exposed two fixture expectations of the old File-only/no-shell defaults and a real repeated-Stop race on macOS. The follow-up asserts the deliberately narrowed runtime grant and explicit stopship File scope, and returns terminal Stop receipts from the owning manager rather than racing asynchronous persistence. Foreign-session mutation refusal stays covered.

  • CI-flag Clippy for TUI + Workflow (all targets/features, locked): passed.
  • Format and both ratchets: passed (279 dead-code suppressions; 578 blocking sites/171 files).
  • Targeted tests: 7 passed, 0 failed; 13,506 not selected. Includes a deterministic before-persistence Stop regression and the existing foreign-session refusal.
  • Test link emitted the large __eh_frame warning; linking and tests completed successfully.
  • The public follow-up patch matches the tested local patch byte-for-byte.
  • New exact-head run: https://github.com/Hmbown/Codewhale/actions/runs/35835196817 — pending, not claimed green.

Remove a second File-only tool default from Workflow lowering. The existing
child grant remains the single authority: role, parent permissions, scope and
write_authority are intersected before catalog projection and dispatch.
Explicit tool allowlists and deny_all_tools remain exact. The stopship fixture
now declares its deliberately File-only evidence scope explicitly.

Normally write-capable identities narrowed to read_only keep the existing
classifier-bounded inspection shell instead of losing every command. Parent
shell denials remain binding, arbitrary commands and tests are not inspection,
and no write scope is granted. Verifiers retain their bounded Run interface.

Do not annotate missing tools and missing source files as unavailable models.
Preserve provider/model/route diagnostics for real model access failures.
Update the existing agent guide to describe these boundaries accurately.

Verification:
- cargo fmt --all -- --check: PASS.
- cargo clippy -p codewhale-tui --all-targets --all-features --locked --
  -D warnings -A clippy::uninlined_format_args -A clippy::too_many_arguments
  -A clippy::unnecessary_map_or: PASS.
- Targeted nextest: 15 passed, 0 failed; 13230 not selected. Includes actual
  isolated Git inspection through the child executor, mutation denial, parent
  shell denial, bounded verifier/catalog tests, Workflow narrowing, stopship
  handoff receipts and accurate failure classification.
- Dead-code budget: 279, PASS. Blocking-call budget: 578 sites/171 files, PASS.
- git diff --check: PASS.
- No web changes. Earlier relevant root-gate evidence was packaging 67, SDK 14,
  web Vitest 490 passed, and check:web passed; not rerun for this Rust slice.

No model substitution is implemented here. Pinned routes, approval decisions,
network limits, write claims, and the shared Engine remain authoritative.
No provider call or installed-runtime upgrade is claimed.

Refs #6407

Signed-off-by: CodeWhale Bot <bot@codewhale.net>
Copilot AI lite review requested due to automatic review settings September 23, 2026 07:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-23T07:42:18.847161Z 1e68f4f PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…tence

Hosted macOS CI reproduced a second Stop returning 404 after the first Stop
returned 200: cancel_agent_run filtered out its in-memory terminal record and
raced the asynchronous disk projection. Return the owning manager's terminal
receipt without issuing another cancellation or weakening foreign-session checks.
Add a deterministic memory-only-manager regression for repeated Stop.

Complete the intentional inspection change from #6423 by asserting the explicit
File-only stopship fixture and the exact builder's inherited, read-only runtime
grant. These are contracts for the new behavior, not ignored or deleted tests;
write refusal, exact-provider identity and deny-all handoffs stay pinned.

Verification:
- cargo fmt --all -- --check: passed.
- cargo clippy -p codewhale-tui -p codewhale-workflow --all-targets --all-features
  --locked with CI -D warnings and the three CI lint allowances: passed.
- Targeted nextest: 7 passed, 0 failed; 13,506 not selected.
  Covers repeated Stop before persistence, existing live-child Stop,
  foreign-session refusal, the two hosted fixture failures, bounded Git vs
  mutation, and exact Fleet authority non-escalation.
- Link emitted the existing large __eh_frame warning; tests linked and passed.
- Dead-code budget: 279, passed. Blocking-call budget: 578 sites/171 files, passed.
- git diff --check: passed. No web changes; web gates were not rerun.

Hosted failure receipts: jobs 107088964032, 107088964169 and 107088964192.
No provider call, installed-runtime upgrade or hosted-green claim is made here.

Refs #6423

Signed-off-by: CodeWhale Bot <bot@codewhale.net>
Hmbown pushed a commit that referenced this pull request Sep 23, 2026
…tence

Hosted macOS CI reproduced a second Stop returning 404 after the first Stop
returned 200: cancel_agent_run filtered out its in-memory terminal record and
raced the asynchronous disk projection. Return the owning manager's terminal
receipt without issuing another cancellation or weakening foreign-session checks.
Add a deterministic memory-only-manager regression for repeated Stop.

Complete the intentional inspection change from #6423 by asserting the explicit
File-only stopship fixture and the exact builder's inherited, read-only runtime
grant. These are contracts for the new behavior, not ignored or deleted tests;
write refusal, exact-provider identity and deny-all handoffs stay pinned.

Verification:
- cargo fmt --all -- --check: passed.
- cargo clippy -p codewhale-tui -p codewhale-workflow --all-targets --all-features
  --locked with CI -D warnings and the three CI lint allowances: passed.
- Targeted nextest: 7 passed, 0 failed; 13,506 not selected.
  Covers repeated Stop before persistence, existing live-child Stop,
  foreign-session refusal, the two hosted fixture failures, bounded Git vs
  mutation, and exact Fleet authority non-escalation.
- Link emitted the existing large __eh_frame warning; tests linked and passed.
- Dead-code budget: 279, passed. Blocking-call budget: 578 sites/171 files, passed.
- git diff --check: passed. No web changes; web gates were not rerun.

Hosted failure receipts: jobs 107088964032, 107088964169 and 107088964192.
No provider call, installed-runtime upgrade or hosted-green claim is made here.

Refs #6423

Signed-off-by: CodeWhale Bot <bot@codewhale.net>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants