test(test-trust): re-enable stale-skipped suites & fix no-op assertions (#773) - #880
Merged
Conversation
…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.
Contributor
|
Claude finished @frankbria's task in 3m 11s —— View job I'll analyze this and get back to you. |
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.
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
tests/blockers/test_blocker_expiration_minimal.pydatetime.now()vs SQLitedatetime('now')(UTC) → pass/fail by runner TZdatetime.now(timezone.utc)— verified underTZ=UTC+14(would fail pre-fix)tests/ui/test_terminal_ws.pypytest.raises(Exception)— a full bypass would passWebSocketDisconnect.code(4001 auth / 4004 session / 4003 ownership)tests/ui/test_proof_v2.pytest_run_results_shapeasserted onlyisinstance(dict)— stayed green even if no gate ran (hid #728)gate/satisfied/status)tests/core/test_conductor.pythreading.Barrier(N)that only trips under genuine concurrency — mutation-checked to fail under serial exectests/cli/test_serve_command.pyskip; tests mocked a pre-v2 stub design (subprocess/check_port/threading/--no-browser) that never shippeduvicorn.runwiring); 7 passtests/ui/test_websocket_subscriptions.pycollect_ignored behind a false "v1 get_db plumbing" reasontests/lifecycle/test_cli_lifecycle.pypytest.skipon CLI failure via unsupportedtasks list --output json--status IN_PROGRESSAcceptance criteria (all met)
Known limitation
tests/ui/test_websocket_integration.pytargets the removed v1/wsproject-subscription protocol (no/wsroute orsubscribehandler 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 inconftest. Its unit-level coverage lives in the re-enabledtest_websocket_subscriptions.py. Reviving it end-to-end is a separate follow-up.Verification
ruff checkclean on all touched filesDependency note: dependent on #728 [P1.1], which is merged/closed.