Repository navigation
Description
Story
When publishing UI evidence from a REPL, Sidekick can use the supported publisher to attach and verify the reviewed reference, Before, and After images even when the PR's base branch has advanced after the visual baseline was captured.
Observed failure
During #1387, Sidekick reported abandoning the managed publisher because the PR's current base SHA differed from the pinned visual Before. It created and edited the PR, uploaded images, and verified readback through Python and gh commands in REPL shell blocks. Anonymous attachment reads failed while authenticated reads succeeded. The final publication required 27 image attachments.
The current implementation in examples/repl-bench/lib/publication-host.ts compares base.sha with the evidence's pinned base. Its attachment verifier fetches with credentials: "omit". The public Evidence.Prepare and Evidence.Publish components already exist.
Required behavior
- Record and validate the reviewed visual Before independently of the PR's current base commit. Preserve exact candidate, repository, branch, receipt and image validation through publication and readback.
- Use the supported authenticated GitHub path when it is required to read a published attachment, retaining digest and size verification.
- Make preparation, publication, partial completion and readback invocable through the existing components in an ordinary REPL round, with an observable result.
- Move repository and GitHub operations used by image publication onto the supported Git/PR APIs, including PR reads and updates, attachment upload, and authenticated attachment readback. Extend the owning Git/GitHub package or its upstream dependency for demonstrated missing capabilities, contribute those changes upstream, and land the prerequisite changes before migrating the publisher. Remove the publisher's superseded ad hoc command paths as part of that migration.
Acceptance
Through the publisher's public component path and a controlled GitHub boundary, publish evidence whose reviewed Before precedes the current PR base, then read back and verify the attachments. Include an attachment that requires authentication, a changed candidate, mismatching image bytes and interrupted partial publication. Reuse acknowledged uploads on continuation and preserve the correct failure for invalid evidence.
The publication acceptance must exercise the shared Git/GitHub boundary and show that the publisher uses it for these operations. Verify replay and interrupted-publication behavior through that same path.
This is a prerequisite of #1396 before the next UI audit batch.
Activity