[PR #7033] docs: add "Order matters" section #12214

Closed
opened 2026-02-16 18:17:08 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7033

State: closed
Merged: No


The documentation has been updated with a new "Order matters" section (lines 72-107) that:

  1. Prominent caution callout - Uses :::caution to visually highlight that rules are evaluated in declaration order and the last matching rule wins

  2. Shows the common mistake - Example where "rm *": "deny" is placed before "*": "allow", which incorrectly allows rm commands

  3. Explains why it's wrong - Clarifies that rm foo matches both patterns, and since "*": "allow" comes last, it wins

  4. Shows the correct pattern - Put the catch-all "*" first, specific overrides last

This directly addresses the issue where users were experiencing broken configs after the v1.1.1 update because they had wildcards at the end of their permission rules (which worked in the old specificity-based system but not in the new declaration-order system).

Closes #6856

New%20session%20-%202026-01-06T04%3A42%3A46.770Z
opencode session  |  github run

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7033 **State:** closed **Merged:** No --- The documentation has been updated with a new **"Order matters"** section (lines 72-107) that: 1. **Prominent caution callout** - Uses `:::caution` to visually highlight that rules are evaluated in declaration order and the last matching rule wins 2. **Shows the common mistake** - Example where `"rm *": "deny"` is placed before `"*": "allow"`, which incorrectly allows `rm` commands 3. **Explains why it's wrong** - Clarifies that `rm foo` matches both patterns, and since `"*": "allow"` comes last, it wins 4. **Shows the correct pattern** - Put the catch-all `"*"` first, specific overrides last This directly addresses the issue where users were experiencing broken configs after the v1.1.1 update because they had wildcards at the end of their permission rules (which worked in the old specificity-based system but not in the new declaration-order system). Closes #6856 <a href="https://opencode.ai/s/HWiWTds4"><img width="200" alt="New%20session%20-%202026-01-06T04%3A42%3A46.770Z" src="https://social-cards.sst.dev/opencode-share/TmV3IHNlc3Npb24gLSAyMDI2LTAxLTA2VDA0OjQyOjQ2Ljc3MFo=.png?model=opencode/claude-opus-4-5&version=1.1.3&id=HWiWTds4" /></a> [opencode session](https://opencode.ai/s/HWiWTds4)&nbsp;&nbsp;|&nbsp;&nbsp;[github run](/anomalyco/opencode/actions/runs/20738281393)
yindo added the pull-request label 2026-02-16 18:17:08 -05:00
yindo closed this issue 2026-02-16 18:17:08 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12214