Skip to content

bug: stale tests in the live-backend, e2e, and Postgres tiers drifted from August/September code changes #2802

Closed

Description

@vybe

Summary

Running every test tier by hand on 2026-09-14 (the full-suite script itself aborts early, tracked separately) surfaced a set of tests that no longer match the code they test. None of them indicates a product defect; each was verified against the commit that changed the behaviour. They are invisible to CI because they live in tiers CI does not run (the live-backend root tier, the non-@smoke e2e tier, or a Postgres leg the PG job does not select).

Stale tests

Backend guards / Postgres:

  • tests/unit/test_1920_no_hand_rolled_single_flight.py scans the mounted enterprise submodule (src/backend/enterprise/**) and trips on a per-tick NX claim there. Sibling guards (test_ent435_settings_sink_guard.py) exclude enterprise/ per the bug: platform operator-queue alert emitters bypass #1632 ingestion caps — skill-not-found is agent-triggerable (flood residual, gates pull default-ON) #1677 convention; this one should too (the private repo owns its own twin).
  • tests/integration/test_alembic_postgres.py::test_pre_alembic_db_is_stamped_not_rebuilt asserts alembic_version == "0001_baseline" after upgrade_to_head(). That was only true at v0.8.0 when head was the baseline; the runner correctly stamps the baseline and then upgrades to head (0061 today). The assertion should check the stamp happened and the version is head.

Root live-backend tier (tests/test_*.py):

  • tests/test_cb_probe_execution_close.py: 10 tests fail standalone. The sys.modules["utils.credential_sanitizer"] stub lacks REDACTION_PLACEHOLDER (which the real module has exported since 2026-02), and three tests do import routers.internal under the same stubbing and get AttributeError: module 'routers' has no attribute 'internal'.
  • tests/test_agent_permissions.py::test_available_agents_have_required_fields requires a type field that refactor: retire the vestigial agent type taxonomy (business-assistant everywhere) #2104 retired from the permissions payload.
  • tests/test_settings.py::test_invalid_format_rejected and tests/test_setup.py::test_setup_blocked_after_completion assert old error-message wording replaced by the feat(onboarding): browser admin claim, one first-run overlay, credentials without a terminal (trinity-enterprise#580, #581, #582) #2715 onboarding rework.
  • tests/test_activities.py::test_timeline_trigger_type_values allowlist lacks triggered_by="system", a documented value.
  • tests/test_agent_git.py::test_git_sync and ::test_git_sync_requires_owner expect 200/304/400 from POST /git/sync on an agent that tracks a public template with no write credentials; the 409 push blackhole is the ent#162 design.
  • tests/test_platform_default_model.py::test_workspace_available_false_by_default and tests/test_subscription_auto_switch.py::test_get_auto_switch_default_on assert runtime defaults that any stored setting (or a sibling test in the same run) overrides; they should assert against a known state, not the instance's.

Frontend e2e (not in the @smoke tier CI runs):

Acceptance Criteria

  • Every test listed above passes against a live dev stack (root tier) or standalone (unit/Postgres), without changing product behaviour.
  • test_1920 excludes enterprise/ from its scan.
  • The alembic stamping test asserts head, not baseline.
  • The e2e spinner spec matches the rendered loading text; the ent438 spec seeds or skips.
  • No test asserts an instance default that a stored setting can override without first setting the state it expects.

Technical Notes

Found on the 2026-09-14 pre-release run of dev eb41896. Related: #1677 (guard convention), #2104, #2715, #2573, ent#162, ent#155.

Activity

  1. added
    priority-p2
    type-bug
    theme-devex
    complexity-medium
    status-ready
    on Sep 15, 2026
  2. added
    status-in-progress
    on Sep 15, 2026
  3. self-assigned this
    on Sep 15, 2026
  4. added
    status-in-dev
    and removed
    status-in-progress
    on Sep 15, 2026
  5. removed
    status-in-dev
    status-ready
    on Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-mediumpriority-p2theme-devextype-bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions