Task · OPN-0055

Preserve stable Unbound blocklist identity across search-query response generations

Description

The Unbound search-query log source ships the API row blocklist value as a JSON attribute and Loki structured metadata. OPNsense 26.7 rewrites that value from the backend short code to the configured display value, so downstream identity changes silently across supported response generations. Define a stable, shape-tolerant identity contract without inventing data absent from the 26.7 response.

Acceptance Criteria

Definition of Done

Implementation Plan

Wave 2 L10: implement the frozen omit-when-unrecoverable blocklist identity contract across legacy and 26.7 shapes, with regression coverage and compatibility documentation.

Implementation Notes

Decision, Rob 2026-09-02: take AC1’s second branch - explicitly OMIT the blocklist identity when the legacy short code cannot be recovered, and document the limitation. Do not introduce a new display-valued attribute: inventing a stable-looking identity the 26.7 response does not guarantee is recurring defect class 1 (modelling a payload shape upstream cannot produce), and downstream would consume it as though it were stable.

Wave 2 implemented frozen D6: legacy short-code identity is retained, while 26.7 rows proven by category presence omit unrecoverable blocklist identity from body and metadata. Focused tests, full indexed just check, and L13 review passed. Landing is blocked solely by two CodeRabbit connection failures with no complete event. Preserved in codex/wip-wave2-coderabbit-blocked.patch; resume by applying it, rerunning the gate, and obtaining a completed CodeRabbit review.

Landed on main in a482f637. Legacy short-code identity is retained. Rows proven 26.7-shaped by exact category presence omit the unrecoverable identity from both the JSON body and the structured metadata rather than inventing a substitute, per frozen decision D6. Regression coverage pins both supported response generations. docs/compatibility.md names the limitation downstream Loki consumers must account for.

View the source file on GitHub