This audit was performed autonomously to verify the consistency between the source code and documentation, and to identify areas for improvement following IT Best Practices.
tesla.py, the endpoint generate_vehicle_report_pdf_async (path /vehicle-report/pdf/async) is defined twice. One implementation uses Cloud Tasks, while the other uses FastAPI BackgroundTasks. This causes a conflict in the routing table.config.py contains two pricing structures: PAYMENT_PLANS (fixed 19/29/149 EUR) and TIER_TABLE (tiered 9.99/19.99/29.99 EUR). The WUI uses the tiered model via /catalog, but some backend paths might still reference the legacy fixed plans.HSTS_MAX_AGE is set to 1 year in config.py. While secure, it can cause issues during local development if HTTPS is not consistently used across all tools.app/main.py. These should be moved to config.py to allow environment-specific overrides (e.g., allowing local dev tools).main.py bootstraps voucher usage on startup. In a multi-instance Cloud Run environment, this logic should be coordinated via a Redis lock or a single source of truth.FRONTEND_URL in config.py defaults to production. This breaks local OAuth callback flow if the .env override is missing.PDF_CLEANUP_DELAY_SECONDS is set to 60s, but the new Puppeteer spec mentions a 30-minute lifecycle. This requires reconciliation.TRACE_SECRET is used for selective tracing but is not clearly documented as a secret that needs rotation in 029-create-gcp-secrets.EU for Tesla Fleet API. While supported, NA/CN regions require manual env overrides rather than auto-detection or user selection.ADMIN_USERNAME and ADMIN_PASSWORD_HASH are optional and default to None. This leaves admin paths potentially unprotected or unusable without explicit configuration.bnc-cpt-doc. (Resolved via refactor).README.md files in sub-modules often list older endpoint patterns (v1) instead of the current session-based (v2) flow.STRIPE_API_KEY while the code exclusively uses STRIPE_SECRET_KEY.isShadowReportRoute logic in App.vue and its associated components are not mentioned in the architectural overview./api in dev, but its relationship with production Nginx routing is not explicitly documented.CORS_ORIGINS in dev.env.yaml might be too restrictive for certain developer setups (e.g., mobile testing).GCP_PROJECT for Cloud Tasks when the env var is empty is implicit and potentially error-prone.the-bot instructions in GEMINI.md mention npm test inside the container, but the Makefile has different wrappers.PRODUCT-ROADMAP-v2.md lists features that are already implemented, making it unclear what is actually "Next Steps"./.well-known/... being correctly served in all environments for Tesla partner verification?bnc-cpt-doc stays updated with code changes.bnc:cpt:dev:task).make help output into functional categories./architecture: High-level and component design./development: Setup, style guides, testing./operations: Deployment, infra, lifecycle./specifications: Feature RFCs and implementation plans./product_and_requirements: Features, roadmaps, and compliance./integrations: External provider-specific documentation./tracking: Audits, technical debt, and status.bnc-cpt-doc/doc/md/System-Overview.md: The new entry point.bnc-cpt-doc/README.md: Updated landing page.bnc-cpt-doc/doc/md/tracking/Audit-Findings-2026-04-27.md: This report.Audit completed by Gemini CLI