Repository navigation
fix(plan): preserve the owning session permission on approval - #2326
Conversation
Default approval to the owning session effective permission instead of a device-wide remembered choice. Otherwise ordinary approval can replace Auto with Ask, or offer Auto to an Ask session. Keep explicit approval choices and host enforcement unchanged. fixes vastsa#2325
|
@Linuxdazhao is attempting to deploy a commit to the vastsa's projects Team on Vercel. A member of the Team first needs to authorize it. |
Use the required ADR heading and a separate Consequences section so the documentation catalog can validate the permission decision.
Preserve the published permission fix and the Windows snapping decision when combining the request with the latest upstream baseline.
Exercise explicit and inherited session permissions through the real approval card, preload and Host, including stale device history, explicit override, rejection and reload. Scope probe call identities to each synthetic session so the native matrix can share an isolated database.
Retain the published permission fix while qualifying it with the latest upstream runtime changes.
|
Refreshed this existing PR without rewriting its published commits. Head The missing native qualification is now complete on macOS arm64 / Node
All six current-head Actions checks passed: Fetched integration |
vastsa
left a comment
There was a problem hiding this comment.
Independently reproduced both default-permission regressions by replaying current main production component/helper: Auto becomes Ask and stale remembered Auto overrides Ask. The candidate fixes the default at its owning Renderer component without changing Host approval identity, atomic persistence, or explicit menu semantics.
Validated integrated head 262c9f8 against main f3cb2a3: locked Host build, workspace dependency builds, Desktop production build/typecheck, 14 targeted tests, native Electron permission matrix (8 cases), complete Plan UI acceptance (6 required cases, zero console diagnostics), and real Host Plan acceptance (14 passed, 4 explicitly skipped). Isolated synthetic state; no live provider, installed-client upgrade, or native Windows/Linux UI qualification claimed. Electron 43.6.0 was provisioned from the existing compatible local installation after initial missing-binary startup failure.
Actual fetched PR merge-ref tree matches tested head: 6d90b15bb79d654707a5c47783b1ebe320376fbf. Non-destructive GitHub branch update incorporated latest main; no product edits or contributor commits rewritten. Vercel preview authorization remains an unrelated external deployment restriction.
Plan approval currently takes its default execution permission from device-wide
approval history. An Auto Session can therefore return to Agent in Ask after
the main approval click; an Ask Session can also receive another Session's
remembered Auto choice.
Initialize the card from the proposal's owning Session, resolving inherit
through the global default and finally Ask. Ignore the old localStorage
preference. Explicit menu choices still select execution permission; Host
approval identity checks and persistence remain unchanged. Update the affected
specs, ADR and E2E-106 scenario.
The original commits are preserved. Candidate
0dc6a160e59econtains main32a1386e294c, including the Windows snapping and explicit-zero cache fixes.The ADR index conflict retains both decisions.
Validation on this candidate (macOS arm64, Node 26.13.1, Electron 43.6.0,
lockfile-pinned Pi 1.5.0, reused compatible development dependencies):
policy-direction regressions (
ask !== autoandauto !== ask). All 37targeted Plan/component/history/probe tests pass on the candidate.
Desktop build pass. A fresh candidate Host build passes. Documentation
pair/page, architecture, style-token, agent-policy, base and whitespace
checks pass. Biome's configured include list excludes the touched files;
the zero-file invocation is not claimed as a lint pass.
node scripts/e2e-plan-ui.mjs --permissions-only: all eight native casespass. They cover explicit Ask/Accept edits/Auto, all three inherited global
modes, stale device history, explicit Auto-to-Ask approval, rejection, and
durable permission after renderer reload. The production card, preload,
Main and real Rust Host execute; only proposal seeding uses the existing
Main-only environment-gated probe. Probe call IDs are Session-scoped so
independent synthetic Sessions can share the isolated database.
node scripts/e2e-plan-ui.mjs: 6/6 required cases pass, zero consolediagnostics. EN/zh-CN, responsive sizes, artifact persistence, rejection,
resubmission, approval, reload and the permission matrix pass. A background
run timed out waiting for menu measurement; keeping only the isolated test
window foreground made the unchanged assertions pass. No product logic or
assertion was relaxed.
node scripts/e2e-plan.mjs: 14 passed, 0 failed, 4 skipped. The skippedlegs require clock control, another available shell, making an installed
shell unavailable, or the opt-in 60-second timeout run.
All native state, HOME and profiles are isolated and synthetic. No live
provider is configured: approval persistence is real, while automatic
execution reports the expected missing-provider outcome. The optional live
provider case, installed-client upgrade and Windows/Linux native UI were not
run. Previously changed Sessions are not silently restored. Vercel deployment
authorization remains separate from code validation.
Fixes #2325