Skip to content

refactor(mitm): replace inspector utilities clean-room - #11748

Merged
diegosouzapw merged 2 commits into
release/v3.8.51from
fix/v3850-clean-room-inspector-20260826
Aug 28, 2026
Merged

diegosouzapw merged 2 commits into
release/v3.8.51from
fix/v3850-clean-room-inspector-20260826

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

  • replace four previously derived Traffic Inspector utilities with independent clean-room implementations: conversation normalization, SSE parsing/merging, secret masking, and header sanitization
  • preserve public exports and observable caller contracts across OpenAI Chat/Responses, Anthropic Messages, Gemini, wrappers, and WHATWG SSE framing
  • document the four replacements as standards-based clean-room work while keeping the two separately classified passthrough surfaces unchanged
  • add no THIRD_PARTY_NOTICES entry because no upstream notice or source was reproduced

Clean-room boundary

Work started from exact base 091589089cd134a94df9f6cdab9ba562b2cefd18 in an exclusive worktree. The previous bodies of the four target files were never opened/read and were replaced with minimal stubs before implementation. No git show, git diff, git blame, or git log was used on those bodies; no llm-interceptor repository/package or provenance report was read. Inputs were limited to local black-box tests, public callers/types, repo documentation, and primary WHATWG/OpenAI/Anthropic/Gemini/RFC 6750 documentation.

src/mitm/passthrough.ts and src/mitm/_internal/bypass.cjs are intentionally untouched; their Git blob hashes match the exact base.

TDD evidence

  • black-box baseline before stubs: 44/44 PASS
  • deliberate minimal stubs RED: 6/44 PASS, 38 FAIL
  • final focused suite: 54/54 PASS
  • focused downstream consumers: 48/48 PASS
  • ConversationTab consumers: 14/14 PASS
  • 1,000,049-character masking probe: integral Bearer *** redaction in one linear scan

Gates

  • npm run typecheck:core: PASS
  • npm run typecheck:noimplicit:core: BASE-RED; exact base reproduces the identical TS7006/TS702x set in unchanged open-sse/translator/response/openai-responses/pureHelpers.ts
  • focused ESLint on all changed TS/tests: PASS
  • full npm run lint: HOLD/infra; stopped after about 8 minutes under severe shared-host contention without emitting a diagnostic
  • npm run check:docs-all: PASS (historical soft drift warnings only)
  • npm run check:changelog-integrity: PASS
  • npm run check:cycles: PASS
  • Prettier and scoped diff whitespace check: PASS
  • full test:unit / test:vitest: attempted but not conclusive under shared-host CPU/SQLite contention; runs were interrupted after unrelated timeout failures. Focused and direct consumer matrices above are green.

This PR remains draft pending normal CI and review.

@diegosouzapw
diegosouzapw force-pushed the fix/v3850-clean-room-inspector-20260826 branch from fe42538 to 8ed0ad9 Compare August 28, 2026 04:36
@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.50 to release/v3.8.51 August 28, 2026 04:36
@diegosouzapw
diegosouzapw marked this pull request as ready for review August 28, 2026 08:04
@diegosouzapw
diegosouzapw merged commit 3026183 into release/v3.8.51 Aug 28, 2026
21 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…11748)

Merged via /merge-batch (v3.8.51 provenance sweep). Boarded and validated together with the batch's other provenance PRs in a combined worktree — full gate suite green. Thank you.
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