Skip to content

refactor(ai/should-respond): delete dead protected helpers — Rust path owns gating now#1428

Merged
joelteply merged 1 commit into
canaryfrom
refactor/delete-dead-gating-helpers
May 18, 2026
Merged

refactor(ai/should-respond): delete dead protected helpers — Rust path owns gating now#1428
joelteply merged 1 commit into
canaryfrom
refactor/delete-dead-gating-helpers

Conversation

@joelteply
Copy link
Copy Markdown
Contributor

Summary

After the should-respond oxidizer wave (#1421 + #1424 + parent #1248), the AIShouldRespondCommand parent class's protected helpers (buildGatingInstruction, parseGatingResponse) became dead code. The Server impl delegates to RustCoreIPCClient.cognitionShouldRespond → Rust cognition/should_respond.rs::evaluate_gating. Nothing calls the TS helpers.

Per Joel's zero-users no-migration-ceremony directive: delete now, not "deprecate for follow-up."

Diff

AIShouldRespondCommand.ts: -172 LOC (kept 7-LOC shell for inheritance)

What gets deleted

  • protected buildGatingInstruction(params) (~95 LOC) — Rust build_gating_prompt is the prompt source of truth
  • protected parseGatingResponse(aiText) (~65 LOC) — Rust parse_gating_response is the parser source of truth

What stays

  • Class shell (AIShouldRespondCommand extends CommandBase) — inheritance base for Server + Browser commands
  • static readonly commandName = 'ai/should-respond' — command registry discovery

Verification

  • npm run build:ts — clean (no remaining references to deleted helpers)
  • grep for callers of deleted methods: zero
  • ESLint baseline check held
  • Pre-push green
  • CI

Refs

  • continuum#1421 (AIShouldRespondServerCommand delegation that orphaned these helpers)
  • Joel 2026-05-18 19:44Z (zero-users, no migration ceremony → delete-loser-in-one-PR)

🤖 Generated with Claude Code

…h owns gating now

After #1421 + #1424 + the should-respond oxidizer wave, the
`AIShouldRespondCommand` parent class's protected helpers
(`buildGatingInstruction`, `parseGatingResponse`) became dead code.
The Server impl now delegates to `RustCoreIPCClient.cognitionShouldRespond`
which routes through the Rust `cognition/should_respond.rs::evaluate_gating`
path; nothing calls the TS helpers anymore.

Per Joel's zero-users no-migration-ceremony directive: delete now,
not "deprecate for follow-up." Single PR.

## Diff

- AIShouldRespondCommand.ts: -172 LOC (kept 7-LOC shell for inheritance)

## What gets deleted

- `protected buildGatingInstruction(params): string` (~95 LOC) — Rust
  `cognition/should_respond.rs::build_gating_prompt` is the prompt
  source of truth.
- `protected parseGatingResponse(aiText): Partial<...>` (~65 LOC) —
  Rust `cognition/should_respond.rs::parse_gating_response` is the
  parser source of truth.

## What stays

- Class shell (`AIShouldRespondCommand extends CommandBase`) — still
  the inheritance base for both `AIShouldRespondServerCommand` and
  `AIShouldRespondBrowserCommand`.
- `static readonly commandName = 'ai/should-respond'` — used by the
  command registry to discover the command name.

## Verification

- `npm run build:ts` — clean (no remaining references to deleted
  helpers).
- `grep` for callers of the deleted methods: zero (only the now-deleted
  definitions themselves matched in the prior wave).
- ESLint baseline check: no change (the deleted methods were lint-clean).

## Refs

- continuum#1421 (AIShouldRespondServerCommand delegation that
  orphaned these helpers)
- Joel 2026-05-18 19:44Z (zero-users, no migration ceremony →
  delete-loser-in-one-PR)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@joelteply joelteply merged commit b8888e3 into canary May 18, 2026
3 of 4 checks passed
@joelteply joelteply deleted the refactor/delete-dead-gating-helpers branch May 18, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant