fix(QA-audit #307 #308): asyncio lifecycle fix + push-mode queue support #317

Closed
core-be wants to merge 3 commits from fix/qa-audit-307-308 into main

3 Commits

Author SHA1 Message Date
60457935b3 fix(QA-audit): asyncio lifecycle fix in inbox wrapper tests + push-mode queue support
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 2s
Secret scan / Scan diff for credential-shaped strings (pull_request) Failing after 2s
audit-force-merge / audit (pull_request) Has been skipped
Issue #307 (regression):
- test_a2a_tools_inbox_wrappers.py: replace _run() helper that called
  asyncio.get_event_loop().run_until_complete() with proper
  @pytest.mark.asyncio + async def / await. The legacy pattern bypasses
  pytest-asyncio's event-loop lifecycle, causing 14 tests to pass in
  isolation but exit-1 in the full suite.

Issue #308 (test gap):
- a2a_response.py: parse() only handled delivery_mode="poll" queue
  responses. Extend the queued-envelope check to match any non-null
  delivery_mode (poll, push, or future modes), and propagate the actual
  mode string into Queued(method=, delivery_mode=) so callers can
  distinguish poll vs push delivery.
- test_a2a_response.py: add 3 push-mode fixtures
  (push_queued_full/notify/no_method) and 4 test cases covering
  classification, delivery_mode field, method sentinel, and INFO log
  output.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 13:02:43 +00:00
fce46904ca fix(internal#248): correct PluginResolver.Resolve return type to SourceResolver
Some checks failed
sop-tier-check / tier-check (pull_request) Failing after 1s
Secret scan / Scan diff for credential-shaped strings (pull_request) Failing after 2s
audit-force-merge / audit (pull_request) Has been skipped
The interface declared Resolve(Source) (PluginResolver, error) but
*Registry.Resolve in source.go:133 returns SourceResolver. Compile-time
assertion `var _ PluginResolver = (*Registry)(nil)` at drift_sweeper.go:82
failed → broke main.go:341 router.Setup and main.go:350 StartPluginDriftSweeper.

Doc comment at drift_sweeper.go:68-69 already stated the intended shape
(returns the production SourceResolver from source.go, not another
PluginResolver) — this aligns the type with the documented contract.

PluginsHandler.WithSourceResolver is unaffected: router.go:545-565
intentionally `_ = pluginResolver`s it out per existing comment.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 12:48:31 +00:00
ce23f88edc wip(internal#248): go.sum refresh + router.go plgh ordering — partial; SourceResolver refactor still broken
Two clean fixes toward building main, on top of fix/pluginresolver-conflict (d88a320f):
  1. go.sum: refreshed for go.moleculesai.app/plugin/gh-identity (was carrying the
     pre-suspension github.com path) — now resolves via the live go-import responder.
  2. router.go: moved the 'plugin drift queue (core#123)' block to AFTER the plgh
     handler is constructed (it was at line ~502, plgh declared at ~623 -> 'undefined: plgh').

Remaining (NOT fixed here — needs Core-BE; this is d88a320f's refactor):
  - main.go:341: router.Setup takes plugins.SourceResolver, but main.go passes
    *plugins.Registry (no Fetch/Scheme method). router.Setup's pluginResolver param
    type is wrong — should be *plugins.Registry or a narrow Register/Resolve/Schemes
    interface, not SourceResolver.
  - main.go:350: StartPluginDriftSweeper takes plugins.PluginResolver whose Resolve
    returns PluginResolver, but *Registry.Resolve returns SourceResolver. PluginResolver.Resolve's
    return type should be SourceResolver (or the param type should change).
  - PluginsHandler.WithSourceResolver(plugins.SourceResolver) is called with the
    registry in router.go — same class of mismatch downstream.
These need a design call on what the resolver interfaces should be — left for Core-BE.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 00:03:20 -07:00