cleanup, bugfix, and hardening: remove ai artifacts, fix auth circular dep, key prefix mismatch, recursive retry, require() calls, error types, key logging.#95
Open
Mohammad-Faiz-Cloud-Engineer wants to merge 4 commits into
Conversation
additional production hardening: - added ignoreDeprecations: "6.0" to tsconfig to silence baseUrl deprecation warning (will break in ts 7.0 otherwise). - converted deliverWebhook recursive retry to a proper loop to eliminate stack overflow risk on high retry counts. - replaced top-level require() calls in app.module and webhook.module with proper static esm imports. same conditional logic, no eval. - changed generic Error throws in engine adapter stubs to BadRequestException so callers get 400 instead of 500. - api key is now only printed on first boot; subsequent restarts show "(check dashboard or .api-key file)" instead of the raw key. - added a comment warning not to use NODE_ENV=development in production (hardcoded admin key). - removed unused existsSync/readFileSync imports from auth.service.
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.
walked through the whole project and cleaned up a bunch of stuff that was
left over from ai generation. em dashes, box drawing chars, emojis in
console output, translation strings, docs, shell scripts. replaced them
with regular text equivalents. also toned down some of the overly
marketing-heavy language in the documentation.
what was done:
backend and dashboard both compile clean. no functional changes.
also fixed two bugs found during audit:
endpoint require a valid api key to call (circular dependency).
stores 12-character prefixes. bumped to varchar(12).
additional production hardening:
deprecation warning (will break in ts 7.0 otherwise).
eliminate stack overflow risk on high retry counts.
with proper static esm imports. same conditional logic, no eval.
BadRequestException so callers get 400 instead of 500.
"(check dashboard or .api-key file)" instead of the raw key.
(hardcoded admin key).