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.
[codex] Harden deployment config startup #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
[codex] Harden deployment config startup #347
Changes from all commits
dfc49fa5d4e7409daf2363aea42593f6b644e632b112dd3064a4486420249577cfb7eaFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
run_job_migrations()fails here, startup now continues and the only later Postgres health check isSELECT 1. In a deploy where the migration fails because the DB is temporarily unavailable, permissions are wrong, or a migration SQL error occurs, the service can later return/health200 once a bare connection succeeds even though Alembic never reran and required tables/columns may be missing, causing API routes and queued jobs to fail against a stale schema. Preserve the migration failure in health or retry migrations before allowing Postgres to be considered healthy.Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fresh evidence after this revision is that non-local environments now force
effective_intake_resume_require_virus_scanto true, but the validator below still only requiresINTAKE_RESUME_VIRUS_SCAN_COMMANDwhen the raw flag is true. In production with both values left at their defaults, an intake with aresume_urlconstructs settings successfully,_scan_resume_content()returns false because the command is blank, and_prepare_resume_file()returnsNone; the create/update path then proceeds and persists a successful intake withresume_uploaded: false, silently dropping resume upload and extraction instead of surfacing the missing scanner as a startup/health/config failure.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In production with intake enabled and
INTAKE_RESUME_REQUIRE_VIRUS_SCANleft unset/false, this validator now accepts the config, soIntakeFormProcessor._scan_resume_content()returnsTrueimmediately anddocument_processor.extract_text()parses the downloaded resume without a malware scan. This regresses the explicitAGENTS.mdguidance: "Resume files are untrusted. Keep scanning required in production and configure a scanner command"; keep the non-local requirement or fail/degrade health instead of allowing production to process unscanned resumes.Useful? React with 👍 / 👎.
Uh oh!
There was an error while loading. Please reload this page.