Skip to content

fix(government_us): Congress mandated reports read the GovInfo search - #7849

Open
artcashin wants to merge 2 commits into
openbq-org:developfrom
artcashin:fix/congress-mandated-reports-search-fallback
Open

artcashin wants to merge 2 commits into
openbq-org:developfrom
artcashin:fix/congress-mandated-reports-search-fallback

Conversation

@artcashin

@artcashin artcashin commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

CongressMandatedReports returns nothing. GovInfo's link route for the table of reports answers HTTP 500 with

{"message": "No static resource cmr/tableofreports for request '/link/cmr/tableofreports'."}

fetch_cmr reads any response without a resultSet as an empty list, so the command reports no data rather than an error. Seen 2026-11-17 and 2026-11-18. GovInfo's other link routes (/link/bills/..., /link/plaw/...) answer normally, so the route itself is gone, not the service.

Change

One path: fetch_cmr reads the keyless GovInfo search (collection:CMR AND congress:N) through the existing wssearch helper, newest first. Each hit maps to package id, title, submitting agency and publication date (both parsed from the hit's summary line), and the PDF and details links. The link request and parse_cmr are removed.

The search carries no submission date, statutory deadline or MODS link. date_submitted_to_congress, date_required, is_on_time and mods_link are therefore removed from CongressMandatedReportsData, since nothing can fill them.

The search pages by index, so offset is rounded down to a whole page of limit.

Behaviour change

The four fields above are no longer in the output. Before this PR the command returned no rows at all.

Tests

  • test_fetch_cmr now feeds a search hit in GovInfo's current shape and checks the query, the page index and the full record. test_fetch_cmr_search_item_without_agency_or_date covers a hit with an empty summary line. Both fail on develop. test_parse_cmr is removed with the function.
  • The fetcher and model tests drop the four removed fields.
  • openbb_platform/providers/government_us/tests: 3,259 passed (Python 3.12).
  • Against live GovInfo on 2026-11-18, congress=119, limit=3 returned three reports with agency, date and title.

History

The first commit kept the link request and used the search as a fallback. The second makes the search the only path.

🤖 Generated with Claude Code

artcashin and others added 2 commits November 18, 2026 03:29
…o search

GovInfo's link route for the table of reports answers 500, which read as an empty list. Without a resultSet the reports now come from the keyless search; it carries no deadline dates, so is_on_time is optional.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
GovInfo no longer serves /link/cmr/tableOfReports (500 "No static resource"),
while its other link routes still answer. The link request, parse_cmr and the
fallback are replaced by one path: fetch_cmr reads the keyless search.

The search carries no submission date, deadline or MODS link, so
date_submitted_to_congress, date_required, is_on_time and mods_link are
removed from CongressMandatedReportsData instead of staying always empty.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@artcashin artcashin changed the title fix(government_us): Congress mandated reports fall back to the GovInfo search fix(government_us): Congress mandated reports read the GovInfo search Nov 18, 2026

This branch has not been deployed

No deployments
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