Repository navigation
Verify AI access code before enabling analysis - #14
Merged
Merged
Conversation
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.
The connection check previously confirmed only that OpenAI was configured, so an incorrect access code could still produce a success message and enable analysis. The status endpoint now validates a supplied code without calling OpenAI, and the interface enables analysis only after explicit authorization for the current code and URL.
Wrong codes receive a specific error. Pasted whitespace and invisible formatting characters are normalized, while OpenAI API keys and instruction text are rejected before transmission. Editing the code or server address invalidates readiness. Provider authentication failures reopen the connection form.
Validation:
npm run checkpassed, with 192 tests and both production builds. Regression coverage checks unauthenticated, incorrect, and accepted codes; no paid call or budget reservation during connection checks; old-server responses; and pasted-key rejection. The issued local access code was also confirmed against the live Render server without a paid analysis.Public verification: deployed commit a6b5e72 to Render and GitHub Pages. The browser rejected an incorrect code, confirmed the issued code, and completed a real OpenAI analysis. Changing a verified code immediately disabled analysis in the browser regression check.