Extract supervise types, eliminate get_supervise_mod() #329
Reference in New Issue
Block a user
Delete Branch "supervise-types-extraction"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #319 (follow-up to issuecomment-2872 on PR #320).
Summary
bot_bottle/_supervise_types.pyholdsProposal,Response,AuditEntry,bot_bottle_root,host_db_path, and shared constants/helpersqueue_storeandaudit_storeimport directly from_supervise_types—get_supervise_mod()is gonesupervise.pyre-exports everything from_supervise_types;host_db_path()is re-defined there so patches onsupervise.bot_bottle_rootstill propagate for callers that go through the supervise module_supervise_types.host_db_path()usessys.modules[__name__].bot_bottle_root()so patches on_supervise_types.bot_bottle_rootpropagate through itdb_pathnow patch_sv_types.bot_bottle_rootalongsidesupervise.bot_bottle_root; the server test patches both flat and package_supervise_typesDockerfile.sidecarsgains aCOPYfor_supervise_types.py1515 unit tests pass.
@@ -68,6 +68,7 @@ COPY bot_bottle/dlp_detectors.py /app/dlp_detectors.pyCOPY bot_bottle/yaml_subset.py /app/yaml_subset.pyCOPY bot_bottle/migrations.py /app/migrations.pyCOPY bot_bottle/db_store.py /app/db_store.pyCOPY bot_bottle/_supervise_types.py /app/_supervise_types.pyProbably shouldn't be prepended by a
_/should treat this as public.Minor nit, but should remove the underscore for
_supervise_typesDone — renamed
_supervise_types.py→supervise_types.pyand updated all imports. Also cleaned up the test aliases (_sv_types→sv_types,_svt_flat/_svt_pkg→svt_flat/svt_pkg) since they followed the module name.5722f34f05to9fb83ef1b0didericis-claude referenced this pull request2026-07-06 14:57:28 -04:00