Repository navigation
[TH-8951] fix: log a refused URL once per document, and pin the reading's stop wiring - #271
Merged
khushalsonawat merged 1 commit intoNov 11, 2026
Conversation
…ing's stop wiring From the cold round on d1f968c (cleared, nothing above Medium): - _redact logged one warning per refused string. A crafted contract at the 5 MiB cap held 582,527 of them: 25 MB of log, and the build took 4.77 s. It now logs the same class-only line once per call (1 record, 1.10 s). - The stop-budget test re-stated the three bounds. It now also checks that READ_AGENT is wired to them, so a reading built with another interrupt wait fails it. Moved from a code comment in d1f968c, as asked in review: the scan_walk.py figure of about 17.5 bytes per edge entry (so the 5,000,000 edge cap is ~90 MB) is Dileep's measurement, 10 Nov. Refs: TH-8951 Signed-off-by: khushalsonawat <khushalsonawat@gmail.com>
This was referenced Nov 10, 2026
cdileep23
approved these changes
Nov 11, 2026
khushalsonawat
merged commit Nov 11, 2026
e7cc68b
into
feat/TH-8804-source-subfolder
9 checks passed
khushalsonawat
added a commit
that referenced
this pull request
Nov 11, 2026
Signed-off-by: khushalsonawat <khushalsonawat@gmail.com>
khushalsonawat
added a commit
that referenced
this pull request
Nov 11, 2026
Signed-off-by: khushalsonawat <khushalsonawat@gmail.com>
5 of 10 tasks
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.
Description
Follow-up to #245, whose last commit
d1f968cc(answering Dileep's 5 P3 comments) went out unreviewed. A cold round ond1f968ccalone has now run, with two fresh reviewers. It cleared with nothing above Medium. This PR carries the fixes from that round that apply in the sandbox.Type of Change
Changes
providers/agent.py:_redactnow logs a refused URL once per call, not once per string.test_agent_reading.py: the stop-budget test now also checks thatREAD_AGENTis wired to the 10 / 60 / 20 s bounds, not only that the constants sum to 90.Dropped from the round: its findings about Ctrl-C and
KeyboardInterrupt. The reading runs only in a sandbox, where no interrupt is sent (owner's ruling).Found, not fixed here: a SIGTERM to the reading kills it at once with exit -15, because the reading path installs no handler.
contract.jsonstays butagent.jsonis never built.failure.jsonis written.That needs the platform's answers first: whether such a stop is retryable, and how long it waits before SIGKILL. It is being raised separately.
Testing
tests/providers/test_providers_agent_build.py11,tests/harness/test_scenario_source_provision_agent.py24,tests/providers52,tests/harness/test_agent_reading.py105 andtests/harness/test_reading_entry.py61: all passed.test_many_refused_urls_in_one_document_log_one_line;READ_AGENT = _read_agent(interrupt_wait=200.0)fails the stop-budget test.Related Issues
Refs: TH-8951