Skip to content

land: restore-asks-per-file - #552

Merged
ualtinok merged 4 commits into
mainfrom
land/restore-asks-per-file
Oct 18, 2026
Merged

ualtinok merged 4 commits into
mainfrom
land/restore-asks-per-file

Conversation

@aft-alfonso

@aft-alfonso aft-alfonso Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Checkpoint restore now asks for edit permission per checkpoint file instead of workspace-wide, so path-based deny/allow/ask rules apply per file and a denied file blocks the restore.

  • Restores can be scoped to specific files via path, file, or files; the permission ask and preview then target only the selected files, with file:// URL paths resolved.
  • Uses the existing checkpoint preview paths for the ask on OpenCode V1 and V2, and includes the denied path in the denial message.
  • Pi keeps its existing per-path project-root isolation without edit prompts.
  • Adds V1/V2 deny/allow/ask and scoped-restore coverage, plus Pi tests for project-root restriction.

Written for commit 379b79f. Summary will update on new commits.

View guided diff Turn on auto-fix

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issues were found.

Summary

Checkpoint restores now ask for edit permission only on the files being restored.

  • Checkpoint restores ask permission for the files they will write.

Reviews (3) · Last reviewed commit: "mason: resolve file URLs for restore pre..." · Reviewed by Greptile

ualtinok and others added 2 commits October 18, 2026 19:21
Use the existing checkpoint_paths preview for the shared OpenCode V1/V2 edit ask, before dispatching any restore writes. Preserve host rule-denial details so the deciding path reaches the caller.

Add real-bridge deny/allow/ask coverage for exact checkpoint files, atomic refusal, and deleted-file recreation. Pi has no host edit-rule engine; preserve its existing behavior and cover preview-based project-root isolation without introducing prompts.

Verified plugin typechecks/lint, targeted safety/V2/publication suites, pre-fix red tests and two mutation controls. Full plugin runs also exercised unrelated deadline/environment failures; targeted deadline reruns passed and the search audit failure reproduced on base code. Details: .cortexkit/internal-docs/investigations/issue-541/verification.md (delivery artifact).

Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Comment thread packages/opencode-plugin/src/tools/safety.ts
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
Comment thread packages/opencode-plugin/src/tools/safety.ts Outdated
Co-authored-by: alfonso-aft <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok
ualtinok added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 9702d76 Oct 18, 2026
49 checks passed
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