Skip to content

feat(boatstack): capture visual evidence automatically during ship - #255

Merged
bigboateng merged 1 commit into
mainfrom
visual-evidence-2-auto-capture
Jul 30, 2026
Merged

feat(boatstack): capture visual evidence automatically during ship#255
bigboateng merged 1 commit into
mainfrom
visual-evidence-2-auto-capture

Conversation

@bigboateng

Copy link
Copy Markdown
Contributor

Why

pr_visual_evidence: suggest permitted shipping with NOT_VERIFIED because capture (capture-evidence) and attachment were separate agent-prescribed verbs — in practice the operator had to prompt "attach the screenshot" manually. Invariant enforced by this program: when a delivery declares visual evidence relevant, Boatstack captures and attaches it automatically during ship — or blocks publication. This slice makes capture automatic.

What changed

  • One insertion point: ensureCurrentPRVisualEvidence in PreparePRContext, between the product diff and evidence resolution. publish-pr → CheckPRPreview → PreparePRContext means one hook covers pr-context, check-pr, and publish-pr; after fix(boatstack): key visual-evidence trust to product identity #254, staleness co-varies with the fingerprinted product diff, so a publish-time-only staleness state is impossible by construction and no second capture site exists.
  • Auto-capture runs only when: managed mode, policy ≠ off, plan relevance relevant with scenarios, a repository command resolves (project.commands.visual), and evidence is missing or stale. It reuses CaptureEvidence wholesale (supervised per-scenario operations, 3 attempts, fingerprinted reuse).
  • Failure semantics: harness failure → bounded pr_visual_evidence_capture_detail on the context (JSON-only, outside the context fingerprint so a flaky harness message can't destabilize preview equality), resolution proceeds as today. No registered command → exactly the prior prescribed path, runner never consulted. Harness dirties the tree → refused with the violating paths.
  • The require block in PublishPR is now a calm denial: new category workflow-visual-evidence-missing with a computed solution set (capture-evidence, capability-register --command <owed>, provision-capability, record-pr-visual-evidence --manifest <owed>, planning-write for the not_relevant escape), added to the denial-category inventory so the totality/closure sweeps hold it.
  • visual capability AdmittedStages += REVIEW_PASSED, PR_PREVIEW (declaration honesty; verified unenforced anywhere).
  • ship-gate skill text: capture is no longer an agent step; the agent's job is the privacy review of auto-captured PNGs.

Considered and deliberately unchanged: the statemap visual-evidence OwnerVerbs — writes flow through the same capture-evidence machinery, matching the existing convention where publish-pr's publication-state writes are also not separately declared.

Invariants pinned

  • TestPreparePRContextAutoCapturesRelevantVisualEvidence — declared-relevant evidence is captured by ship, not prescribed; repeat preparation is a no-op per product diff (runner call count and fingerprint stable).
  • TestAutoCaptureFailureDegradesToTodayUnderSuggest — failing harness ⇒ NOT_VERIFIED + bounded detail, no error.
  • TestAutoCaptureUnavailableCapabilityFallsBackToPrescribedPath — zero-value invariant.
  • TestRequiredVisualEvidenceDenialCarriesSolutionSet — blocked publication names its own recovery ladder.

Verification

  • go build ./... && go vet ./... && go test ./... green (incl. denial totality/closure sweeps)
  • Release note: 2026-07-30-auto-capture-on-ship.md

Slice 2 of 5 (program: visual evidence as a deterministic delivery requirement); follows #254.

When the plan declares relevant visual scenarios and the repository
registers a capture command, pr-context/check-pr/publish-pr now run the
harness themselves whenever evidence is missing or stale — capture is a
delivery property, not a prescribed agent step. One hook in
PreparePRContext covers all three verbs because publish re-derives the
context and staleness co-varies with the fingerprinted product diff.

- harness failure degrades to the recorded NOT_VERIFIED gap with a
  bounded pr_visual_evidence_capture_detail (never a context error, and
  deliberately outside the context fingerprint)
- no registered command → exactly the prior prescribed path
- a harness that dirties the working tree is refused with the violating
  paths (capture contract: write only BOATSTACK_CAPTURE_OUTPUT)
- the require publication block is now a calm denial
  (workflow-visual-evidence-missing) whose solution set enumerates the
  recovery ladder: capture-evidence, capability-register,
  provision-capability, record-pr-visual-evidence, planning-write
- ship-gate skill text: capturing is no longer the agent's step; its
  job is the privacy review of the captured PNGs

Disclosure-Reviewed: reviewed — public-safe only, private facet kept out of this commit
@bigboateng
bigboateng merged commit f42f1a8 into main Jul 30, 2026
12 checks passed
@bigboateng
bigboateng deleted the visual-evidence-2-auto-capture branch July 30, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant