Skip to content

DARK-22: restrict nested CLI provider tools - #685

Draft
cooper (czxtm) wants to merge 1 commit into
mainfrom
audit/DARK-22-existing-work
Draft

DARK-22: restrict nested CLI provider tools#685
cooper (czxtm) wants to merge 1 commit into
mainfrom
audit/DARK-22-existing-work

Conversation

@czxtm

@czxtm cooper (czxtm) commented Sep 10, 2026

Copy link
Copy Markdown
Member

Parked after Cooper narrowed DARK-20 to pre-existing workspace issue work. This repository discovery has an audit-created tracking issue and is outside the active merge recommendation; source and validation below are preserved records.

Runs nested CLI invocations from an empty temporary directory and centralizes provider arguments for summary and evolve paths. Claude built-in/MCP tools and configuration discovery are disabled; Codex and OpenCode invocations are refused. Includes the existing root-cause report and four regression tests.

Draft pending a provider compatibility decision: Claude now always receives --bare, which the official CLI documentation says skips OAuth credentials and the system keychain and does not use subscription login. The current provider only passes tool/model and does not inject an API key, so subscription-authenticated CLI users lose access unless a supported API credential is inherited. Removing --bare would reopen hook/config discovery; choose the authentication/containment contract before changing implementation.

Readiness review of head 274f81682adb489ad6b127bc70e71fa45e1072de: all completed CI checks passed, including Rust Check, Rust Tests (Linux), macOS build, TypeScript, Treefmt, Storybook, hooks, and Danger. Those tests establish argument/cwd behavior, not real CLI login compatibility. No live model calls or additional code changes were made. Published under DARK-22/DARK-20; no merge or deployment.

Preserves existing working-copy changes for review during DARK-20.
@github-actions

Copy link
Copy Markdown
Contributor
Warnings
⚠️

PR description is missing a ## Test Plan (or ## Testing Instructions) section. Add one describing how a reviewer can verify your change, or check No test plan needed if no testing is needed.

⚠️ PR is marked WIP / draft — do not merge until ready for review.
⚠️

This PR touches behavior-sensitive code that is documented in darkmatter/nixmac-web. Please either:

  • Open a companion docs PR and check Docs updated in the PR description, or
  • Check No docs update needed if the change doesn't affect user-facing behavior.

📋 PR Overview

Lines changed 512 (+489 / -23)
Files 1 added, 2 modified, 0 deleted
Draft / WIP yes
Has Test Plan no
Linear issue yes
No Test Plan Needed no
New UI components no
New Storybook stories no
New Rust modules no
New TS source files no
New tests no
package.json touched no
Cargo.toml touched no
Infra / CI touched no

🔬 Coverage

Report Lines Statements Functions Branches
apps/native/coverage/coverage-summary.json 34.3% 33.8% 29.0% 29.1%

Generated by 🚫 dangerJS against 274f816

@darkmatter

darkmatter Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🎨 Storybook preview

Open Storybook preview

Updated for 274f816


⚠️ Detected UI changes (5)

These stories' HTML snapshots changed. I've added screenshots + links to the changed stories below. Review them carefully then accept the changes to regenerate baselines and include them in this PR:

Flows/Evolve › Playground

Flows/Evolve › Playground

Flows/Evolve › 1. Begin (idle)

Flows/Evolve › 1. Begin (idle)

Flows/Evolve › 2. Evolving (progress)

Flows/Evolve › 2. Evolving (progress)

Flows/Evolve › Evolving With Error Event

Flows/Evolve › Evolving With Error Event

Flows/Evolve › 3. Review (changes generated)

Flows/Evolve › 3. Review (changes generated)


Accept UI changes

  • Click here to accept these changes

Alternatively, you can run bun run test:update-snapshots locally to re-generate the baselines and then push the changes to this PR.

What does this do?

The screenshots above show UI changes detected by the Storybook
snapshot tests run on this PR. Each image is the rendered output of
a Storybook story from the code in this PR branch; the snapshot
test compared it against the committed baseline in
__snapshots__/ and flagged the difference.

Checking the box tells the darkmatter[bot] to regenerate the
baselines from this PR's current code and commit them directly to
this branch. The new baselines become the source of truth for
future runs — only accept after confirming the visual changes are
intentional.

Comparison baseline: the committed __snapshots__/ files on this
PR branch (carried forward from develop). Accept updates them in
place on this branch.

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.

1 participant