Skip to content

Test: cover the legacy (non-MI) bruteforce_kernel scoring path #15

@felixx-sp

Description

@felixx-sp

Confidence: medium · Effort: medium (1-3 d)

Problem

test_strict_score.c only validates the strict path (mode_policy >= 2). The legacy bruteforce_kernel (modes 0/1, bruteforce.cu:997-1427) still ships and is selected whenever a capture lacks MI metadata — a real-world case — yet has no regression coverage. The scoring weighting constants (expected XOR variance, entropy reference, etc. at bruteforce.cu:1336, 1379) are unverified outside production runs.

Files: new src/test_legacy_score.c, src/bruteforce.cu:997-1427

Suggested fix

Add test_legacy_score.c that runs the legacy score_candidate_host (mode_policy 0/1 branch at bruteforce.cu:3263+) against a synthetic payload set (no real audio) with a known key, and asserts the correct key wins by at least some Z-score margin.

Why it matters

Closes the test blind spot in the larger code path — currently regressions in legacy scoring would only be noticed in production.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions