Skip to content

Kane Factory: dispatch worker CLI for attest.ticket/v0 (Claude Code leads) #90

Closed

Description

@sykosyber

Leader: Claude Code / sykosyber (issues + comments on this thread are the source of truth). Reason sessions must re-read comments before each turn.

Contract: https://github.com/SyberLabs/attest/issues/11

SyberWork is the vendor-neutral middle of the Kane Factory: a company plugs in its own agents and harnesses. Attest calls one worker command per failing spec claim; that command should be SyberWork.

Time lock lifted — draft PRs and land when green. Demo may use Attest’s built-in OpenAI worker until this lands; do not rush a partial PR into a live demo window.

Deliverable

A runnable examples/attest_dispatch.py (building on #89):

  1. Read an attest.ticket/v0 JSON from stdin.
  2. Admit it as a case and record an unverified observation (reuse Add thin Attest receipt observation CLI #89's observation shape).
  3. Authority check: reject (non-zero exit, reason on stderr) if the schema is wrong, app.files is empty, or app.root is missing.
  4. Dispatch to the worker configured in examples/fixtures/workers.example.json:
    • {"default": {"type": "openai", "model": "gpt-5-mini"}}: OpenAI Responses API. Prefer structured output of complete file contents, then build the unified diff with difflib (hand-written diffs failed twice on Attest). Paths a/<file>, b/<file> relative to app.root. No prose, no fence, not *** Begin Patch.
    • {"type": "command", "cmd": "..."}: run any other harness with the ticket on stdin. Offline acceptance uses this path (no API key required).
  5. Print only the diff on stdout; everything else on stderr.

Acceptance

  • Offline tests with a fake command worker: valid ticket -> diff on stdout; malformed ticket -> non-zero exit; stdout contains nothing but the diff.
  • README snippet: ATTEST_WORKER_CMD="python <abs path>/examples/attest_dispatch.py" attest prove demo/spec.md --app demo/app --loop
  • Comment on this issue with the PR link and the exact command when it works. Attest will run it against the live Acme CRM demo.

Do not change SyberLabs/attest from this issue’s workstream unless Claude opens a separate Attest change.

Activity

  1. sykosyber commented on Oct 24, 2026

    @sykosyber
    MemberAuthor

    Status from Attest (16:15 PDT): the full loop now runs live with Attest's built-in OpenAI worker (Kane found the gap, OpenAI implemented it, Kane proved it). One lesson for your OpenAI worker type: asking the model for a hand-written unified diff failed twice (it copied JSON-escaped quotes into context lines and padded seed data). Attest's built-in worker now uses structured output returning complete file contents and builds the diff with difflib; doing the same in dispatch will save you the debugging. Contract unchanged: ticket JSON on stdin, unified diff on stdout. Deadline for a working dispatch remains 16:40 PDT.

  2. sykosyber commented on Oct 24, 2026

    @sykosyber
    MemberAuthor

    Status check 16:32 PDT: no dispatch PR yet. If it is not runnable by 16:40, Attest records the demo with its built-in OpenAI worker (same ticket contract), and this issue continues after the submission; please do not rush a partial PR into the demo window. When it lands, comment the exact ATTEST_WORKER_CMD and Attest will run the Acme CRM spec through it live.

  3. changed the title [-]Kane Factory: dispatch worker CLI for attest.ticket/v0 (due 16:40 PDT)[/-] [+]Kane Factory: dispatch worker CLI for attest.ticket/v0 (Claude Code leads)[/+] on Oct 24, 2026
  4. sykosyber commented on Oct 24, 2026

    @sykosyber
    MemberAuthor

    Herd (~16:33 PDT): Reason was mid-dispatch (c8ebb9e8) but stalled on OpenAI secrets instead of shipping the offline command worker. Steered that session + started a parallel session 9c1bb4df to open the draft PR and comment ATTEST_WORKER_CMD here. Claude Code remains leader on this issue.

  5. reason-machines commented on Oct 24, 2026

    @reason-machines
    Contributor

    Draft PR: #92

    The offline command-worker acceptance tests pass. Exact command:

    ATTEST_WORKER_CMD="python <abs path>/examples/attest_dispatch.py" attest prove demo/spec.md --app demo/app --loop
  6. reason-machines commented on Oct 24, 2026

    @reason-machines
    Contributor

    Update: the live OpenAI Responses API smoke test with the configured gpt-5-mini worker passed using a synthetic ticket; structured file contents became a valid Git-format diff and stdout contained only that diff. This was not an Acme CRM run.

    Draft PR: #92

    Exact command:

    ATTEST_WORKER_CMD="python <abs path>/examples/attest_dispatch.py" attest prove demo/spec.md --app demo/app --loop
  7. added a commit that references this issue on Oct 26, 2026
    e2e6408
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