diff options
| author | Claude <noreply@anthropic.com> | 2026-05-27 05:42:31 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-05-27 05:42:31 +0000 |
| commit | 1deee869e5cd0895e45016192dd70c0ed6c68cf3 (patch) | |
| tree | 1f83ebf537ac1ac7f0937f9e906b3f0dd617377a /internal/executor/helpers.go | |
| parent | b9d73497efe7c28800040b3e421bfb4cb6af6092 (diff) | |
refactor(executor): retire the file-based question/summary fallback (Phase 8)
With the MCP agent channel validated (the spike confirmed real claude calls
ask_user/report_summary through it), the container runner no longer needs the
pre-MCP file fallback that read question.json/summary.txt after the agent
exited. Removes that block and the now-orphaned isCompletionReport/
extractQuestionText helpers and their test. The MCP path
(channelPendingQuestion) is now the sole question/summary transport.
https://claude.ai/code/session_01SESwn7kQ7oP62trWw6pc39
Diffstat (limited to 'internal/executor/helpers.go')
| -rw-r--r-- | internal/executor/helpers.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/internal/executor/helpers.go b/internal/executor/helpers.go index 76bf8b1..9517492 100644 --- a/internal/executor/helpers.go +++ b/internal/executor/helpers.go @@ -177,29 +177,3 @@ func gitSafe(args ...string) []string { "-c", "tag.gpgsign=false", }, args...) } - -// isCompletionReport returns true when a question-file JSON looks like a -// completion report rather than a real user question. Heuristic: no options -// (or empty options) and no "?" anywhere in the text. -func isCompletionReport(questionJSON string) bool { - var q struct { - Text string `json:"text"` - Options []string `json:"options"` - } - if err := json.Unmarshal([]byte(questionJSON), &q); err != nil { - return false - } - return len(q.Options) == 0 && !strings.Contains(q.Text, "?") -} - -// extractQuestionText returns the "text" field from a question-file JSON, or -// the raw string if parsing fails. -func extractQuestionText(questionJSON string) string { - var q struct { - Text string `json:"text"` - } - if err := json.Unmarshal([]byte(questionJSON), &q); err != nil { - return questionJSON - } - return strings.TrimSpace(q.Text) -} |
