Skip to content

fix(storyboard): emit unresolved_hidden_by_pagination meta-observation (#718)#733

Merged
bokelley merged 3 commits into
mainfrom
bokelley/pagination-bypass-obs
Apr 21, 2026
Merged

fix(storyboard): emit unresolved_hidden_by_pagination meta-observation (#718)#733
bokelley merged 3 commits into
mainfrom
bokelley/pagination-bypass-obs

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

Closes #718. When refs_resolve sees target_paginated AND at least one ref was demoted to unresolved_with_pagination, the validator now emits a new unresolved_hidden_by_pagination meta-observation so graders can detect sellers indefinitely returning pagination.has_more: true to hide refs they can't service. Pass/fail semantics unchanged — graders interpret the flag.

Catches the integrity gap introduced by #717's pagination demotion: a seller that unconditionally returns has_more: true masks unresolved refs, and graders keying on refs_resolve.passed alone miss the structural smell. The new observation gives compliance dashboards an independent grader signal.

Design

Payload mirrors scope_excluded_all_refs: { kind, unresolved_count }. The per-ref detail already lives in the unresolved_with_pagination observations emitted immediately after — duplicating refs would inflate cap pressure without adding signal. unresolved_count is deduped so it matches the per-ref observation count.

Naming is neutral (unresolved_hidden_by_pagination) to match sibling observations (target_paginated, scope_excluded_all_refs, non_object_values_filtered). The validator names structural smells; graders decide intent.

Reviewer passes

Run through code-reviewer and ad-tech-protocol-expert. Feedback addressed:

  • Renamed pagination_bypass_suspectedunresolved_hidden_by_pagination (protocol-expert: smuggles accusation into the observation shape; sibling observations are all neutral descriptors)
  • Added 4th test pinning the dedup contract between unresolved_count and per-ref unresolved_with_pagination observations (code-reviewer)
  • Changeset links adcp#2601 as the spec-level sunset condition (protocol-expert)

Test plan

  • npm test — all suites pass
  • node --test test/lib/storyboard-validations-refs-resolve.test.js — 43/43 pass (4 new)
    • emits on paginated+unresolved co-occurrence, passed stays true
    • does NOT emit when paginated but all refs resolve
    • does NOT emit when unresolved but not paginated
    • unresolved_count reports deduped refs, not raw occurrences

🤖 Generated with Claude Code

bokelley and others added 3 commits April 21, 2026 16:41
#718)

When refs_resolve sees target_paginated AND at least one ref was demoted
to unresolved_with_pagination, emit a neutral structural flag so graders
can detect sellers indefinitely returning `has_more: true` to hide refs
they can't service. Pass/fail semantics preserved — graders interpret
the flag.

Payload mirrors scope_excluded_all_refs: `{ kind, unresolved_count }`.
unresolved_count is deduped so it matches the per-ref observation count.

Becomes redundant when adcp#2601's "compliance mode returns everything
referenced in a single response" rule lands at the spec level.

Reviewed by code-reviewer (ship it, nice-to-have dedup test added) and
ad-tech-protocol-expert (rename from pagination_bypass_suspected to
unresolved_hidden_by_pagination — neutral descriptor matches precedent
set by target_paginated/scope_excluded_all_refs, not accusatory).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ypass-obs

# Conflicts:
#	src/lib/types/core.generated.ts
#	src/lib/types/schemas.generated.ts
@bokelley bokelley merged commit 929b6b3 into main Apr 21, 2026
12 checks passed
@bokelley bokelley deleted the bokelley/pagination-bypass-obs branch April 21, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refs_resolve: grader-level flag when target_paginated co-occurs with unresolved_with_pagination (pagination-bypass)

1 participant