gut(agents): remove dead resolveTranscriptPolicy + transcript-policy.ts — middleware-not-platform (#2490)#2491
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 23, 2026
Conversation
…ts — middleware-not-platform (#2490) RemoteClaw is middleware that delegates LLM execution to CLI agents. Per-provider transcript sanitization is a concern of the CLI's own API client, not middleware. `resolveTranscriptPolicy` had live attestation but zero production callers — a leftover from the pre-fork embedded execution path. Deletes `src/agents/transcript-policy.ts` (146 LOC) and its test suite `src/agents/transcript-policy.test.ts` (172 LOC). Shared imports (`provider-utils.ts`, `tool-call-id.ts`) remain — used elsewhere. Verified: `rg {transcript-policy,resolveTranscriptPolicy,TranscriptPolicy}` returns 0 code hits. `pnpm tsgo` / `pnpm lint` clean. All fork-integrity gates pass (attestation, zombie-imports, stub-debt, throwing-stub-callers, obsolescence, rebrand). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/agents/transcript-policy.ts(146 LOC) andsrc/agents/transcript-policy.test.ts(172 LOC).resolveTranscriptPolicywas live-by-attestation, dead-by-consumption: zero production callers acrosssrc/,ui/,extensions/,apps/,scripts/.Scope
provider-utils.ts,tool-call-id.ts) remain — used by 20+ and 5+ other importers respectively. Not orphaned.MODULE_ATTESTATIONS = { resolveTranscriptPolicy: "live" }in the deleted file disappears with it;scripts/check-attestations.mjsscans dynamically and remains happy.isGoogleModelApimodule-local stub (line 14 of the deleted file) is removed as a bonus — it was shadowing the real function and making Google policy branches unreachable, but since the containing function had no callers, the bug was dead-by-death.Test plan
rg transcript-policyacross repo returns 0 code hitsrg resolveTranscriptPolicy src/returns 0 hitsrg "TranscriptPolicy\b" src/returns 0 hitspnpm tsgocleanpnpm lintclean (0 warnings, 0 errors, 3923 files)pnpm testpasses; net test count decreased by the 13+ scenarios in the deleted.test.tspnpm buildcleanReferences
z.unknown()stubs)gut(agents): remove model-selection.ts)scripts/check-attestations.mjs🤖 Generated with Claude Code