Repository navigation
Conversation
Collaborator
|
Thanks, @fenix007! 🙏 Closing — the branch is catastrophically drifted from the current release tip (543 files / +35k/-29k, almost all base-drift), so the actual image-generation API-key-auth change is buried and can't be merged safely. A fresh focused branch against the latest |
6 tasks done
Contributor
Author
|
Rebuilt from the latest |
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.
Summary
REQUIRE_API_KEYand reject invalid presented keys on canonical and provider-scoped image generation routes.api_key_idandapi_key_name.Related Issues
Validation
npm run lintnpm run test:unit(targeted route suite passes 13/13; full suite exits 1 on unrelated baseline/platform failures described below)npm run test:coverage(coverage thresholds pass, but the command exits 1 on the same unrelated test failures)>= 60%for statements, lines, functions, and branchesnpm run typecheck:corenpm run buildTests Added Or Updated
tests/unit/image-generation-route.test.tsREQUIRE_API_KEY=trueCoverage Notes
The updated route suite exercises both authentication branches and successful call-log attribution. Full coverage completed above the configured thresholds: 83.04% statements, 83.04% lines, 87.05% functions, and 78.18% branches.
The full unit/coverage command still exits 1 on failures unrelated to this change, including CRLF-sensitive golden snapshots on this checkout and
tls-profiles-valid-5591rejecting the existingchrome_149profile while the installed wreq-js catalog ends atchrome_147.Reviewer Notes
Image provider handlers emit call logs in many provider-specific branches.
AsyncLocalStoragekeeps the validated key identity request-scoped and concurrency-safe without threading attribution arguments through each handler. Explicit call-log API-key fields still take precedence. No schema or migration changes are required.The local Husky scripts are checked out with CRLF and cannot execute under
/usr/bin/env sh; their documented commands were run manually before committing. The pre-push hook is intentionally a no-op.