Area: mobieusHelp (audit p7) · Surface: platform/src/Services/Helpdesk/CannedRenderer.php · Dimension: dead-code · Severity: minor
renderAndRecord() was intended as the 'render canned response + record usage for analytics' convenience wrapper (it calls CannedResponse::recordUse then self::render). No production code path or test ever calls it; the agent ticket UI collects vars client-side via collectVars() and the canned-use analytics recording (CannedResponse::recordUse) is invoked, if at all, through other paths. The method is dead.
Evidence
Definition at platform/src/Services/Helpdesk/CannedRenderer.php:58 `public static function renderAndRecord(int $cannedId, int $ticketId, ?array $agent = null): string`. Whole-repo grep finds only the definition: `grep -rn "renderAndRecord" /home/patrick/mobieus-io --include='*.php' | grep -v "function renderAndRecord"` => 0 lines. By contrast the sibling helpers on the same class ARE used: CannedRenderer::knownPlaceholders() (AdminCannedResponsesController.php:39,95), CannedRenderer::collectVars() (templates/helpdesk/agent/ticket.php:740), CannedRenderer::render() (only bin/helpdesk-p2-smoke.php:66 — smoke test, not production). renderAndRecord has no callers in src, bin, scripts, templates, or tests.
Suggested fix. Remove renderAndRecord() from CannedRenderer, or wire it into the agent reply flow if usage analytics on canned responses is actually wanted (currently recordUse is only reachable through this dead method, so canned-response usage stats may never be recorded — worth confirming before deletion).
Filed by the automated tenant-app audit and adversarially evidence-verified. Status: verified. Open — not yet actioned.
Patrick Bass
@mobieus