Skip to content

Exit codes differ from the heibench table: 2 is usage, an unreachable wiki is 1 #66

Closed

Description

@CameronBrooks11

wikisync joined heibench, whose members exit on one table:

0    satisfied / did the thing
1    violated or refused — a finding about the input
2    could not tell — NOT a finding
4    environment fault — could not run or read its input
64   usage (EX_USAGE)

wikisync's documented codes (docs/commands.md, Exit codes) differ. Measured on 459d89c (0.5.1), built with go build, run outside any working tree:

case command wikisync org table
usage wikisync --no-such-flag 2 64
wiki unreachable wikisync pull --host 127.0.0.1:9 "Main Page" 1 4
push conflict (documented, not run here) 1 1

So a caller branching on 1 cannot tell "the wiki refused this edit" from "the wiki could not be reached", and 2 means usage here but could not tell in partspec, netspec, gerberdiff and boardwright.

This is recorded as adjudication A5 at https://heibench.com/adjudications.html. Whether wikisync conforms, or the org table changes, is being decided across wikisync and zotgo together; nothing changes in a release until that decision has an entry.

Activity

  1. CameronBrooks11 commented on Nov 16, 2026

    @CameronBrooks11
    MemberAuthor

    Decided 2026-11-15: wikisync conforms to the org table; the table does not change.

    Each measured divergence is a case the table already names, so nothing here needs a new code:

    case now becomes
    unknown command or flag, and the other usage cases in docs/commands.md 2 64
    wiki unreachable or unreadable (pull --host 127.0.0.1:9 … measured 1), login failure 1 4
    push --apply or pull --watchlist without credentials 2 4
    push conflict, page skipped for local changes or a name clash, untracked title 1 1

    An unreachable wiki is the org contract's §2.2 "engine that will not start": a statement about the machine, not about the edit. Usage moving off 2 is the same change netspec made for A1. 1 keeps meaning the request was refused, as it does for boardwright.

    Two cases to settle in the change itself, read from the code rather than run:

    • push --apply where the edit lands but the stored text cannot be read back records the page as published with a warning, so it most likely exits 0. The edit is confirmed by its new revision id and only the baseline text is uncertain; decide whether that is 0 or 2.
    • pull exits 1 when no pages matched, the same code as a refused page.

    This is a breaking change for scripts, so it ships as 0.7.0 with docs/commands.md and the CHANGELOG updated in the same PR.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions