Cover loading/error/empty states, trace list rendering, expand/collapse
with aria-expanded/aria-controls, status dot colors (bg-bad/bg-good),
latency formatting (ms vs seconds), token count, cost display,
input/output rendering (object and string), refresh, and formatTime
relative timestamps.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add 49 test cases covering schedule list, status dot colors,
toggle/edit/delete/run-now, create/edit forms, form validation,
auto-refresh (10s interval), cronToHuman/relativeTime formatting,
and error states.
Also fix ScheduleTab: (1) set error state on GET failure so the
banner is visible, (2) move error banner outside the form block so
non-form errors are shown to the user.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Cover channel list, toggle, delete, discover, form validation,
schema-driven inputs (password/textarea/text), platform switching,
allowed_users, auto-refresh, and error states.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Covers: loading/empty/event-list states, event_type color mapping,
expand/collapse with aria-expanded/aria-controls, refresh button,
error state from API rejection, auto-refresh interval via setInterval mock,
and unmount cleanup.
Key patterns:
- vi.hoisted() for module-level api mock (vi.mock hoisting)
- vi.useRealTimers() for non-timing tests; spyOn(setInterval/clearInterval)
for auto-refresh tests to avoid Vitest fake-timer infinite loops
- fireEvent.click + native .click() via act() for expand/collapse
- Re-query DOM after state flush to avoid stale element references
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds first test coverage for canvas/ExternalConnectModal. Tests: renders null
when info absent, dialog open/close, default tab selection (Universal MCP vs
Python), tab switching and visibility (Hermes/Codex conditional), auth token
stamping for Python/MCP/curl snippets, clipboard.writeText API call,
close button callback, security warning, Fields tab with (missing) fallback.
Radix Dialog tested by rendering with open=true. Clipboard API mocked via
Object.defineProperty in beforeEach. renderAndFlush uses act(()=>{}) to
synchronously flush Radix portal rendering so dialog queries work without
waitFor (which times out under vi.useFakeTimers).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
enrich_peer_metadata_nonblocking (a2a_client.py) never checked the
_peer_metadata cache before scheduling a background fetch — it always
returned None and always fired the executor thread pool. The docstring
promised "cache hit: return the cached record" but the code did not
implement it.
Fix: add the same TTL-check that enrich_peer_metadata uses before
scheduling the worker. On a warm cache hit the function now returns
immediately without touching the in-flight set or the executor.
Closes the remaining 5 test failures in test_a2a_mcp_server.py on main
that were not covered by PR #508's test-assertions fix.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
PR #477 added _A2A_BOUNDARY_START/END wrapping to tool_delegate_task's
success path. Three tests in test_delegation_sync_via_polling.py were
still asserting exact raw strings and broke:
test_flag_off_uses_send_a2a_message_not_polling
test_queued_sentinel_triggers_polling_fallback
test_non_queued_send_result_does_not_trigger_fallback
Fix: check for boundary markers + inner content instead of exact match.
Import _A2A_BOUNDARY_START/END from _sanitize_a2a in the affected
test methods.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- test_a2a_tools_delegation.py: remove unused `import os`
- test_a2a_tools_impl.py: remove unused `import sys` and `import pytest`
- test_a2a_sanitization.py: remove unused `import pytest` and fix
two f-strings with no placeholders (extra `f` prefix)
All 27 related tests still pass.
Co-authored-by: Molecule AI Core-DevOps <core-devops@agents.moleculesai.app>
Co-committed-by: Molecule AI Core-DevOps <core-devops@agents.moleculesai.app>
Co-authored-by: Molecule AI Infra-Runtime-BE <infra-runtime-be@agents.moleculesai.app>
Co-committed-by: Molecule AI Infra-Runtime-BE <infra-runtime-be@agents.moleculesai.app>
Co-authored-by: Molecule AI Core-DevOps <core-devops@agents.moleculesai.app>
Co-committed-by: Molecule AI Core-DevOps <core-devops@agents.moleculesai.app>
Three bugs introduced in PR #477:
1. fake_discover(ws_id) missing source_workspace_id kwarg — discover_peer
signature is (target_id, source_workspace_id=None).
2. Direct attribute assignment (d._delegate_sync_via_polling = ...)
does not replace module-level 'from module import name' bindings
resolved at call time; must use monkeypatch.setattr.
3. Assertions checked for [A2A_RESULT_FROM_PEER] but the polling path
uses _A2A_BOUNDARY_START/END — _A2A_RESULT_FROM_PEER is added by
send_a2a_message (messaging path), not by _delegate_sync_via_polling.
Additionally: monkeypatch.setenv("DELEGATION_SYNC_VIA_INBOX", "1") forces
the polling code path so the test exercises the correct logic regardless
of environment defaults.
Closes#495.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Molecule AI Infra-Runtime-BE <infra-runtime-be@agents.moleculesai.app>
Co-committed-by: Molecule AI Infra-Runtime-BE <infra-runtime-be@agents.moleculesai.app>
Co-authored-by: Molecule AI Infra-Runtime-BE <infra-runtime-be@agents.moleculesai.app>
Co-committed-by: Molecule AI Infra-Runtime-BE <infra-runtime-be@agents.moleculesai.app>
Co-authored-by: Molecule AI Core-DevOps <core-devops@agents.moleculesai.app>
Co-committed-by: Molecule AI Core-DevOps <core-devops@agents.moleculesai.app>
tier:low and tier:high are OR gates — any one positive verdict
is sufficient. The previous implementation required ALL groups to have
positive verdicts, causing INCOMPLETE even when core-devops APPROVED
and core-lead was absent.
Now uses tier-specific logic:
- tier:low / tier:high (OR): any positive = CLEAR
- tier:medium (AND): all positive = CLEAR
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Paginate all list endpoints (comments, reviews) to handle PRs with
many comments without missing entries. Uses per_page=100 with page
increment loop, safety-capped at 20 pages.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Gitea reviews use "submitted_at" not "created_at" for when the review
was submitted. The earlier signal_1_comment_scan fix (inherited from
sop-tier-check investigation) already handled this; signal_2 and
signal_3 were missing the same correction.
Fixes KeyError: 'created_at' on PRs with no comments/reviews.
Includes the individual-check-status fix (use "status" not "state").
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Gitea Actions API uses "status" (pending/success/failure) not "state"
for individual status entries. The "state" field is null for pending
runs. This caused all_check_statuses to show Python null instead of
"pending" for queued jobs.
Also verified on PR #391 and PR #393 — individual checks now correctly
display "pending" while combined_state is "pending" (CI_PENDING verdict).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SOP-6 + CI gate checker for Gitea PRs. Detects:
- Signal 1: Author-aware agent-tag comment scan (tier-aware)
- Signal 2: REQUEST_CHANGES reviews state machine
- Signal 3: Staleness detection (SOP-12)
- Signal 6: CI required-checks awareness
Post `[gate-check-v3] STATUS:` comment on PRs. CLI + Gitea Actions
workflow (cron hourly + PR-triggered).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Documents four persistent operational findings from the 2026-05-11
Gitea migration and CI noise investigation:
1. Runner network isolation (git remote unreachable from container)
2. continue-on-error only works at step level, not job level
3. workflow_dispatch.inputs not supported
4. fetch-depth:0 on actions/checkout times out
References PR #441 (harness-replays detect-changes fix) and
Task #173 (pre-clone manifest deps pattern).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Cherry-picked from PR #452 (fix/canvas-test-and-design-fixes) which
was closed without merge during the PR #443 cascade. The fix adds a
mockPost reference so individual tests can reset the POST mock cleanly
instead of queueing multiple resolved/rejected values.
Without this, the "shows an error toast when POST fails" and "keeps
the card visible when POST fails" tests queue two responses from
beforeEach's mockResolvedValue({}) and the second mockRejectedValueOnce()
call, causing non-deterministic test outcomes.
Fixes test failures in ApprovalBanner suite.