Skip to content

test(test-trust): re-enable stale-skipped suites & fix no-op assertions (#773) - #880

Merged
frankbria merged 1 commit into
mainfrom
fix/773-test-trust-cleanup
Jul 23, 2026
Merged

test(test-trust): re-enable stale-skipped suites & fix no-op assertions (#773)#880
frankbria merged 1 commit into
mainfrom
fix/773-test-trust-cleanup

Conversation

@frankbria

Copy link
Copy Markdown
Owner

Closes #773[P3.2] Test-trust cleanup batch. Every change makes a previously-vacuous test able to fail on the regression it names. Tests only; no production code changed.

What & why

Area Before (green-but-vacuous) After
tests/blockers/test_blocker_expiration_minimal.py naive datetime.now() vs SQLite datetime('now') (UTC) → pass/fail by runner TZ datetime.now(timezone.utc)verified under TZ=UTC+14 (would fail pre-fix)
tests/ui/test_terminal_ws.py auth/ownership tests asserted only pytest.raises(Exception) — a full bypass would pass assert exact WebSocketDisconnect.code (4001 auth / 4004 session / 4003 ownership)
tests/ui/test_proof_v2.py test_run_results_shape asserted only isinstance(dict) — stayed green even if no gate ran (hid #728) asserts obligations actually execute and yield real gate results (gate/satisfied/status)
tests/core/test_conductor.py "run concurrently" recorded start/end order but never asserted it threading.Barrier(N) that only trips under genuine concurrency — mutation-checked to fail under serial exec
tests/cli/test_serve_command.py whole module skip; tests mocked a pre-v2 stub design (subprocess/check_port/threading/--no-browser) that never shipped rewritten against the real impl (uvicorn.run wiring); 7 pass
tests/ui/test_websocket_subscriptions.py collect_ignored behind a false "v1 get_db plumbing" reason re-enabled — pure unit suite, 40 pass
tests/lifecycle/test_cli_lifecycle.py pytest.skip on CLI failure via unsupported tasks list --output json fails, not skips, on Golden-Path failure via supported --status IN_PROGRESS

Acceptance criteria (all met)

  • ✅ Passing WS/serve suites re-collected — subscriptions (40) + serve (7)
  • ✅ Security tests assert exact close codes
  • ✅ Proof-run tests assert real gate execution
  • ✅ Parallel test asserts interleaving (barrier; mutation-verified)
  • ✅ Blocker test uses UTC
  • ✅ Lifecycle test fails (not skips) on Golden-Path command failure

Known limitation

tests/ui/test_websocket_integration.py targets the removed v1 /ws project-subscription protocol (no /ws route or subscribe handler exists on the v2 workspace-scoped streaming server). It cannot pass without a full rewrite against the v2 streaming API, so instead of the old false "server is a stub" skip it now carries a truthful skip naming the real blocker, and is no longer hidden in conftest. Its unit-level coverage lives in the re-enabled test_websocket_subscriptions.py. Reviving it end-to-end is a separate follow-up.

Verification

Dependency note: dependent on #728 [P1.1], which is merged/closed.

…ions (#773)

Batch test-trust cleanup — every change makes a previously-vacuous test able
to fail on the regression it names:

- blocker expiration: use datetime.now(timezone.utc); the expiry SQL compares
  against datetime('now') (UTC), so a naive local timestamp passed/failed by
  the runner's timezone. Verified under TZ=UTC+14.
- terminal WS security: the 4001/4004/4003 auth/ownership tests asserted only
  "an exception raised" (a full bypass would pass); now assert the exact
  WebSocketDisconnect close code.
- proof run: test_run_results_shape asserted only isinstance(dict); now asserts
  the captured requirement's obligations actually execute and yield real gate
  results (gate/satisfied/status contract) — the shape-only no-op hid #728.
- conductor parallel: the "run concurrently" test recorded start/end order but
  never asserted it (and real overlap is timing-flaky due to serialized per-task
  bookkeeping). Replaced with a threading.Barrier(N) that can only trip under
  genuine concurrency; mutation-checked to fail under serial execution.
- serve command: tests mocked a pre-v2 stub design (subprocess/check_port/
  threading/--no-browser) that never shipped. Rewritten against the real impl
  (uvicorn.run wiring).
- WS suites: re-enabled test_websocket_subscriptions.py (pure unit suite wrongly
  collect_ignored behind a false "v1 get_db plumbing" reason; 40 pass).
  test_websocket_integration.py targets the removed v1 /ws project-subscription
  protocol; replaced the false "server is a stub" skip with a truthful "needs
  rewrite against v2 streaming" skip and stopped hiding it in conftest.
- lifecycle: test_agent_task_status_after_execution skipped on CLI failure via
  an unsupported `tasks list --output json`; now fails (not skips) on Golden-
  Path command failure using the supported `--status IN_PROGRESS` filter.

Tests only; no production code changed.
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Claude finished @frankbria's task in 3m 11s —— View job


I'll analyze this and get back to you.

@frankbria
frankbria merged commit d0d0ddd into main Jul 23, 2026
10 of 11 checks passed
@frankbria
frankbria deleted the fix/773-test-trust-cleanup branch July 23, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P3.2] Test-trust cleanup: re-enable/fix stale-skipped suites and no-op assertions — batch fix

1 participant