fix(acp): preserve image paths as fallback - #8238
Conversation
Design Review (Fable 5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Hedges an unevidenced failure mode by regressing the common case, and silently retires this module's own stated design goal without updating its spec. Watch
Suggestions
[DESIGN-REVIEWED] f7b4f52 |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsFINDING -- src/kiro_crew/acp/prompt_blocks.py:141 -- |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings that block; one advisory documentation-drift finding. FINDING — src/kiro_crew/acp/prompt_blocks.py:13 — deleting the [OPUS-REVIEWED] f7b4f52 |
First Principles Review (Fable 5, fork) — 🔴 BLOCKPremise-level review of I have everything I need. First-Principles-Verdict: BLOCK The guarded failure — "if the image block is dropped downstream" — has zero named instances, and the path-fallback already exists on every observable failure branch. What this change shipsIntent: keep the original file path in the prompt text so an agent can read the file if the inline image never arrives — framed as a FIX.
BlockersA [FIRST-PRINCIPLES-REVIEWED] f7b4f52 |
Open PR relationship auditThis is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion. Relationship findings
No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit. |
Problem / Motivation
When KiroCrew converts a local image path into an ACP image block, it replaces the path in the text with
[image: <name>]. If the image block is dropped downstream, the agent receives neither the image nor a usable path to the source file.Why it matters
The agent cannot inspect the image or recover with its file-reading tools. Users must manually transcribe the screenshot or run OCR outside the normal workflow.
What changed (motivation → approach → change)
The image block remains the primary vision input, but the original local path now stays in the text block as a fail-open fallback. If image delivery works, the model receives the image as before. If it fails, a tool-capable agent can still read the source file.
The single-image, multiple-image, and repeated-path tests now verify that source paths remain available while each image is still encoded into an ACP image block.
Tests
test/test_acp_prompt_blocks.py: 87 passed, 1 skippedpy_compileManual verification
Confirmed the latest
origin/mainstill replaces source paths with[image: <name>], so this fix was not already present.Verified the final branch is based on the latest
origin/main, contains one focused commit, and modifies only the prompt-block implementation and its tests.Related Issues
N/A — no existing issue linked.
Pattern harvest
Rule candidate: review-prompt
Pattern: When converting a recoverable local reference into an opaque payload, retain the original reference if downstream delivery can fail silently.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
N/A — the repository template states that the exact CLA wording is still pending from OSPO.