Skip to content

design: retain per-push ref certificates so commits can be shown as signed #627

Open

Description

@beardthelion

An outside indexer (see #588) wants to show which commits on a repo were pushed signed. Today that cannot be answered for history, only for the newest push on each ref.

What exists (checked on main):

  • Each push produces a signed ref certificate, readable without auth at GET /api/v1/repos/{owner}/{repo}/certs (limit capped at 200).
  • ref_certificates has a unique index on (repo_id, ref_name) and the insert upserts on conflict, so a new push to a ref overwrites the previous certificate for it. Only the latest push per ref is kept.
  • The commits response carries no signature field.
  • twigpine cert show --verify --expect-node <did> verifies a certificate against an issuer DID the caller already trusts.

The gap: a per-commit "signed" flag cannot be correct for anything but the current tip of each branch. A field that is present only on the tip would read as "unsigned" on every other commit, which is wrong.

A node-computed flag is not enough on its own. A node asserting that a commit is signed is the node vouching for itself. What a third party can rely on is the signed certificate checked against an issuer DID they trust independently, so any design should expose certificates, not only a boolean.

Decisions needed:

  1. Keep one certificate per push (new table, migration), and for how long.
  2. Whether to backfill repos that already have only their latest certificate.
  3. Public history from the database, or from the Arweave anchors. list_anchors rejects unauthenticated callers today, so it is not a public path as it stands.
  4. How a certificate maps to the commits it covers (old_sha..new_sha) and what that costs per request, since an ancestry walk spawns git.
  5. Response shape: absence must be distinguishable from "not covered by a retained certificate".

Out of scope here: the tags endpoint, homepage field and commits paging, tracked in #626.

Activity

  1. added
    sev:low
    subsystem:api
    kind:feature
    on Nov 21, 2026
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

    kind:featuresev:lowsubsystem:api

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions