Repository navigation
fix(tests): keep the L2 golden tool test and the promotion validation off the exported catalog DSN - #537
Open
NeoNix-Lab wants to merge 1 commit into
Open
fix(tests): keep the L2 golden tool test and the promotion validation off the exported catalog DSN#537NeoNix-Lab wants to merge 1 commit into
NeoNix-Lab wants to merge 1 commit into
Conversation
… off the exported catalog DSN (#536) tools/l2_golden_e2e.py defaults --dsn to CATALOG_DSN, so the tool test ran the catalog leg (a real publication) against whatever catalog the shell that runs the suite exports. Seen during infra/promote-main.sh validation on the operational host. - test_l2_golden_v1: run_tool removes CATALOG_DSN around the tool; every test of the file trips on _catalog_leg; regression tests prove an exported DSN is never forwarded and the tool itself still honours CATALOG_DSN. - promote-main.sh: the candidate suite runs with every PG* and *DSN* variable unset (names logged, never values); test_promote_main_v1 covers it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
tests/test_l2_golden_v1.py:run_toolremovesCATALOG_DSNfrom the environment around the tool (restored afterwards); every test in the file now trips if_catalog_legis reached. Regression tests: an exportedCATALOG_DSNis never forwarded torun_l2_golden, the real success path with it exported never reaches the catalog leg, and the tool itself still defaults--dsntoCATALOG_DSN.infra/promote-main.sh: the candidate suite runs underenv -ufor every exportedPG*and*DSN*variable (names logged asvalidation_env_unset:, never values); the rest of the environment is unchanged.tests/test_promote_main_v1.pycovers it, including that no secret value reaches the log.Audit (item 2)
Unit tests (
tests/test_*.py, the onestools/run_tests.pyruns) that run a tool with an environment-derived DSN:test_l2_golden_v1— the only leak; fixed here.test_api_host_composition_v1,test_job_worker_runtime_v1— already clearCATALOG_DSN/QP_RUNTIME_DSN.test_conformity_e2e— env resolution underclear=True;run/inspectare patched or pass an explicit DSN.test_bybit_legacy_day_rebuild_v1— uses its own variable name (REBUILD_TEST_DSN).test_market_data_cli_v1,test_live_ingest_server_*,test_live_window_evidence_v1,test_golden_replay_e2e_v1— executor / server injected, or refused before any connection.tests/integration_*_postgres.pyreadDATA_GATEWAY_TEST_DSN,EXPERIMENT_TEST_DSN,CONFORMITY_EVIDENCE_DSN_*or the PG* environment by design; they are opt-in (not matched byrun_tests.py'stest_*.pyglob) and are not changed.Verification
python tests/test_l2_golden_v1.py— 26 OK, with and withoutCATALOG_DSNexported. With the oldrun_toolandCATALOG_DSNexported, 3 tests fail (red check).python tests/test_promote_main_v1.py— the new test passes; it fails against the old script (red check).test_merge_stays_pinned_to_the_validated_oid_despite_a_concurrent_pushfails identically on the unmodifiedimplement/fidon Windows (the sneaky-push helper uses a/tmppath); unrelated.compileall,git diff --check,tests/test_package_boundaries_v1.pypass. The fulltools/run_tests.pywas not run in this session.Governance Note
🤖 Generated with Claude Code