You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pin registered project folders before chat launch - #6443
Pin each registered project to its saved directory identity, refuse moved or unconfirmed folders at the server launch boundary, and retain registered identity across canonical/alias resumes. Registration captures the pin before registry I/O; explicit confirmation and root edits recheck their approved directory under the registry lock. Stored root keys remain unchanged.
Confirm folder and root edits require fresh macOS Touch ID authentication without password/watch fallback, following Val’s current clarification. Familiar-relayed approval and mobile ingress are refused. Confirmed canonical roots feed forwarded grants and Claude write scope, with checks repeated before dispatch, spawn and retries. The retained snapshot from owner session 7fcd2b86 (641530e7d) was ported against current main and strengthened with behavioral regressions.
Validation: full API suites passed 617 files under both /tmp/... and /private/tmp/... HOME, run serially; app 1,505 files; mobile contracts 106; typecheck, lint, test wiring and production build passed. The focused production Project access browser run passed eight checks without retries. Failing-first controls, first failures, screenshots and the acceptance matrix are retained in delivery-receipts/issue-6215-2026-11-10/. The isolated-HOME app suite’s two existing Chromium-canvas skips are recorded separately from the successful browser run.
Visual sign-off is needs-Val. The production screen was inspected in the default browser and both legacy and confirmed states are captured; Val observed and approved the replacement Touch ID-only native prompt. The original broad device-owner policy succeeded without a prompt and failed acceptance; the failure and repair are retained in the receipt history. Windows/Linux native confirmation is currently unavailable and fails closed; Macs without available enrolled Touch ID also fail closed. Light/alternate-theme review and installed-package acceptance remain needs-Val.
Hosted validation: required Frontend build and all 28 latest checks passed at this head. The full second attempt passed all 1,190 iOS cases; the first WebView startup failure, browser skips and one runner-level browser retry are retained in the morning criterion checkpoint.
Hold for Val’s merge approval at exact head fd3a5da028e22c0fc0b6b06a33c27df5dfaae7b8. Automatic merge and issue closure are outside this delivery.
Bind project authority to confirmed directory identities across admission, forwarded grants, write scope and spawn. Require native human authentication for confirmation and root edits, preserving alias identity, grant-level merging and legacy refusal.
Refs #6215.
Exclude device-owner password and watch fallback after the native retry succeeded without a visible prompt. Preserve the failure evidence and record Val’s observed approval of the replacement Touch ID ceremony.
Refs #6215.
## Summary
Adds a resumable first-use introduction and persistent default project, familiar scope and acting familiar. New work starts with concrete context; unavailable defaults and interrupted launch briefs remain available for explicit repair. Installation success and dismissing guidance do not complete the introduction.
Existing conversation bindings, explicit All projects browsing, drafts and reviewed access choices retain their authority. Bound chats reopen guidance from Session options or Tools without taking transcript space.
## Behavior
- Host-owned, revision-checked progress/defaults with cross-process locking, live eligibility inspection and a separate starter-folder/access review.
- A short practice outcome teaches project, actor, effective access, approval, progress, Stop, retry and evidence without calling a model or modifying project files.
- Shared main/Tray/Notch admission rules refresh the full saved scope, preserve files until admission, reject superseded reads and pending follow-ups after accepted Stop, and wait for voice project readiness.
- Effective access follows direct/group grants; supreme designation cannot imply Write. Passive runtime checks follow the selected SSH, Hermes API, paired OpenClaw Gateway or local transport and authorized project root; send-time authorization remains authoritative.
- Reuses #6450’s Read-grant Build admission and grant preconditions from `119a775f2a228c2ddfead75c327b2d90460f42dd`; its other UI remains separately owned. #6443 root pinning is not ported.
## Verification
- Complete local suites: 1,514 app test files, 620 API test files passed; the integrated head subsequently passed all 107 mobile contract test files. After the final initialization-focus guard, 29 guide/route behavior tests, final typechecked production build and focused lint passed.
- Final production browser run: 121 cases passed without retries, covering 99 first-use cases across desktop Chromium, Pixel 5 and iPhone 13 WebKit plus 22 phone transcript/composer cases. The unchanged keyboard oracle also passed 30 repeated cases without retries.
- Affected legacy browser suites passed with explicit installation/workspace fixtures. Existing assertions, layout/performance thresholds and timeouts were preserved. A subsequent flag-enabled production build passed all 33 Board/Research cases without retries, with one expected disabled-capability skip. The final remaining-shard selection passed 181/181 cases, including its dependencies, without retries; the hosted canonical gate remains separate.
- Full lint, UI/token contracts, all 2,250 test files wired and production bundle/standalone budgets passed. Final read-only source review found no Critical or Important findings.
- [Local evidence, retained first-failure hashes, screenshots and acceptance limits](https://github.com/OpenCoven/coven-cave/blob/d4f7c99f98073a717550e415b2024ae8b8ea37e3/delivery-receipts/issue-6458/README.md). Approval repairs are published in `2412f6f7081da7bfade2e10cfc642ed397142c2f`. Main’s already-landed iOS work was integrated in `fe0c0631cd74861d1ee37f42f8deb6459853db21`. Final head `d4f7c99f98073a717550e415b2024ae8b8ea37e3` adds fixture declarations and receipts, with product source unchanged; that exact head passed the [complete hosted run](https://github.com/OpenCoven/coven-cave/actions/runs/43235522428), including the required [Frontend build](https://github.com/OpenCoven/coven-cave/actions/runs/43235522428/job/131249672025). All 27 check runs are complete: 26 successful and the iOS job skipped by path selection. The Code Desk drawer-floor case passed after retry; its first failure is retained separately from the retry-free local qualifications.
## Acceptance boundaries
An absent first-use record requires the introduction on fresh and existing installations. Saved defaults grant no access and cannot replace current permission/runtime authority. Verification used synthetic state and changed no real-account grants.
Installed native/Tauri handoff, physical-device and human/screen-reader acceptance remain unqualified. The limited default-browser inspection covered opening screens and keyboard focus; complete practice and interruption evidence comes from production browsers. Release delivery is separate. The issue-owned worktree remains intentionally preserved for recovery and verification.
Implements #6458. Overlap coordination was recorded on the existing issues; owner-session acknowledgement and private execution coverage remain unknown.
Signed-off-by: Val Alexander 👑 <val@opencoven.ai>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Active critical authorization and packaging issues remain, including stale root validation that can permit dispatch to a retargeted project and a packaged helper path that makes confirmation fail.
This PR pins each registered project to its resolved directory identity and enforces that identity before chat, Board, voice, and resumed-generation launches. It adds Touch ID-only confirmation for legacy projects and deliberate root changes, fail-closed behavior for moved folders or unavailable authentication, and broad regression coverage.
Changes:
Persists and validates rootRealpath across registration, edits, confirmation, aliases, resumes, worktrees, grants, and runtime launch boundaries.
Adds project-settings confirmation UI/API, macOS native authentication, and user-facing web and iOS error handling.
Adds integration and regression tests, native build wiring, documentation, and delivery receipts.
File
Description
src/lib/voice/start-voice-chat.ts
Maps folder-pin launch failures to actionable voice-chat messages.
src/lib/voice/start-voice-chat.test.ts
Tests voice-chat messages for moved and unconfirmed project roots.
src/lib/use-projects.ts
Adds the project-folder confirmation mutation and state handling.
src/lib/use-projects.test.ts
Updates mutation-notification coverage for folder confirmation.
src/lib/server/project-root-pin.ts
Validates pinned directory identity before launch, grant forwarding, and spawn.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Critical launch paths still permit folder-pin bypasses or use stale authorization, and the packaged macOS app omits the authentication helper needed for legacy-folder confirmation and root edits.
Report pin refusals separately and offer folder confirmation
src/app/api/chat/send/route.ts:3192
This filter also excludes unconfirmed and moved projects, but omittedGrantCount reports all excluded grants as “unavailable on this host” at line 3950. Existing legacy directories therefore get the wrong diagnosis and no confirmation guidance. Count pin refusals separately and direct those users to Confirm folder in project settings.
Offer folder recovery for streamed moved-root errors
src/components/chat-view.tsx:5863
This recovery only handles an HTTP 409, but the new last-moment spawn guard also reports project_root_moved through an SSE error event after returning HTTP 200. handleEvent's error branch only sets the message/failed request, so that refusal never sets projectsFixNeeded and offers Retry instead of Open projects. Apply the same code-based folder recovery to streamed error events so a late redirect has the same repair action as an early refusal.
return { ok: false as const, status: 403, code: "project_folder_authentication_required", error: "Authenticate on this Mac to confirm the folder. Use Touch ID, then retry." };
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 25b2c8687, per Val's decision to return a truthful unavailable result. authenticateProjectFolder now returns true | false | "unavailable". It returns "unavailable" when not on macOS, when the helper is missing, when the helper exits 2 (canEvaluatePolicy fails, so no usable Touch ID), and when the helper cannot start. Confirmation and root edits then return 409 project_folder_authentication_unavailable, saying Touch ID isn't available on this device and naming the way forward (remove and re-add the project, or add the new folder as its own project). A declined or timed-out prompt keeps 403 project_folder_authentication_required. Tests cover the exit-status mapping using stub helpers (0, 1, 3, 2 and missing) and the route responses. docs/project-permission-integrity.md is updated to match.
@copilot resolve the merge conflicts in this pull request and resolve by implementing changes recommended
Resolved the conflicts and implemented the review recommendations. Current project pins are reloaded at Board/chat launch boundaries, root snapshot failures now fail closed with structured errors, and the Touch ID helper is included at the packaged sidecar path. Added regression coverage; lint and the production build pass. Merge commit: 48d79c2 (two parents). CodeQL reported no alerts but timed out before completing language analysis.
Read-only verification of all 12 Copilot threads at head ae654c06e
Every finding was checked against the code at the current head, not against the fix commit's message. (Commit 48d79c29a is a main merge that also carries the fixes.) Verdict: 9 fixed, 1 not a bug, 2 still open. Not ready to merge.
#
Thread
Verdict
Evidence at ae654c06e
1
Board pin recheck
Fixed
board/[id]/chat/route.ts: recheckProjectRoot() → assertCurrentPinnedLaunchRoot before session reuse, around resolveRepoRoot/provisionIssueWorktree, before the native reservation and before callDaemon
2
Stale projects closure
Fixed
chat/send/route.tsassertLaunchFoldersUnchanged reloads loadProjects() before each launch and each attempt
3
Packaged helper path
Fixed
scripts/sidecar-bundle.sh copies the helper to resources/server/native/confirm-project-folder and fails if it is missing; release.sh signs it. Docs line 39 still says the helper is "included in the trace" when it is actually copied
4
Root-edit realpath race
Fixed
projects/[id]/route.ts realpath in try/catch → 400 project_root_unavailable; a mismatch under the lock → 409
5
Password copy
Fixed
Copy now says Touch ID
6
Confirmation realpath race
Fixed
project-folder-confirmation.ts try/catch → 400 before authentication
7
Docs password ceremony
Fixed
docs/project-permission-integrity.md:37 says Touch ID only
8
OpenClaw moved-folder escape
Fixed (leftover)
spawnChild catches the moved-folder error and calls failChild. Leftover: any other loadProjects error is still rethrown into void finalizeChild(code), an unhandled rejection that leaves the run registered. Minor
9
Hermes API ordering
Fixed
The folder check now runs before runHermesApiAttempt, so every retry goes through it. No test pins this ordering
10
Re-resolve after await
Not a bug
The re-resolved root must stay inside the saved pin, and the registered root must equal the pin. assertPinnedLaunchRoot refuses any later swap
11
Confirmation skips isAllowedNewProjectRoot
Still open: blocking
confirmProjectFolderWithHuman uses only validateCaveProjectRoot and the realpath. If a registered root is retargeted to $HOME or /, launch refuses it as moved, but confirmation then pins the realpath, and the project's grant covers the whole home or volume. Registration and root edits both forbid that. Fix: apply isAllowedNewProjectRoot to the realpath before authenticating and again under the lock
12
Unavailable prompt reported as a denial
Still open: Val's decision
Non-macOS, a missing helper and no Touch ID all return false, so the copy says "Use Touch ID, then retry" when no prompt can appear. It fails closed, but projects created before pinning can't be confirmed there. This is the Windows/Linux limitation #6215 already routes to Val; a distinct unavailable result (the helper's --check mode) would make it truthful
Item #11 was also confirmed by a second read. Covering tests exist for #1–#6 and #8 (source-shape tests plus project-root-pin-regression, project-folder-confirmation, and the route-level moved-folder 409). None covers #7, #9's ordering or OpenClaw's local retry behaviour.
Checks: 30 pass, including the required Frontend build. The one failure is iOS transcript (ChatScrollBounceUITests.testThousandMessageConversationKeepsRichRenderingBounded: "real view-hierarchy and renderer ownership metrics must be captured"). That is the native scroll-metrics lane and is unrelated to this web/server change; it needs a whole-workflow rerun for exact-head evidence.
The 12 threads are left unresolved for the owner. The local branch copy in .worktrees/issue-6393-grant-sandbox (stale at fd3a5da) was not touched.
…irmation
Folder confirmation pinned whatever a registered root resolved to, so a root
retargeted to the home folder or a drive root could be confirmed and widen
the project's grant to it. Registration and root edits already refuse those
roots. Confirmation now applies isAllowedNewProjectRoot to the realpath
before the Touch ID prompt and again under the registry lock, and root edits
re-check the realpath they authenticate.
Where no prompt can appear (not macOS, no bundled helper, or no usable
Touch ID: the helper exits 2), confirmation and root edits returned the
"Use Touch ID, then retry" denial. They now return
409 project_folder_authentication_unavailable with copy that says so and
names the way forward. Declined or timed-out prompts keep the 403.
Addresses review findings 11 and 12 on PR #6443 (#6215).
CI on head ddd951852 (the main merge on top of repair commit 25b2c8687):
Attempt 1 failed:iOS build → testWidthReflowKeepsTheLastLinePaintedInsideTheNativeBubble, XCTAssertNotNil failed. That made Frontend build fail. This PR changes no iOS source, and the same test passed on main5652dedae and on this PR's earlier head ae654c06e.
Attempt 2 (whole-workflow rerun of run 44660101791) succeeded.Frontend build passed. The separate iOS transcript, iOS release toolchain and Windows startup workflows passed on their first attempt.
Treat the first failure as a native layout flake candidate, not a pass. Finding #8 (an unhandled rejection on other loadProjects errors) is still a minor leftover from the earlier review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #6215.
Pin each registered project to its saved directory identity, refuse moved or unconfirmed folders at the server launch boundary, and retain registered identity across canonical/alias resumes. Registration captures the pin before registry I/O; explicit confirmation and root edits recheck their approved directory under the registry lock. Stored root keys remain unchanged.
Confirm folder and root edits require fresh macOS Touch ID authentication without password/watch fallback, following Val’s current clarification. Familiar-relayed approval and mobile ingress are refused. Confirmed canonical roots feed forwarded grants and Claude write scope, with checks repeated before dispatch, spawn and retries. The retained snapshot from owner session
7fcd2b86(641530e7d) was ported against current main and strengthened with behavioral regressions.Validation: full API suites passed 617 files under both
/tmp/...and/private/tmp/...HOME, run serially; app 1,505 files; mobile contracts 106; typecheck, lint, test wiring and production build passed. The focused production Project access browser run passed eight checks without retries. Failing-first controls, first failures, screenshots and the acceptance matrix are retained indelivery-receipts/issue-6215-2026-11-10/. The isolated-HOME app suite’s two existing Chromium-canvas skips are recorded separately from the successful browser run.Visual sign-off is needs-Val. The production screen was inspected in the default browser and both legacy and confirmed states are captured; Val observed and approved the replacement Touch ID-only native prompt. The original broad device-owner policy succeeded without a prompt and failed acceptance; the failure and repair are retained in the receipt history. Windows/Linux native confirmation is currently unavailable and fails closed; Macs without available enrolled Touch ID also fail closed. Light/alternate-theme review and installed-package acceptance remain needs-Val.
Hosted validation: required Frontend build and all 28 latest checks passed at this head. The full second attempt passed all 1,190 iOS cases; the first WebView startup failure, browser skips and one runner-level browser retry are retained in the morning criterion checkpoint.
Hold for Val’s merge approval at exact head
fd3a5da028e22c0fc0b6b06a33c27df5dfaae7b8. Automatic merge and issue closure are outside this delivery.