Repository navigation
fix(scraper): re-derive detail apiVersion after DRE change - #2
Merged
Merged
Conversation
DRE's late-September deploy added a GUID argument to callDataAction, so the resolver picked up the screenservices path instead of the apiVersion. Act detail fetches have failed since, leaving acts without full_text, and the summarizer then wrote summaries from the title alone. Anchor the apiVersion on the path argument, refuse to summarize an act with no full_text, and keep such acts out of the summarize queues. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by naps
Before: since 30 September, every new act was saved without its text or PDF, and the summarizer wrote its summary from the title alone. The result was invented summaries, such as rent rules on a decree about fuel prices (Decreto-Lei 200/2026).
After: act details load again. An act with no text is never summarized. It stays "por gerar" until a re-ingest fills its text.
How: DRE's late-September deploy added a GUID argument to
callDataAction. The resolver read the third argument and so got thescreenservices/...path instead of theapiVersion. It now reads the argument after the path, which works for both the old and the new bundle shape.Summarizer.summarize/4returns{:error, :no_full_text}when the act has no text, the worker cancels that job, andacts_without_summary/1skips such acts.This doesn't clean up prod. The 30 affected acts (30 Sep to 8 Oct) still carry their pinned, invented summaries until they are re-ingested and re-summarized.
Evidence
callDataAction("DataActionGetAllConteudoDetalheData", "0f36ef54-…", "screenservices/dr/Legislacao_Conteudos/Conteudo_Detalhe/DataActionGetAllConteudoDetalheData", "B3l5BYZxaLmWUxGR3tmKGw", …)ApiVersionResolver.resolve/2on main returns the path for both:listand:detail, and the detail call keeps answeringhasApiVersionChanged: true.mix test: 616 tests, 0 failures.🤖 Generated with Claude Code