Skip to content

Run the specialized-fallback research tests inside a named effect scope - #29

Closed
Parad0x-Labs wants to merge 1 commit into
mainfrom
mission/web-research-scope
Closed

Parad0x-Labs wants to merge 1 commit into
mainfrom
mission/web-research-scope

Conversation

@Parad0x-Labs

Copy link
Copy Markdown
Owner

What failed

tests/test_web_research_runtime.py — 3 cases red in the main CI census (run 35570948370)
and every PR run since; deterministic locally:

  • test_market_quote_query_uses_specialized_live_fallback_when_search_providers_fail —
    provider 'none' != 'yahoo_finance'
  • test_weather_fallback_accepts_nested_data_payload — provider 'none' != 'wttr_in'
  • test_news_rss_fallback_returns_none_on_empty_feed —
    RemoteFetchRefusedError: no active turn or background effect ledger … a fetch outside any turn scope is denied before any socket

Root cause

The R2b effect-gateway law (same owner as the web-search backend scoping in open PRs
#15/#23): these three direct-call tests mock urllib.request.urlopen — one level BELOW the
canonical fetch door — so open_remote runs for real and denies the fetch outside any turn
scope before any socket. The two fallback cases swallow the refusal and report
provider 'none'; the RSS case surfaces it. Their sibling tests in the same file mock
http_fetch_text ABOVE the door and never hit this.

Repair (test-only, one file, +6/−3)

The three cases open the sanctioned named_background_effect_scope at their entry point —
the identical pattern the web-search backend tests adopted in #15/#23 (attribution only,
grants nothing else). Every assertion is unchanged.

Validation

Base: main 8153a96. One file changed.

The three direct-call cases (market-quote fallback through urlopen, the
nested wttr.in payload, the empty RSS feed) mock urllib one level BELOW
the canonical fetch door, so open_remote runs for real and the R2b law
denies the fetch before any socket -- the fallbacks silently stood down
(provider 'none') or surfaced the refusal. Their siblings that mock
http_fetch_text above the door never see this. The tests open the same
sanctioned named_background_effect_scope the web-search backend tests
adopted (PR #15/#23 pattern); every assertion is unchanged. 3 CI
failures (main run 35570948370) -> 21 passed; the 5 web-search backend
failures beside them are the cluster owned by open PR #15/#23.
@Parad0x-Labs
Parad0x-Labs deleted the mission/web-research-scope branch September 23, 2026 03:49
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.

1 participant