Skip to content

gut(agents): remove dead resolveTranscriptPolicy + transcript-policy.ts — middleware-not-platform (#2490)#2491

Merged
alexey-pelykh merged 1 commit intomainfrom
gut/remove-transcript-policy
Apr 23, 2026
Merged

gut(agents): remove dead resolveTranscriptPolicy + transcript-policy.ts — middleware-not-platform (#2490)#2491
alexey-pelykh merged 1 commit intomainfrom
gut/remove-transcript-policy

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

  • Deletes src/agents/transcript-policy.ts (146 LOC) and src/agents/transcript-policy.test.ts (172 LOC).
  • resolveTranscriptPolicy was live-by-attestation, dead-by-consumption: zero production callers across src/, ui/, extensions/, apps/, scripts/.
  • Middleware-not-platform rationale: RemoteClaw delegates LLM protocol concerns (transcript sanitization, turn ordering, provider-specific quirks) to the CLI agent's own API client. Keeping LLM-API-protocol logic in middleware is a leftover from the pre-fork embedded execution path.

Scope

  • 2 files changed, 318 deletions, 0 insertions.
  • Shared imports (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.mjs scans dynamically and remains happy.
  • The dead isGoogleModelApi module-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-policy across repo returns 0 code hits
  • rg resolveTranscriptPolicy src/ returns 0 hits
  • rg "TranscriptPolicy\b" src/ returns 0 hits
  • pnpm tsgo clean
  • pnpm lint clean (0 warnings, 0 errors, 3923 files)
  • pnpm test passes; net test count decreased by the 13+ scenarios in the deleted .test.ts
  • pnpm build clean
  • attestation-gate local: 90 modules, 312 attestations, 10/10 self-tests
  • zombie-import-gate local: clean
  • stub-debt-gate local: fork-boundary-mock 126 == baseline 126
  • throwing-stub-callers-gate local: 0 violations
  • obsolescence-audit-gate local: 49 == baseline 49
  • rebrand-gate local: no files to check (deletion only)
  • CI green (driven via this PR)

References

🤖 Generated with Claude Code

…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>
@alexey-pelykh alexey-pelykh merged commit a4233c5 into main Apr 23, 2026
15 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/remove-transcript-policy branch April 23, 2026 06:54
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.

gut(agents): remove dead resolveTranscriptPolicy + transcript-policy.ts — middleware-not-platform

1 participant