Skip to content

C5: TargetContext widening with Warm/Cold optional slots #49

@filipeforattini

Description

@filipeforattini

Parent

#46

What to build

Widen fingerprint::target::TargetContext to carry optional Warm/Cold-tier inputs. The existing Hot-tier fields (final_url, status, headers, body) stay required. New optional borrows are added: h2_settings, robots_body, well_known, favicon_md5, peer_cert, dns, asn.

Hot-tier sources continue to ignore the new fields (their analyze reads only the required slots). Warm/Cold sources that previously stubbed empty analyze impls now read from the appropriate optional slot when populated; they continue to return empty Vec when the slot is None. The change is additive — every existing call site that constructed a TargetContext::http_only keeps working.

Acceptance criteria

  • TargetContext gains 7 optional borrow fields covering Warm + Cold inputs
  • TargetContext::http_only constructor keeps the existing 4-arg signature, leaves the new fields as None
  • New constructor TargetContext::with_warm(...) builds a context with Warm-tier slots filled
  • New constructor TargetContext::with_cold(...) builds a context with Cold-tier slots filled
  • All existing source unit tests pass unchanged
  • At least one Warm source (e.g. H2SettingsSource) is updated to read from ctx.h2_settings and emit a Detection when present
  • At least one Cold source (e.g. DnsSource) is updated to read from ctx.dns and emit a Detection when present
  • NDJSON regression byte-stable

Blocked by

None - can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageAwaiting triagerustPull requests that update rust code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions