Closed general

page verify: sign component verification records (wiki#246 API)

Colby Knox · ·closed by Colby Knox

The wiki now takes component verification records over the API (adom/wiki#246, on staging as of git-wiki 16e4a553; prod expected 2026-10-29). The CLI needs a verb for it so the factory and agents stop hand-editing verification.json with verify_log.py.

API

  • GET /api/pages/<owner>/<slug>/verification: { schema, verification, can_verify, signer?, files?, hints? }.

    • verification is the computed log, or null when the page has none. It has tone (ok / stale / none) and entries[], and each entry carries an index.
    • files (signers only) is [{ path, pin }]. pin: true marks the design files that get pinned by default.
    • Non-signers get a VERIFY_CONTRIBUTE hint pointing at issues and PRs.
  • POST /api/pages/<owner>/<slug>/verification adds a signed record. Body:

    • title (required)
    • status: "verified" (default) or "open"
    • scope[]
    • variants[] (empty means all)
    • checks[]: {text, result} objects, or strings with the "fail:" / "note:" prefixes
    • evidence[]: {label, href} objects, or "label=href" strings
    • files[]: defaults to the design files

    The server sets the signer and date from the account and hashes the files at HEAD. Any by in the body is ignored. It answers { ok, commit, index, entry, verification }.

  • PATCH /api/pages/<owner>/<slug>/verification/<index> with { status: "superseded" } retires a record, or closes an open item. The record stays in the log, marked with who retired it.

  • Only the page owner, org members and admins can sign. Anyone else gets a 403 with VERIFY_NOT_ALLOWED.

  • Error codes: VERIFY_BAD_RECORD (data.field), VERIFY_FILE_MISSING (data.missing), VERIFY_NOT_COMPONENT, VERIFY_RECORD_NOT_FOUND, VERIFY_LOG_INVALID. They are listed in docs/hint-codes.md.

Suggested verbs

adom-wiki page verify <ref> --title "Footprint matches the land pattern" \
    --scope footprint --scope symbol --check "0.7 x 0.7 mm pads" --check "fail: pin 12 swapped" \
    --evidence "datasheet p.12=https://..." [--variant MPN] [--file x.kicad_mod] [--open] [--json]
adom-wiki page verification <ref> [--json]          # the log: tone, records with index, file states
adom-wiki page verify <ref> --retire <index>        # status superseded

Mirror the flag names of component-widgets' tools/verify_log.py (--check prefixes, --evidence label=href) so the factory can switch with no relearning. Drop --by, --handle and --date: the server sets them. When VERIFY_NOT_ALLOWED comes back, print the hint's action (adom-wiki issue create / pr create).

1 Reply

Colby Knox ·

Shipped in adom-wiki 1.8.1.

adom-wiki page verification <ref>                  # the log: tone, records with #index, checks, each pinned file's state
adom-wiki page verify <ref> --title "Footprint matches the land pattern" \
    --scope footprint --check "0.7 x 0.7 mm pads" --check "fail: pin 12 swapped" \
    --evidence "datasheet p.12=https://..." [--variant MPN] [--file x.kicad_mod] [--open]
adom-wiki page verify <ref> --retire <index> [--note "why"]

The flags mirror verify_log.py, minus --by, --handle and --date, which the server now fills in. When --file is left out, the design files are pinned by default. VERIFY_NOT_ALLOWED relays the server's suggestion to open an issue or a PR, and the other VERIFY_* codes map to hints.

Checked end to end on a staging component page: a record was signed, an open item was added and retired with a note, a missing file and a bad index were both refused with nothing committed, and the log showed STALE after the pinned footprint changed.

Colby Knox closed this ·

Log in to reply.