GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(permission): port upstream case-insensitive file permission matching on macOS (anomalyco/opencode#64626) by devin-ai-integration[bot] · Pull Request #1842 · AltimateAI/altimate-code

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 25, 2026 •
edited by cubic-dev-ai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #1841

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Ports upstream anomalyco/opencode#64626.

User-visible failure: macOS file systems ignore case by default, but the fork matched file permission rules with case. A rule like edit: { ".opencode/*": "ask" }, read: { "*.env": "ask" }, an external_directory deny or a sensitive_write guard (.git/*) did not fire when the agent used a different spelling such as .OPENCODE/plugins/x.ts, Secrets.ENV or .GIT/hooks/pre-commit. The file system still opened the protected file, so the write or read happened with no prompt.

Change: in PermissionEvaluate.matchPattern (packages/opencode/src/permission/evaluate.ts), on darwin the input and pattern are lowercased for the file path permissions read, edit, external_directory and sensitive_write. Upstream added an ignoreCase flag to Wildcard.match; the fork's Wildcard already has its own match/matchPath split (Windows already matches without case), so the fork applies the change at the one place where rules are matched. Command rules (bash, etc.) and Linux behaviour do not change. Wrapped in altimate_change start — upstream_fix: markers.

How did you verify your code works?

  • New packages/opencode/test/permission/case.test.ts (4 tests): on macOS each file permission matches a different-case path, bash rules keep case, Linux keeps case. 2 of the tests fail without the fix.
  • bun test test/permission test/permission-task.test.ts test/permission-yolo.test.ts test/tool/search-read-permissions.test.ts: 225 pass, 0 fail.
  • tsgo --noEmit in packages/opencode: pass (run with --singleThreaded; the multi-threaded run was killed for memory on the 8 GB VM).
  • bun run script/upstream/analyze.ts --markers --base origin/main --strict: ok. bun script/check-tracker-leaks.ts: ok.

Cost side effects

None. Only changes how permission rules are compared; no model calls, queries or cloud resources.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR
  • I checked for cost side effects (model calls, queries or cloud resources that grow with user data) and described them, or wrote "none"

Devin Review


Summary by cubic

Fixes macOS permission matching so case differences no longer bypass file path guards. Because macOS volumes ignore case, a path like .OPENCODE/x opened a file protected by the rule .opencode/*, letting writes, reads, and external directory access proceed without a prompt. read, edit, external_directory, and sensitive_write rules are now matched case-insensitively on macOS only; command rules and Linux behavior are unchanged.

Ports the upstream fix in anomalyco/opencode#64626.

  • Windows already matched file paths without case; the fork centers the change at the single rule-matching point in evaluate.ts.
  • Adds case.test.ts with 4 tests covering macOS file rules, macOS command rules, and Linux behavior.
  • No cost side effects: only rule comparison changes, no model calls or queries.

Written for commit caad777. Summary will update on new commits.

View guided diff Turn on auto-fix

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@devin-ai-integration
fix(permission): port upstream case-insensitive file permission match…
caad777
…ing on macOS (anomalyco/opencode#64626)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5c62570b-6048-4d15-8524-98608ef98e64

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devin-ai-integration
devin-ai-integration Bot requested a review from anandgupta42 November 25, 2026 17:55
@github-actions github-actions Bot added the needs-review:blocked label Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026

Copy link
Copy Markdown

👋 This PR was automatically closed by our quality checks.

Common reasons:

  • New GitHub account with limited contribution history
  • PR description doesn't meet our guidelines
  • Contribution appears to be AI-generated without meaningful review

If you believe this was a mistake, please open an issue explaining your intended contribution and a maintainer will help you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

devin-ai-integration[bot]
devin-ai-integration Bot commented Nov 25, 2026
View reviewed changes

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/opencode/src/permission/evaluate.ts
Comment on lines +22 to +24
export function ignoresCase(permission: string, platform: NodeJS.Platform = process.platform) {
return platform === "darwin" && PATH_PERMISSIONS.includes(permission)
}

@devin-ai-integration devin-ai-integration Bot Nov 25, 2026

Copy link
Copy Markdown
Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟥 File permissions allow distinct files

On case-sensitive macOS volumes, ignoresCase makes a file-specific allow match a distinct file whose name differs only by case. ReadTool then reads that file even when the default policy denies it.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@devin-ai-integration devin-ai-integration Bot mentioned this pull request Nov 25, 2026
upstream: provider/security fixes not yet ported #1478
Open
29 of 90 tasks

This branch has not been deployed

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

Reviewers

@anandgupta42 anandgupta42 Awaiting requested review from anandgupta42

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs-review:blocked

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

permission: file path rules can be bypassed on macOS by changing the case of the path

Uh oh!

There was an error while loading. Please reload this page.

0 participants

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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.