Skip to content

GitHub Action

Previewed.Verified.

Don't merge a preview without a Receipt.

Preview

The loop

Kane reads the preview.
The receipt stays on the PR.

Connect the pull request. Receipt waits for Vercel, runs Kane on your README contract, and leaves the card. Learn more →

ohjay-official / receipt / pull/3receipt / pull/3
ConversationChecksFiles changed
  1. Vercel preview ready
  2. Kane run 43698574333 failed: checkout showed $29
  3. receipt-fix: 1 · 186ecdc
  4. Kane run 43699955024 passed
  • Waits for the preview

    The action holds until Vercel reports the commit status, then points Kane at that URL.

  • Runs your README contract

    Kane follows the How-to-test block. A required failure exits 1 and starts the card.

  • Leaves a receipt on the PR

    The comment shows Kane's verdict for each step, the attempt count, and a link to the evidence pack.

Runs on
  • GitHub Actions
  • Vercel
  • Kane CLI
  • Gemini
Install

Built for previews

Catch it. Fix it once.
Prove it again.

One pull request, three states of the same card. The numbers are the runs, not a mock.

Catch

$29, failed checkout on PR #3

Kane stopped on the required price step. Coupon and Pay never ran.

  • Red run 43698574333
  • Step 3 of 5
  • Pull request #3

Fix

1/3, shop files only, commit 186ecdc

The fixer edited shop/lib/prices.ts and shop/lib/checkout.ts only.

  • shop/lib/prices.ts
  • shop/lib/checkout.ts
  • receipt-fix: 1

Prove

Re-verify all five steps, green run 43699955024

The same contract ran again on the new preview and passed.

  • 5 steps passed
  • Attempt 1 of 3
  • Green run 43699955024
Kane

Preview

Wait for the preview.
Zero new tools.

The action listens for the Vercel commit status, then remaps the recorded origin onto that preview. Learn more →

  • Listens on pull_request

    Auto-started since PR #2. The workflow waits for the Vercel commit status on the head SHA.

  • Reads the README contract

    Kane follows the <!-- kane:how-to-test --> block, the same five steps as the committed test file.

  • Secrets stay in GitHub

    LambdaTest, Gemini, and the git token are repository secrets. The workflow never prints them.

Vercel previewreceipt-git-…vercel.appReady
commit status: successremap originkane:how-to-test
Kanestep 3 failed: checkout showed $29Run 43698574333
Fix

Cap

Three attempts,
then the loop stops.

A fixer may edit shop source only. The cap is three receipt-fix commits, then Kane’s last result stands.

  • shop/** only

    Application source under shop. Unit tests under that tree are still refused.

  • Max 3 receipt-fix commits

    PR #3 used one. The subject is receipt-fix: N, and the count stops at 3.

  • Tests and the contract are refused

    tests/, the README contract, .github, the action, and src stay untouched.

Gemini fixerfenced to shop/**
receipt-fix: 1 · 186ecdc · PR #3USED, PASSED
receipt-fix: 2 · unused
receipt-fix: 3 · unused

a different pull request

PR #4 · 0/3 · REFUSED · touched tests/checkout_test.md · run 43700368892

Re-verify

Proof

Five pull requests.
Still open.

Five real pull requests ran the loop. Every receipt links its red run, its fix, and its green run. See the proof →

ohjay-official / receipt / pulls

Receipt

Pull request #4

REFUSED

Kane 0 / 3

Fix
—
Green
—
REFUSED

Record

A preview check
that leaves a record.

Counts from this repo’s five proof pull requests, not a ticker. 49 action tests live in tests/action. Commit 186ecdc touched shop/lib/prices.ts and shop/lib/checkout.ts only.

Pull requests5

All five still open

Fixes pushed4

9492501, e7542b0, 186ecdc, 55b2815

Refused1

PR #4, run 43700368892

Seeded bugs3

$29, LAUNCH10, Pay at 390px

Seeded shop

Read the real prices.
Then open the shop.

Figures come from shop/lib. Production on main still has the bugs. Commit 186ecdc fixed them only on the pull request.

Which page are you reading?

Fix attempt 1 of 3

Attempt 1 of 3 reads the cap. The real fix on PR #3 was attempt 1, commit 186ecdc.

What else is seeded?

Pay is covered at 390px and at 900px and below. Pull request #3 fixed on attempt 1 of 3. This slider does not change main.

What the shop shows

Seeded prices

  • Plans page$19
  • Checkout$29 · expected $19
  • LAUNCH10no-op · expected $17.10
  • Pay @ 390pxblocked

Total due today$29

BUGS LIVE ON MAIN

Why it exists

A preview can lie.
The receipt says so.

Kane drives a real browser against the contract. The card is the record of what that browser saw.

Checkout

$29Expected $19

The catch is a real browser

Kane opened the preview and read the checkout total. The plans page still said $19.

  • Step 3 of 5 failed
  • Red run 43698574333
  • Pull request #3
  1. #1
  2. #2
  3. #3
  4. #4
  5. #5

The runs stay attached

Each pull request keeps its red run, its fix commit, and its green run. PR #4 has no fix.

  • Four green re-runs
  • One refusal
  • Nothing merged
  • shop/**
  • tests/
  • .github/
  • src/
  • action.yml
  • README

Fenced

The fixer may edit shop source. Tests, the contract, workflows, and the action are refused.

  • 186ecdc, two shop files
  • PR #4 refused a test edit
  • Cap is 3 commits
Receipt

Install

Print the setup.
One workflow, then the loop.

Public repo, Vercel, Deployment Protection off so Kane sees the app. The secrets stay in GitHub.

  1. 1Secrets stay in GitHub
  2. 2The How-to-test file
  3. 3The workflow on the preview

Receipt

Install

  • LT_USERNAMErepo secret
  • LT_ACCESS_KEYrepo secret
  • GEMINI_API_KEYrepo secret
  • RECEIPT_GIT_TOKENrepo secret
  • RECEIPT_PRODUCTION_URLrepo variable
# .github/workflows/receipt.yml
name: Receipt
on:
  pull_request:
    types: [opened, synchronize, reopened, ready_for_review]
  repository_dispatch:
    types: [vercel.deployment.ready]
  deployment_status:
  workflow_dispatch:
permissions:
  contents: read
  pull-requests: write
jobs:
  receipt:
    runs-on: ubuntu-latest
    timeout-minutes: 45
    steps:
      - uses: actions/checkout@v4
        with:
          token: ${{ secrets.RECEIPT_GIT_TOKEN || github.token }}
      - uses: ohjay-official/receipt@main
        with:
          test-file: tests/receipt_checkout_test.md
          production-url: ${{ vars.RECEIPT_PRODUCTION_URL }}
          allowlist: "<your app path>/**"
          max-fixes: "3"
          username: ${{ secrets.LT_USERNAME }}
          access-key: ${{ secrets.LT_ACCESS_KEY }}
          gemini-api-key: ${{ secrets.GEMINI_API_KEY }}
          git-token: ${{ secrets.RECEIPT_GIT_TOKEN }}
        env:
          RECEIPT_VERCEL_PROJECT: <your-vercel-project>
          RECEIPT_VERCEL_SCOPE: <your-vercel-team-slug>
          RECEIPT_WAIT_FOR_VERCEL_STATUS: ${{ github.event_name == 'pull_request' && 'true' || 'false' }}

Total$0

Public repo, Vercel Hobby, Kane’s free grant, Gemini free Flash. Pin to a commit SHA for stability: ohjay-official/receipt@<sha>. This install has not been verified on a second repo.