Skip to content
This repository was archived by the owner on Oct 19, 2026. It is now read-only.

URL guard: FORECASTER_BLOCK_URL_PATTERNS, off unless set - #5

Merged
elsehow merged 1 commit into
forecastingresearch:mainfrom
elsehow:url-guard-upstream
Oct 19, 2026
Merged

elsehow merged 1 commit into
forecastingresearch:mainfrom
elsehow:url-guard-upstream

Conversation

@elsehow

@elsehow elsehow commented Oct 19, 2026

Copy link
Copy Markdown
Member

An optional URL guard for the research tools, from AIRO's anchor-guard experiment (2026-10-16). FORECASTER_BLOCK_URL_PATTERNS is a list of regular expressions separated by commas or newlines, matched case-insensitively against URLs.

  • Unset or empty: nothing changes. ForecastBench shares these tools and sees no difference.
  • Set: read_page refuses a matching URL before calling Tavily and returns the ordinary failure shape with a neutral reason; web_search drops matching results and blanks Tavily's answer when it dropped anything.
  • The guard reads the tool process's environment; a caller passes it per run through harness.run(env=...).

AIRO's next production condition asks its instrument with AIRO's own pages blocked, through this guard. Reviewed and merged on the development fork as elsehow#3; this is that squash, cherry-picked onto main. Tests are mocked: no network, no paid calls.

🤖 Generated with Claude Code

* tools: optional URL guard (FORECASTER_BLOCK_URL_PATTERNS), off unless set

read_page refuses a matching URL without calling Tavily (neutral error);
web_search drops matching results and AIRO-paper titles, and blanks the
answer when it dropped anything. For AIRO's anchor-guard experiment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Box: airo-dev/anchor-guard (claude)

* url guard: case-insensitive; note that commas separate patterns

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Box: airo-dev/anchor-guard (claude)

* Tests for the URL guard's contract, and a README line for the variable

Cover unset and empty (nothing changes), one pattern, several patterns
split on commas and newlines, case, and a blocked search result dropped
while the others pass. One pi test hands FORECASTER_BLOCK_URL_PATTERNS
to harness.run(env=...) and checks it reaches tools.py through pi,
pi_tools.ts and the real tool_cli, with no Tavily key so nothing is
fetched. tools.py is untouched: AIRO mirrors it verbatim.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Box: agent-box-dev/url-guard (claude)

---------

Co-authored-by: Nick Merrill <nick@forecastingresearch.org>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit f425641)
@elsehow
elsehow merged commit 504134f into forecastingresearch:main Oct 19, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant