Skip to content

Publish UI evidence with an earlier visual baseline and authenticated attachment readback #1397

Open

Description

@taras

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions