fix(guard-core): include app/ in core scope envelope#24
Conversation
Next.js App Router repos use app/ rather than apps/. Without this prefix, core-scoped intents on terminal routes trigger I4 divergence warnings. Co-authored-by: michaeljjudan <[email protected]>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41be1f601c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| docs: ['docs/', 'README', 'DOCS.md', 'CONTRIBUTING.md', 'LICENSE', 'FOR-'], | ||
| ci: ['.github/'], | ||
| core: ['apps/', 'packages/', 'src/', 'lib/'], | ||
| core: ['app/', 'apps/', 'packages/', 'src/', 'lib/'], |
There was a problem hiding this comment.
Add app/ to the default tier policy**
When changed-file analysis runs with the built-in policy, an App Router path such as app/api/vault/status/route.ts is now accepted by the core envelope here, but DEFAULT_POLICY still lacks an app/** EP-2 rule, so classifyFile(DEFAULT_POLICY, ...) falls through to Rule 5.2 as EP-3. In default-policy repositories this leaves scope: core App Router PRs deny-by-default tiered, and any intent validation error makes them fail-closed even though the divergence warning was removed.
Useful? React with 👍 / 👎.
Summary
Adds
app/to the EPICONcorescope envelope so Next.js App Router repositories (e.g.mobius-civic-ai-terminal) do not trigger I4 divergence warnings when declaringscope: core.Motivation
Terminal PR #627 changes
app/api/vault/status/route.tsandlib/vault-v2/store.ts. Thecoreenvelope previously listedapps/(monorepo layout) but notapp/(App Router), causing a false I4 warning on every App Router route change.Changes
packages/guard-core/src/intent.mjs— addapp/prefix tocoreenvelopepackages/guard-core/test/envelope.test.mjs— regression tests for App Router pathsTests
All 8 tests pass.
Release note
After merge, move the
v1action tag to this commit so consumers ofkaizencycle/epicon@v1pick up the fix.