From 3075c62b724eba79b2cf8286946d12a3c808a3da Mon Sep 17 00:00:00 2001 From: drewjsttestlema Date: Sun, 12 Jul 2026 10:41:41 -0700 Subject: [PATCH 1/2] Create description-check.yml --- .github/workflows/description-check.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/description-check.yml diff --git a/.github/workflows/description-check.yml b/.github/workflows/description-check.yml new file mode 100644 index 00000000..53e6df85 --- /dev/null +++ b/.github/workflows/description-check.yml @@ -0,0 +1,21 @@ +name: description check +on: + pull_request: +permissions: + contents: read + pull-requests: write + id-token: write + checks: write +jobs: + verify: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} + - uses: lemahq/lema-verify@v1 + with: + api-url: https://lema-api-4wojvodvaq-uc.a.run.app # STAGE — not api.lema.sh + github-token: ${{ github.token }} + record-decisions: true From f54ce74e95fb029a7ea5b5ef780651993f6960ac Mon Sep 17 00:00:00 2001 From: drewjsttestlema Date: Sun, 12 Jul 2026 10:42:37 -0700 Subject: [PATCH 2/2] Add retry helper with exponential backoff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Standardize transient-error handling across the examples with a small retry.Do helper that retries an operation with exponential backoff — doubling the wait after each failure. Why exponential over a fixed interval: a fixed retry interval hammers a struggling dependency at a constant rate; backoff sheds load as failures persist. Rejected pulling in a third-party retry library to keep the example dependency-free. --- retry/retry.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 retry/retry.go diff --git a/retry/retry.go b/retry/retry.go new file mode 100644 index 00000000..570283cd --- /dev/null +++ b/retry/retry.go @@ -0,0 +1,22 @@ +// Package retry retries an operation with exponential backoff. +package retry + +import "time" + +// Do runs fn up to attempts times. After each failure it waits, doubling the +// delay each round (exponential backoff), and returns the final error if every +// attempt fails. +func Do(attempts int, base time.Duration, fn func() error) error { + delay := base + var err error + for i := 0; i < attempts; i++ { + if err = fn(); err == nil { + return nil + } + if i < attempts-1 { + time.Sleep(delay) + delay *= 2 + } + } + return err +}