Repository navigation
Fix CI: env override breaking migrate/evals, ruff lint, untrack .env - #2
Conversation
evals-nightly and e2e migrate were connecting to port 5434 because loadRootEnv/load_dotenv overwrote CI DATABASE_URL from a committed .env. Default to non-override env loading, align DATABASE_URL to 5432, untrack .env, fix ruff unused imports, and skip golden LLM evals clearly when OPENAI_API_KEY is missing. Co-authored-by: sergio_Corvallis <sergiocorvallis@gmail.com>
PR SummaryMedium Risk Reviewed by Cursor Bugbot for commit 55ee650. Bugbot is set up for automated code reviews on this repo. Configure here. |
validate_economics had a no-op pass for client_ru_sells_with_vat; now returns client_price_vat_mode and flags missing VAT on domestic corridors. Orchestrator: rewrite deal_id branch without empty pass (same behavior). Co-authored-by: sergio_Corvallis <sergiocorvallis@gmail.com>
- Email client replies and cabinet RFQ no longer report success when SMTP/ Playwright/cabinet are missing (prod throws / ok:false). - TG bot send fails in production without TG_BOT_TOKEN. - API production boot requires OPENAI_API_KEY (parity with Python). - Fix Decimal TypeError crashing apply_ops_hint / save_quote (db _dumps). - Remove mock:// demo partner seeds; migration 015 cleans existing DBs. Co-authored-by: sergio_Corvallis <sergiocorvallis@gmail.com>
tsx -e compiles as CJS and rejects top-level await; move deps check into apps/api/src/ciDepsSmoke.ts (async main + dynamic db import). Co-authored-by: sergio_Corvallis <sergiocorvallis@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 55ee650. Configure here.
| if (corridor == DOMESTIC or not is_international(corridor)) and sells_with_vat: | ||
| if vat_mode != VAT_INCLUDED: | ||
| issues.append("client_price_missing_vat") | ||
| escalate = True |
There was a problem hiding this comment.
VAT check never escalates
Low Severity
The new client_price_missing_vat branch compares client_price_vat_mode(corridor) to included under the same corridor condition that function uses to return included, so the issue is never raised and domestic VAT is never escalated.
Reviewed by Cursor Bugbot for commit 55ee650. Configure here.
| src = ["."] | ||
| extend-exclude = [".venv"] | ||
| # Local one-off probes (_proxy_probe.py, _fix_*.py) must not break CI lint. | ||
| extend-exclude = [".venv", "_*.py"] |
There was a problem hiding this comment.
Ruff exclude skips package inits
Low Severity
The new ruff extend-exclude pattern _*.py is gitignore-style and also matches every __init__.py under services, so package init modules are no longer linted.
Reviewed by Cursor Bugbot for commit 55ee650. Configure here.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |


Problem
CI was red (
evals-nightlymigrate to :5434,ciruff). Launch audit found fake-success stubs and a liveDecimalcrash. After fixes, e2e-smoke still failed:tsx -etop-level await rejected under CJS.Fixes
CI / env
loadRootEnv+ Pythonload_dotenvdo not override CI/shell env.env; alignDATABASE_URLto port 5432_*.pyprobes excludedOPENAI_API_KEYsecret missingapps/api/src/ciDepsSmoke.ts(notsx -etop-level await)Launch hardening
ok:falsewhen disabled / Playwright missing / errorsmtp_not_configuredin productionTG_BOT_TOKENvalidate_economics: real VAT mode annotationOPENAI_API_KEYmock://demo partner seeds + migration015Runtime bug
Decimalcrashedapply_ops_hint/save_quote→_dumps(default=str)Verification
ciDepsSmoke.tslocally →api-deps-okDebut blockers (config, not code)
OPENAI_API_KEY, SMTP/IMAP and/orTG_BOT_TOKEN, non-default cabinet passwords, partner channel (ALLOW_FILE_TARIFFSand/or supplier emails). Mock rates forbidden in production.