Skip to content

Test drift: 4 pre-existing unit test failures on main (config validators + embedding fingerprint + provider default) #210

@meiiie

Description

@meiiie

Surfaced during Runtime Migration Epic #207 Phase 0 PR #209 CI run. All 4 tests fail on main without Phase 0 changes (verified by checking out main + re-running).

Failures

  1. tests/unit/test_sprint30_semantic_memory_repo.py::TestSaveMemory::test_successful_save

    • Expected: embedding_space_fingerprint == "google:models/gemini-embedding-001:768"
    • Got: "openai:text-embedding-3-small:768"
    • Root cause: env-dependent — embedding fingerprint reflects whichever provider is configured first; test pins to google but env has openai default.
  2. tests/unit/test_sprint160b_hardening.py::TestConfigSecurity::test_session_secret_rejected_in_production

    • Expected: ValueError matching session_secret_key
    • Got: Value error, SECURITY: enable_dev_login=True is forbidden in production
    • Root cause: validator order changed — enable_dev_login validator now fires first, swallowing the session_secret_key validator path.
  3. tests/unit/test_config_validators.py::TestEnvironmentValidator::test_production

  4. tests/unit/test_sprint33_config_validators.py::TestLLMProvider::test_default_valid

    • Expected: default_provider == 'zhipu'
    • Got: 'nvidia'
    • Root cause: NVIDIA + DeepSeek went live recently and shifted the default; test expectation is stale.

Why these slipped through

PR #208 (last main merge) had a green Backend Unit Gate. Between #208 and #209 nothing else landed on main. The most likely explanation is that these tests are env-dependent and the CI runner environment has shifted (or local is now closer to CI than before).

Scope (small, separate from Phase 0–7)

Roughly 4 small fixes:

Suggest: 1 small chore(tests): heal config-validator + provider drift PR, branch codex/heal-test-drift. Not on Runtime Migration epic critical path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions