Skip to content

feat(interrogate): add exposure, isolation, and upgrade lenses for SDK changes - #22

Merged
lucasheriques merged 2 commits into
mainfrom
lucas/interrogate-sdk-lenses
Nov 5, 2026
Merged

lucasheriques merged 2 commits into
mainfrom
lucas/interrogate-sdk-lenses

Conversation

@lucasheriques

@lucasheriques lucasheriques commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Why

The pre-PR gate should catch the bugs that review bots keep catching on SDK PRs. Across 19 MCP SDK PRs in posthog-js and posthog-python, the repeat findings fell into three classes that no lens points at: captured data that skips redaction, state leaking between callers or instances, and behavior that changes for users who upgrade without touching code.

What changed

  • blind-spots.md gains Exposure, Isolation, and Upgrade lenses.
  • interrogate's Frame makes those three mandatory for SDK and package changes, and folds the touched directories' ADRs into the intent.
  • Babysit step 9 runs the correct skill once a review finding class repeats in a repo.

Scope

  • Covers lens text and when to pick it. Adversaries still get every chosen lens. Splitting lenses across adversaries is a separate idea that needs an eval.
  • Repo-specific checks (canary sweeps, entry-point matrices) belong in each SDK repo through correct, not here.

Blast Radius

Every interrogate run on an SDK or package change now carries three more lenses, so adversaries spend more on those runs. Other changes are unaffected. The new rules are fork-only departures recorded in translation.md.

Verification

  • Replay: a Sonnet adversary with only the Isolation lens, run on feat(mcp): group sessions by ChatGPT, Codex and VS Code conversation ids PostHog/posthog-python#1193 at 208707d (the commit the old gate passed), reproduced the cross-caller session leak that reviewers later flagged as P1. The repro was a failing pytest: caller B's custom event carried caller A's $session_id.
  • Gate: Opus and Sonnet adversaries. One verified finding: babysit's check and threads-only modes would have opened a correct PR. Fixed in the second commit. A hand-run upstream sync merge kept every new line.
  • bun scripts/check-port.ts reports 0 findings.

…K changes

Review bots on Lucas's MCP SDK PRs (posthog-js, posthog-python) kept
finding three bug classes the gate's lenses never point at: captured data
that skips redaction, state leaking between callers or instances, and
default behavior that changes for users who upgrade without touching code.

- blind-spots.md gains Exposure, Isolation, and Upgrade lenses.
- Frame makes those three mandatory for SDK and package changes, and folds
  the touched directories' ADRs into the intent, so a change that reverses a
  recorded decision breaks the intent.
- Babysit step 9 runs the correct skill once a review finding class repeats.
- translation.md records both as deliberate departures.

Tested: bun scripts/check-port.ts -> 0 findings.
check and threads-only touch nothing (step 6), so they offer the correct
PR instead of opening it. Found by the pre-PR gate's opus adversary.

Tested: bun scripts/check-port.ts -> 0 findings.
@lucasheriques
lucasheriques marked this pull request as ready for review November 5, 2026 19:26
@lucasheriques
lucasheriques merged commit 07ac896 into main Nov 5, 2026
1 check passed
@lucasheriques
lucasheriques deleted the lucas/interrogate-sdk-lenses branch November 5, 2026 20:23
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