| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…o#24335) PR anomalyco#24308 already fixes the reported behavior by preserving config key order through Effect Schema decode. The existing "permission config preserves user key order" test only asserts the top-level key order; it does not catch a regression in the nested rule object (e.g. the keys inside `edit: { ... }` or `bash: { ... }`), which is exactly where anomalyco#24335 reproduces. Add a test that mirrors the reporter's full opencode.json end-to-end: load via Config.Service, then assert nested key order is preserved and that Permission.evaluate returns the expected actions for edit, external_directory, and bash with the user-specific allow rules.
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Sorry, something went wrong.
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fixes #24335.
PR #24308 (fix(config): preserve permission order with Effect decode) already addresses the user-visible behavior in #24335 — config decode now uses propertyOrder: "original", so user key order survives end-to-end (JSON → Effect Schema → Permission.fromConfig → Permission.evaluate).
The existing regression test permission config preserves user key order in test/config/config.test.ts only asserts the outer key order. It does not cover the nested rule object — i.e. the keys inside edit: { ... } or bash: { ... } — which is exactly where #24335 reproduces ("*": "deny" first, then a specific "~/Docs/...": "allow" after).
This test fills that gap by mirroring the reporter's opencode.json end-to-end:
Test plan