Repository navigation
fix(testing): match the live API's DNS types and process orig flags - #15
Merged
Merged
Conversation
Live Triage task reports give DNS record types with their class ("IN A",
"IN CNAME"), and set orig on every process in the sample's tree (or on none of
them). The fake report used bare types and set orig only on the sample's process,
so code tested against FakeTriage passed and then dropped data on real reports.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBLBzjbytiAYwrB3fErDUR
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.
pyhatching.testing's fake task report (TASK_REPORT, served byFakeTriage) didn't match what the live Triage API returns in two ways. So code tested against it passed, then dropped data on real reports. This came up when testing the slib.hatching Storm service (gormaniac/stormsvcs#14) against tria.ge."IN A","IN CNAME", and"IN AAAA"indns_request.questions[].typeanddns_response.answers[].type. The fake used bare"A".origis set on the whole process tree. Live reports setorigon every process in the sample's tree, or sometimes on none of them, including the sample's own process. The fake set it only on the sample's process, which suggested it marks the process that ran the sample.Changes
src/pyhatching/testing.py: the fake report's DNS types are now"IN A", and both processes haveorig: true. Comments explain both.src/pyhatching/base.py: comments onProcess.origandDNSEntry.typedescribe what the live API sends.CHANGELOG.md: added under Unreleased → Fixes. Downstream tests that assert on the fixture's DNS types ororigflags will see the change.Testing
pytest tests: 42 passed and 4 skipped, withHATCHING_TOKENset so the live read tests ran. The skips are the opt-in write and submit tests, and org stats, which this account can't read.261101-r15ybav1f1(origon no processes) and261101-ww6q9sxthw(origon all 8).Generated by Claude Code