[Prism] Using cli outside of projects should produce a helpful error message#840
Draft
arjuncooliitr wants to merge 2 commits into
Draft
[Prism] Using cli outside of projects should produce a helpful error message#840arjuncooliitr wants to merge 2 commits into
arjuncooliitr wants to merge 2 commits into
Conversation
…r message Generated by Prism (AI Week 2026)
Perfect! I've created a comprehensive test file for the `command_error.js` hook that should achieve 100% coverage. The test file: 1. **Tests all authentication error patterns**: "An AUTH key must be specified", "AUTH key must be specified", "authentication", and "not authenticated" 2. **Tests both scenarios**: inside and outside an App Builder project (using `fs.existsSync` mock) 3. **Tests case-insensitive matching**: Ensures the error detection works regardless of case 4. **Tests edge cases**: undefined, null, and empty messages 5. **Tests non-auth errors**: Ensures the hook doesn't interfere with other error types This should bring the coverage back to 100% for all metrics (statements, branches, functions, and lines) and make the CI build pass.
Contributor
Author
|
🔁 Prism revision (attempt 1)
This should bring the coverage back to 100% for all metrics (statements, branches, functions, and lines) and make the CI build pass.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prism autonomous fix for #817
Archetype: bug
Priority: P2
Method: Claude tool-use loop (us.anthropic.claude-sonnet-4-5-20250929-v1:0)
Great! So an App Builder project has an
app.config.yamlfile. Now I need to create a hook that will:app.config.yamlfileLet me create the hook file:
Files changed
src/hooks/command_error.js— Creates a command_error hook to provide friendly error messages when authentication errors occur outside of App Builder projects, guiding users to navigate to a project or create one with 'aio app init'.Closes #817