Skip to content

Desktop child-approval test fails on rust-preview since #6684: the parent now writes its workspace by default #6693

Closed

Description

@YongGoose

What happened

Since #6684 (b2e73dc0a), rust-preview CI has failed desktop-tests (cli) on every push. The failing test is:

  • terminal::desktop_new_session::desktop_parent_reviews_child_access_and_opens_attributed_sender_beside

It fails with this error:

no single control labelled Approve child decision; observed: Null

#6684 gave new conversations a default sandbox: a root conversation created by a person now takes its access from chat_defaults.sandbox_mode, which is WorkspaceWrite by default (plugins/agent/native/src/owner.rs, create_inner). The test's parent conversation therefore writes its workspace, and the child it creates inherits that access.

The test has the child ask to write workspace/report.md and the parent's model answer it with SessionRespond. Before #6684 the parent was read-only, so may_approve refused the write and asked the parent's person to confirm it, which shows Approve child decision. Now the parent's sandbox already permits the write. SessionRespond records the answer at once, and the confirmation never appears.

I confirmed this locally with temporary logging:

  • Both conversations are {"access":"workspace_write","requestPermissions":true}.
  • The parent's tool result is {"kind":"recorded",...}.

The product behavior matches #6684's intent; it updated model_child_inherits_caller_policy_not_workspace_session_or_installation for the same reason. Only this desktop test still assumes a read-only parent.

How to reproduce

cargo nextest run -p maka-cli --no-default-features --features desktop-tests --test integration \
  -E 'test(terminal::desktop_new_session::desktop_parent_reviews_child_access_and_opens_attributed_sender_beside)'

It fails after about 65 s on 0a5ce771a (current rust-preview).

CI runs:

Environment

  • Maka version or commit: rust-preview 0a5ce771a
  • OS and version: macOS 27.0.1 (arm64) locally; the same test fails in CI on Linux
  • Surface: desktop workbench (maka-cli desktop integration tests)
  • Node.js version, if running from source: 26.10.0

Logs, screenshots, or additional context

Proposed fix: make the test's parent conversation read-only before it delegates. It would use the same metadata permissions update a person makes, so the child again asks for access its parent lacks. I have this change and will open a PR.

Moving the requested path outside the workspace does not work: the fixture lives under the temporary directory, which workspace-write already permits.

The real-host fixture still sets the installation policy's agent.permissions.access to read_only. Since #6684 that value no longer reaches root conversations a person creates, because their access comes from the default sandbox. This issue only covers the failing test.

Activity

  1. YongGoose commented on Nov 7, 2026

    @YongGoose
    MemberAuthor

    take

  2. M4n5ter commented on Nov 9, 2026

    @M4n5ter
    Member

    Resolved on rust-preview:

    • feat(nsh): replace GPUI with native desktop and terminal backends #6674 (57470e4c1) updated Fixture::open_with_configuration / configure() in products/maka/terminal-shell/tests/real_host/support.rs to propagate configuration["agent"]["permissions"]["access"] ("read_only" by default) into ChatDefaults { sandbox_mode }.
    • fix(desktop): retain the Rust preview client after window close #6695 (9864d52160) added an explicit assert_eq!(observed["session"]["permissions"]["access"], "read_only", ...) guard in desktop_parent_reviews_child_access_and_opens_attributed_sender_beside.
    • Verified terminal::desktop_new_session::desktop_parent_reviews_child_access_and_opens_attributed_sender_beside passes on rust-preview CI (native-macos and native-windows, 22/22).

    Closing as completed (see also #6694).

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions