This document defines the rollback path for the March 13, 2026 reporting-core refactor work across:
bnc-cpt-apibnc-cpt-wuibnc-cpt-utlUse this plan if the reporting refactor causes regressions in:
This is the source of truth for backout order, target SHAs, and file groups.
Rollback must restore the last known remote state first.
Do not attempt ad hoc file edits during an incident. Do not mix old and new logic during rollback. Either:
These are the rollback targets for the refactor work described in this document.
bnc-cpt-api -> 4d0e5c7bnc-cpt-wui -> 114ac0fbnc-cpt-utl -> b5bd4b4If these commits exist only locally, do not revert them. Reset to the remote target instead.
bnc-cpt-api -> 445cdf5 refactor reporting core and document security architecturebnc-cpt-wui -> 781725b handle partial report generation resultsbnc-cpt-utl -> 1dbd362 package API locales in Docker imagesbnc-cpt-apiCommit 445cdf5 introduced:
tesla_fleet.pyAdditional local-only, uncommitted API work introduced:
src/python/cpt-api/app/models/tesla_acquisition.pysrc/python/cpt-api/app/services/tesla_provider_normalization.pysrc/python/cpt-api/tests/test_tesla_normalization.pysrc/python/cpt-api/app/api/v1/routers/tesla.pysrc/python/cpt-api/app/services/tesla_fleet.pybnc-cpt-wuiCommit 781725b introduced:
Additional local-only, uncommitted WUI work introduced:
src/vue/app/src/components/ReportDashboard.vuesrc/vue/app/src/services/api.tssrc/vue/app/src/stores/app.tssrc/vue/app/src/components/GeneratingStep.vuebnc-cpt-utlCommit 1dbd362 introduced:
Additional local-only, uncommitted UTL work introduced:
src/docker/cpt-api/Dockerfile.arm-macsrc/docker/cpt-api/Dockerfile.x86_64Symptoms:
vehicle_data or module handling regressesRollback scope:
bnc-cpt-apibnc-cpt-wui if the WUI has already been updated to depend on outcomesSymptoms:
Rollback scope:
bnc-cpt-apibnc-cpt-wuibnc-cpt-utl if Docker/runtime packaging is involvedSymptoms:
/health failsRollback scope:
bnc-cpt-utlbnc-cpt-apiSymptoms:
Rollback scope:
bnc-cpt-wuibnc-cpt-api if the response shape mismatch is the real causeIf changes have been pushed and must be reverted, use this order:
bnc-cpt-wuibnc-cpt-apibnc-cpt-utlReason:
If the failure is purely Docker build/startup, use:
bnc-cpt-utlbnc-cpt-apiUse this only if nothing has been pushed and the goal is to get back to the last remote state immediately.
bnc-cpt-apigit -C /opt/bnc/bnc-cpt/bnc-cpt-api reset --hard origin/master
git -C /opt/bnc/bnc-cpt/bnc-cpt-api clean -fd
bnc-cpt-wuigit -C /opt/bnc/bnc-cpt/bnc-cpt-wui reset --hard origin/master
bnc-cpt-utlgit -C /opt/bnc/bnc-cpt/bnc-cpt-utl reset --hard origin/master
Effect:
Use this if commits have already been pushed or deployed.
Do not reset --hard shared history.
Use git revert.
bnc-cpt-wuigit -C /opt/bnc/bnc-cpt/bnc-cpt-wui revert 781725b
bnc-cpt-apigit -C /opt/bnc/bnc-cpt/bnc-cpt-api revert 445cdf5
bnc-cpt-utlgit -C /opt/bnc/bnc-cpt/bnc-cpt-utl revert 1dbd362
Notes:
src/python/cpt-api/app/services/tesla_fleet.pysrc/python/cpt-api/app/api/v1/routers/tesla.pysrc/python/cpt-api/app/models/tesla.pysrc/python/cpt-api/app/services/i18n.pysrc/python/cpt-api/app/services/tesla_provider_auth.pysrc/python/cpt-api/app/services/tesla_provider_acquisition.pysrc/python/cpt-api/app/models/tesla_acquisition.pysrc/python/cpt-api/app/services/tesla_provider_normalization.pysrc/vue/app/src/components/GeneratingStep.vuesrc/vue/app/src/components/ReportDashboard.vuesrc/vue/app/src/services/api.tssrc/vue/app/src/stores/app.tssrc/docker/cpt-api/Dockerfile.x86_64src/docker/cpt-api/Dockerfile.arm-macUse this only if documentation should be kept but risky code should be removed.
Recommended process:
origin/mastergit -C /opt/bnc/bnc-cpt/bnc-cpt-api switch -c rescue/reporting-refactor
git -C /opt/bnc/bnc-cpt/bnc-cpt-api restore --source=origin/master src/python/cpt-api/app/api/v1/routers/tesla.py
git -C /opt/bnc/bnc-cpt/bnc-cpt-api restore --source=origin/master src/python/cpt-api/app/models/tesla.py
git -C /opt/bnc/bnc-cpt/bnc-cpt-api restore --source=origin/master src/python/cpt-api/app/services/i18n.py
git -C /opt/bnc/bnc-cpt/bnc-cpt-api restore --source=origin/master src/python/cpt-api/app/services/tesla_fleet.py
git -C /opt/bnc/bnc-cpt/bnc-cpt-api restore --source=origin/master src/python/cpt-api/app/__init__.py
git -C /opt/bnc/bnc-cpt/bnc-cpt-api restore --source=origin/master src/python/cpt-api/app/services/__init__.py
rm -f /opt/bnc/bnc-cpt/bnc-cpt-api/src/python/cpt-api/app/models/tesla_acquisition.py
rm -f /opt/bnc/bnc-cpt/bnc-cpt-api/src/python/cpt-api/app/services/tesla_provider_normalization.py
rm -f /opt/bnc/bnc-cpt/bnc-cpt-api/src/python/cpt-api/tests/test_tesla_normalization.py
Use the same pattern for WUI and UTL if only part of the refactor must be removed.
Before any push, create a backup branch in each touched repo.
git -C /opt/bnc/bnc-cpt/bnc-cpt-api switch -c backup/reporting-refactor-2026-03-13
git -C /opt/bnc/bnc-cpt/bnc-cpt-wui switch -c backup/reporting-refactor-2026-03-13
git -C /opt/bnc/bnc-cpt/bnc-cpt-utl switch -c backup/reporting-refactor-2026-03-13
This does not replace rollback, but it preserves the exact local state before any push or reset.
After any rollback, verify:
/health returns 200If rollback restores build/startup but not reporting, rollback was incomplete.
Use full rollback if:
Use targeted partial rollback only if: