Skip to content

fix(interrogate): take every lens whose trigger matches, not only for SDKs - #23

Merged
lucasheriques merged 2 commits into
mainfrom
lucas/lens-property-triggers
Nov 5, 2026
Merged

lucasheriques merged 2 commits into
mainfrom
lucas/lens-property-triggers

Conversation

@lucasheriques

Copy link
Copy Markdown
Owner

Why

The goal is a pre-PR gate that catches the bugs review bots keep finding, wherever those bugs can happen. #22 forced Exposure, Isolation, and Upgrade onto SDK and package changes only. That repeated the lenses' own triggers as a check on artifact type, and it missed the same bugs in services, such as a Django worker with shared state.

What changed

  • Frame takes every lens whose "Use when" the change meets. The SDK special case is gone.
  • Upgrade triggers on any outside consumer: a package, a public API, a CLI, or a tool, event, or file schema that others read.
  • Exposure covers the values a change adds or reshapes and the paths it alters, not every path that writes to the destination.

Scope

  • Completeness and Interactions keep their triggers. An adversary called them broad, but it ran no change through them.

Blast Radius

More gate runs carry more lenses, so adversaries spend more per run. Exposure's narrower method offsets part of that.

Verification

  • Gate: Opus and Sonnet adversaries. Both flagged blind-spots.md still saying "the lead picks". Opus showed that a mandatory Exposure lens would canary-test every endpoint. Both are fixed in the second commit. Dismissed: Completeness and Interactions are too broad. It wasn't run, and those triggers predate this PR.
  • bun scripts/check-port.ts reports 0 findings.

… SDKs

PR #22 forced Exposure, Isolation, and Upgrade on SDK and package changes.
That restated the lenses' own triggers by artifact type and missed the same
bugs in services, such as a Django worker with shared state. Frame now takes
every lens whose "Use when" the change meets, and Upgrade triggers on any
outside consumer: a package, public API, CLI, or a schema others read.

Tested: bun scripts/check-port.ts -> 0 findings.
Gate findings on a4eea2e. blind-spots.md still said the lead picks lenses,
contradicting the new rule; it now defers to Frame. With matching lenses
mandatory, Exposure's "run every path that writes to the destination"
meant canary-testing every endpoint for a one-field response change. It
now covers values the change adds or reshapes, the paths it alters, and
new values that skip redaction their payload neighbors get.

Tested: bun scripts/check-port.ts -> 0 findings.
@lucasheriques
lucasheriques merged commit b0e4445 into main Nov 5, 2026
1 check passed
@lucasheriques
lucasheriques deleted the lucas/lens-property-triggers branch November 5, 2026 20:34
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.

1 participant