feat(#1422): add insert-image container-probe regression gate - #1428
Conversation
The #81 smoke matrix's image-drop row has had no non-GUI substitute — a human found it silently failing (guest apply succeeds, nothing persists to host Source/, matching #718/#1066's shape but for insert-image) with no repeatable way to re-check it besides another manual drag-and-drop. Add an `insert-image` subcommand to anglesite-container-probe, alongside the existing `apply-edit` case-8 gate: boots a real LocalContainerSiteRuntime, drives an actual insert-image edit through MCPApplyEditRouter wired exactly like production, and asserts the reply's commit is non-nil AND that the host public/images/ asset the patched <img>'s src references actually exists — the assertion apply-edit has no equivalent of, since text edits have no associated binary asset. This gate can't pass yet: it needs the paired sidecar fix (Anglesite/anglesite-skills#441) tagged and vendored into this app's container image first. Scaffolding only, per #1422's scope — the issue's other, unconfirmed defect (why the guest reply's commit can come back nil for insert-image) needs a real-hardware repro with guest debug-pane capture, not attempted here.
# Conflicts: # docs/qa/app-store-container-smoke-test.md
davidwkeith
left a comment
There was a problem hiding this comment.
Reviewed runInsertImage/extractFirstImgSrc and the run-container-probe.sh/doc wiring. This mirrors runApplyEdit's existing shape closely (same router wiring, same boot/state-guard pattern, same FAIL-message style pointing at the specific #1422 defect each guard catches), and correctly reuses the pre-existing InsertImageEditBuilder rather than reinventing message construction. scripts/run-container-probe.sh isn't referenced by any .github/workflows/* job, so this gate being unable to PASS yet (documented up front, pending anglesite-skills#441 + an image bump) can't turn CI red — it's purely an author-run gate, as intended.
Two minor, non-blocking notes:
Data(base64Encoded: onePixelPNGBase64)!(main.swift, the 1x1 PNG fixture) force-unwraps a hardcoded literal. Low risk since the string is a fixed compile-time constant, but if that literal is ever hand-edited a typo turns into a crash rather than a clear "FAIL: bad fixture" message, which is otherwise this file's consistent failure-reporting style.mergeable_stateis currentlydirtyeven thoughbase.shamatches currentmainHEAD (3bb57cf6) and the diff (probe file, doc, script) doesn't obviously overlap anything else in flight — worth agit mergelocally to confirm this isn't a real conflict before merging, since GitHub sometimes just hasn't finished recomputing mergeability on a brand-new PR.
No functional issues found in the new assertions themselves — the '<img src="...">' regex extraction is appropriately scoped (documented as fixture-only, not a general parser) and the three-stage guard order (commit → <img> present → referenced asset present) matches the PR description's stated intent.
Generated by Claude Code
Part of #1422 — does not close it. Scaffolding only, per the issue's own triage note that this fix spans two repos and isn't safe for a single autonomous pass; see the paired sidecar PR and scope note below.
Summary
insert-imagesilently failing the same way Edit-overlay text edits are ephemeral: apply-edit writes only the container clone, never the canonical Source/ repo — silent data loss on window close #718/Edit-overlay text edits still never reach canonical Source/ — #718 regression survives #737 #1066 did for text edits — guest apply succeeds, nothing persists to hostSource/.insert-imagesubcommand toanglesite-container-probe(Sources/AnglesiteContainerProbe/main.swift), alongside the existingapply-editcase-8 gate, and wires it intoscripts/run-container-probe.sh.commitis non-nil AND that the hostpublic/images/…asset the patched<img>'ssrcreferences actually exists on disk — the checkapply-edithas no equivalent of, since text edits carry no binary asset.docs/qa/app-store-container-smoke-test.mdalongside the existing case-8 write-up.Paired PR check
Anglesite/Anglesite.Anglesite/anglesite-skills(MCP sidecar server). Link: Anglesite/anglesite-skills#441.Test plan
swift test --package-path .— 460 tests, all passing.swift build --package-path . --product anglesite-container-probe— builds clean.xcodebuild -project Anglesite.xcodeproj -scheme Anglesite -configuration Debug build— not run; this change touches only the standalone probe executable and a doc/script, not the app target.Scope note
This is the app-side half of the "add app-side probe gate scaffolding" scope for #1422: the gate exists and compiles, but cannot pass yet. It needs anglesite-skills#441 tagged/released and this app's vendored container image bumped to consume it — until then, running
scripts/run-container-probe.sh insert-imageagainst the current container image is expected to reproduce the FAIL this issue reports (missingpublic/images/asset on host). #1422's other, unconfirmed defect — why the guest reply'scommitcan come back nil forinsert-imagein the first place — needs a real-hardware repro with guest debug-pane capture and is not addressed here.🤖 Generated with Claude Code