Skip to content

#2579: 0.1.2 KH4: the Capy driver passes the kit through the key helper - #2652

Open
jparker2006 wants to merge 2 commits into
mainfrom
room/2579-capy-driver
Open

jparker2006 wants to merge 2 commits into
mainfrom
room/2579-capy-driver

Conversation

@jparker2006

@jparker2006 jparker2006 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Closes #2579

Merge after #2819, the 0.1.1 cut and the live check in #2593 at the approved head. KY1 (#2395) and EF1 (#2659) are on main.

Summary

A driver v1 for Capy at adapters/capy/, copied from the template. Every call goes through kernel/driver-kit/hostkey.py as host capy. The driver sends only a method, a path and a body.

  • start: runs the ticket in the project CAPY_PROJECT_ID names, when the user set it (a project id, not a credential). Otherwise it uses the one project that lists the repository (GET /api/v1/projects). With neither, or with several listing it, it refuses with D3, naming CAPY_PROJECT_ID, and never guesses. Then POST /api/v1/threads with a fresh requestId, the ticket's prompt and the harness's model: anthropic/<model> for claude or claude-code, openai/<model> for codex. The thread id is the run id. When the create's answer is lost (429, 5xx or no answer), the driver sends it once more with the same requestId, and Capy turns that into the same thread.
  • effort: goes to Capy as the model's reasoningMode. When Capy rejects the model (ModelSelection.Rejected), the driver reads GET /api/v1/models. If the model doesn't offer the effort, it gives driver v1's exact effort refusal. Otherwise it says Capy can't run the model.
  • wake: GET /api/v1/threads/<id>, then POST /api/v1/threads/<id>/message with delivery: steer. Capy unarchives a thread when it gets a message, so the driver refuses to wake an archived thread before it sends anything.
  • stop: POST /api/v1/threads/<id>/interrupt, then POST /api/v1/threads/<id>/archive. Stopping an archived thread answers again, and an unknown run is refused.
  • The driver keeps no local state: Capy holds the run.
  • A fake Capy (fixtures/fake_capy.py, built from Capy's public OpenAPI document) plays host and agent for the kit on fixtures. Like Capy, it unarchives a thread when a message arrives.
  • fixtures/kit-host.json answers the thread routes for the kit's static fake host. The kit runs with CAPY_PROJECT_ID set, so its key check's start needs no project list.

Evidence

Before: adapters/capy/evidence/red-kit.txt is the kit run against the copied template: fail start: harness claude-code is not installed here, wake and stop not run, and fail token: the capy key never reached the kit's fake host. In evidence/red.txt, 12 of the 15 driver tests fail on the copy, each at its own assertion. The 3 that pass are guards the template already meets: version and schema, the file scan, and input shapes.
After: in evidence/green-kit.txt, the kit prints 5 of 5 on the fake Capy, its key check included: pass token: no login or token passed through the driver, and on start, wake and stop the capy key reached its host only from the key helper, in its header. evidence/green.txt shows 15 of 15. For ruling 5, evidence/red-project.txt is the project test failing on 45349f25, whose start ran the ticket in the user's only project although it doesn't list the repository.

Self-check

  • Owned paths: git diff --name-status --find-renames origin/main...HEAD printed only the Capy adapter, its four shared edits and the covered changelog.
  • Schema: cmp adapters/capy/schema.json kernel/driver-kit/schema.json printed nothing and exited 0.
  • Run creation, change undone: python3 -I adapters/capy/test_driver.py Driver.test_effort_reaches_the_host_as_the_model_reasoning_mode in a scratch copy with the assignment removed printed AssertionError at the fixture's create-body assertion because reasoningMode was missing.
  • Error handling and fail-closed guards: python3 -I adapters/capy/test_driver.py printed OK, including invalid input, unsupported effort, missing project, unknown run, stopped run, host error and lost create.
  • Fixture integration and credential containment: python3 -I kernel/driver-kit/kit.py --driver adapters/capy/driver --repo example/site --ticket 7 --harness claude-code --model claude-synthetic-1 --tracker <synthetic-tracker> --wait 8 on fake Capy with CAPY_PROJECT_ID=project_synthetic1 printed all five passes, including the helper-only authorization header check.
  • Consumers: python3 -I kernel/driver-kit/test_kit.py and python3 -I kernel/driver-kit/test_hostkey.py printed OK with the Capy registry entry present.
  • Comments and whitespace: python3 -I tools/comment-check/check.py diff --base origin/main printed comment-check: ok and git diff --check origin/main...HEAD printed nothing.
  • Privacy: git push origin HEAD:refs/heads/room/2579-capy-driver printed literals: not used and passed the pre-push privacy hook. The fixture uses synthetic records and a loopback host.
  • Local user data: n/a: the driver persists no local state. Test cleanup is limited to temporary fixture state.

Merge danger

Door: two-way. Blast radius: one driver (a new folder, plus one registry entry and one line in each of three shared files).

Rulings

  1. Register capy at https://api.capy.ai with authorization-bearer. Why: Capy's API overview gives the base URL as https://api.capy.ai/api/v1, its OpenAPI document's servers entry is https://api.capy.ai, and every request carries Authorization: Bearer. So the origin has no path, and the driver's paths start at /api/v1/. Cost if wrong: low: the live check (0.1.2 KH4L: live check: the Capy driver passes 5 of 5 #2593) shows it, and only the registry row changes.
  2. Effort: the driver lists effort in can and sends the user's value unchanged as model.reasoningMode in the POST /api/v1/threads create body. Omitting effort omits that field. The driver schema matches the kernel byte for byte, and its effort refusal matches kernel/driver.v1.md exactly. Why: Capy's CreateThreadRequest.model.reasoningMode is per run, and EF1 forbids a silent default. Cost if wrong: low: the live check (0.1.2 KH4L: live check: the Capy driver passes 5 of 5 #2593) checks the host's behavior.
  3. The ticket's open question is answered from Capy's docs: yes, a cloud thread can use the user's own subscription. A Claude Code or Codex subscription connected in Capy's Settings, Models serves the model tokens of the threads it covers, and machine time always bills Capy credits. With no subscription connected, Capy credits pay for the tokens. The README says what a run bills. The driver doesn't require that a subscription serves the model (it doesn't check the model's route), and it never passes a credential. Why: the user picks the payer in Capy's connection order, not in OpenWiz. Cost if wrong: low: it's a billing statement, checked live by 0.1.2 KH4L: live check: the Capy driver passes 5 of 5 #2593.
  4. The harness chooses the model's provider: claude/claude-code map to anthropic/, codex to openai/, and any other harness is refused. Why: Capy runs a model, not a harness CLI, and its model ids are <provider>/<id>. driver v1's model can't hold a /. Cost if wrong: low: a wrong id is refused by Capy, and the driver names the model.
  5. Project: CAPY_PROJECT_ID when it's set, else the one project that lists the repository (case-insensitive), else a D3 refusal naming CAPY_PROJECT_ID. There's no fallback to the user's only project. The spec lead ruled this. Why: Capy's create needs a projectId, driver v1 has no project field, and falling back to the only project would run a ticket in the wrong repository whenever that project doesn't list it. CAPY_PROJECT_ID isn't a credential (like DEVIN_ORG_ID), and the README names it. The kit's key check runs start against a static fake host (kit.py:755, :763) that can't list the live --repo, so the live check (0.1.2 KH4L: live check: the Capy driver passes 5 of 5 #2593) must set CAPY_PROJECT_ID: without it, token fails with start failed against the kit's fake host. Cost if wrong: low: a user whose repository is in no project, or in several, sets one variable.
  6. Capy checks the model and effort on create. GET /api/v1/models is read only after a rejection, to tell the effort refusal apart from a model refusal. Why: the kit's static fake can't list the live run's model, and Capy refuses rather than falling back. Cost if wrong: low.
  7. Wake steers (delivery: steer) a fixed follow-up ("You were woken: read the ticket again and carry on.") rather than interrupting. Why: steering lands the message at the agent's next step and cancels nothing. Cost if wrong: low.
  8. The original branch stacked on KY1 #2379: 0.1.2 KY1: the key helper, its address registry and the kit's key check (driver v1 N4) #2395 at 2292b177 and merged EF1 #2558: 0.1.2 EF1: driver v1's optional effort start field, its can entry and the can't-set-effort statement (the contract) #2659 at 371c9cbf in bc974d99. Why: the fleet start record and stacking decision authorized work before those changes landed. Both dependencies now come from main. Cost if wrong: low: the current fake-host suites and kernel schema comparison verify the merged contract.

Facts

  • Branch: room/2579-capy-driver. Head: 233cbeab653a90b12a69ed0b207552ddc28909cb. Tree: 00f6e7b08e21f9f17397c55685fa26b9ba480132. Main merged through df714db0e44247499b5d54f7d0f41b7d0bde2a3c.
  • Changed paths (owned): adapters/capy/ (new); kernel/driver-kit/hosts.json (the capy entry only); .github/workflows/ci.yml (its one test line); tools/open-import/paths.json (its one entry); tools/release/build_products.py (capy in DRIVERS).
  • Supporting edit: changes/2579.md, kind: changelog line under fleet standing rule 2, for the new driver and its helper-only access in adapters/capy/.
  • Tests: adapters/capy/test_driver.py, 15 tests, 250 lines (under the 400-line budget). Per test:
    • test_kit_passes_all_five_on_the_fake_host: catches: any of the five checks failing on fixtures, the key check included (P2, P5).
    • test_every_request_reaches_the_host_with_the_key_header_only: catches: a request sent anywhere but through the helper, or without the key header, or with the key in a path or body.
    • test_start_creates_one_thread_in_the_repository_project_on_the_harness_model: catches: the wrong project, prompt, title or model id; a provider mapped by anything but the harness; an extra request on start.
    • test_start_takes_capy_project_id_else_the_project_listing_the_repository_else_refuses: catches: a ticket run in a project that doesn't list its repository (the only-project fallback); a thread started in an arbitrary project when several list the repository; CAPY_PROJECT_ID ignored, or a malformed one sent.
    • test_start_refuses_a_harness_capy_has_no_subscription_for: catches: an unknown harness silently mapped to a default provider.
    • test_effort_reaches_the_host_as_the_model_reasoning_mode: catches: an effort dropped or renamed on its way to the host (E1).
    • test_an_effort_the_model_does_not_offer_is_the_exact_refusal_and_starts_nothing: catches: an effort that runs at a default, the wrong refusal text, or a model refusal mistaken for an effort refusal.
    • test_a_lost_create_is_retried_with_the_same_request_id_and_starts_one_thread: catches: a resent create with a new requestId, which would start a second billable run; a twice-lost create answered as success.
    • test_wake_steers_a_message_into_the_same_thread_and_its_note_is_edited: catches: a wake that posts elsewhere, interrupts, or makes a second note (D5).
    • test_stop_interrupts_then_archives_and_a_wake_after_it_is_refused: catches: a stop in the wrong order or that leaves the thread live; a wake after stop that Capy would take by unarchiving (D5, D6).
    • test_an_unknown_run_is_refused_by_wake_and_stop: catches: an unknown run answered as woken or stopped.
    • test_inputs_off_the_schema_are_refused_before_any_request: catches: inputs off driver v1's shapes taken, a token field or a path-escaping run id among them (D1, N1).
    • test_a_host_error_is_a_fixed_refusal: catches: a host error's text passed on as the driver's answer.
    • test_no_driver_file_names_the_key_or_the_keychain: catches: a driver file naming the key's variable or calling the keychain (the ticket's second criterion).
    • test_version_lists_effort_and_the_schema_is_the_kernels: catches: a missing effort capability or a schema that differs from the kernel copy.
  • Agent CLI safety: all current driver and kernel suites and the standalone kit ran with 35 refusing agent CLI stubs first on PATH in a private temporary directory. Each prints a refusal and exits 1. Tests used synthetic fixtures and ran with OPENWIZ_GITHUB_APP_KEY unset.
  • Red run: evidence/red-kit.txt and evidence/red.txt, commit 952f5d35, committed before the driver. evidence/red-project.txt, commit c5ec9834, committed before the CAPY_PROJECT_ID fix. After that red commit, the test also clears the fake's request log before its CAPY_PROJECT_ID case: the earlier refusal's GET was still counted. No assertion changed.
  • EF1 proof: evidence/red-effort.txt at baf3002d records 2 of 15 failing at their own assertions for the missing capability and stale schema. evidence/green.txt at d1e62d2f records 15 of 15 passing. The earlier kernel-kit rerun had the same seven macOS-simulation failures at that head and 7c89e11e, before the current main sync.
  • Claims: P2 on fixtures (the kit's five checks pass locally in the same driver test that CI runs). P5: the kit's key check, and no file names the variable or a keychain tool. The live 5 of 5 is 0.1.2 KH4L: live check: the Capy driver passes 5 of 5 #2593's.
  • Seams: 0.1.2 EF15: the kit's key-host effort proof counts only the run-creation request #2819 is an open blocker. The kit must count effort only in the request that creates the run. Capy already puts the value in POST /api/v1/threads, and the fixture asserts it in that request's body. 0.1.2 KH4L: live check: the Capy driver passes 5 of 5 #2593 owns the live five-check run. Its key check needs CAPY_PROJECT_ID on Linux, with a model served by the Capy connection.
  • Local results at this head: Capy 15/15, fake-host kit 5/5, kernel kit 26/26, hostkey 25/25. Product identity 25/25 and installed-runtime selection 1/1. Scope and comment check passed.
  • CI at this head: the full pull_request CI workflow passed, including ci, both release jobs, Rust, lint and owned paths. Privacy and changelog passed.
  • Gaps:

Built with Cloudroom

@jparker2006

Copy link
Copy Markdown
Member Author

First successful push: 45349f2 at 2026-11-22T23:58:37Z

@jparker2006
jparker2006 marked this pull request as ready for review November 23, 2026 08:46
@jparker2006

Copy link
Copy Markdown
Member Author

VERDICT: CHANGES at 4e2d85d

Full other-family review by Codex for #2652, ticket #2579 (KH4), spec #2575. GitHub's pull_request run 45144586957 completed successfully on this exact SHA. ci, web-test, rust, lint, both release jobs, owned-paths, privacy and changelog were green. https://github.com/openwizdev/OpenWiz/actions/runs/45144586957

Intent: add Capy as a driver v1 host that starts, wakes and stops the same ticket run through the key helper, forwards the selected effort at creation, and refuses when it cannot establish what the host did.

  • R1 [blocking] adapters/capy/driver:140 and :164–173 (Spec). Thread lookup accepts any 404 as not-found and does not validate the run identity or archived state on 2xx. An unreadable or mismatched read can be classified as stopped, unknown, or safe to act on. Fix: require a matching documented ThreadNotFound response for the unknown-run refusal. Otherwise require a successful thread read with a matching id, known status and a consistent Boolean archived state before choosing a wake or stop branch. Refuse uncertain state before any write. Add malformed and mismatched read fixtures.
    User path: an operator wakes or stops an existing run during a bad Capy response. Wake can tell them to start a new run while the first is still live, or send a message based on another thread's state. Stop can report success without issuing an interrupt or archive.
    Shows the break: the exact-head loopback probe returned exit 1 with “is stopped” on HTTP 200/null, exit 1 with “has no run” on an unrelated HTTP 404, exit 0 with woke: true after a mismatched-id GET, and exit 0 with stopped: true after a GET containing only archived: true. That last probe sent no POST and the fake run stayed active.

  • R2 [blocking] adapters/capy/driver:166 and :171–173 (Sweep). Wake and stop discard the bodies of their write acknowledgements. The helper intentionally normalizes unreadable response bodies to null, and the driver treats any 2xx as proof the operation happened. Fix: require documented admission receipts for message and interrupt, then a matching archived thread receipt for archive. An ambiguous interrupt must refuse before archive. Add fixture cases for each ambiguous acknowledgement.
    User path: an operator steers or stops a run and the control plane reports success while the message was never admitted or the run can still be working or accruing charges.
    Shows the break: HTTP 200/null from message produced exit 0 with woke: true; HTTP 200/null from both interrupt and archive produced exit 0 with stopped: true. The loopback replaced these routes and never performed the writes.

  • R3 [blocking] adapters/capy/driver:83–94 (Spec). Project discovery silently drops unrecognized rows and treats missing repository lists as empty. One usable project row in an unreadable list is insufficient evidence that the repository maps uniquely. Fix: validate the project and repository data needed for selection, including project ids, before drawing any uniqueness conclusion. Refuse a malformed list without a create request and retain the explicit project override.
    User path: an operator relies on automatic project selection, and a partial host reply can launch the ticket in a project they did not choose.
    Shows the break: a fixture returning one matching row plus null produced exit 0 and created a run.

  • R4 [blocking] adapters/capy/driver:120–137 (Sweep). Create returns any syntactically valid thread id in a 2xx response, including a thread from a different project. Fix: require a documented create response for the project sent, with a usable id and consistent thread state. On uncertain creation give the existing possible-start recovery guidance. Add a mismatched-project receipt fixture.
    User path: an operator starts a ticket and OpenWiz stores a run from a different project as its own, so subsequent wake or stop targets that run.
    Shows the break: a loopback 200 with id: jam_other and projectId: project_other produced exit 0 with run: jam_other for a create that named project_synthetic1.

  • R5 [blocking] adapters/capy/driver:97–110 and :123–129 (Spec). Capy accepts a documented reasoningMode enum, which is narrower than driver v1's effort word. The driver sends out-of-enum values and only recognizes the exact effort refusal on a ModelSelection.Rejected followed by a model listing. It also treats unreadable reasoningModes as an empty list, producing that same exact refusal without evidence. Fix: refuse known unsupported values with the exact D3 next before calling Capy and name the harness and effort in error. For a rejected supported enum value, require readable, unambiguous model metadata before stating the model cannot set the effort. Use a distinct uncertainty refusal when that evidence is missing.
    User path: an operator configures a well-formed unsupported effort and gets told to check the key or project, or sees a malformed model reply turned into advice to remove the effort and run at the default.
    Shows the break: the loopback's documented InvalidRequest shape for ultra gave generic HTTP 400 guidance; a rejection for xhigh followed by reasoningModes: null gave the exact remove-effort advice. The real Capy effort outcome is still part of live verification.

  • R6 [polish] adapters/capy/driver:90–93 (Standards). A schema-valid 201-character repository with no matching project produces a 324-character next, exceeding D3's 300-character maximum. Fix: keep the repository name in error and use a short fixed recovery instruction. Reproduced at this head with synthetic maximum-length owner and repository fields.

  • R7 [polish] adapters/capy/README.md:11 (Spec). The machine-time billing sentence says “always” and omits included machine minutes. Capy's pricing page describes credits after included minutes on cloud machines and separates machine charges from subscription tokens. Fix the billing copy to describe both accurately. https://docs.capy.ai/models-and-pricing

  • R8 [polish] adapters/capy/test_driver.py:71 and adapters/capy/README.md:23 (Standards). The documented fixture command assumes Linux /proc in teardown. Mark that command Linux-only, or make cleanup portable and prove it. This is independent of the driver README's platform claim and the Linux-only live gate.

  • R9 [polish] tools/release/build_products.py:21 and tools/release/test_package.py:140 (Standards). The checked-in runtime selection test only exercises Devin's key-check assets. It would miss deletion of the new Capy row. Extend its independent expected installed files to exercise Capy under a test-path grant if that path is touched. I added Capy's exact four tracked runtime files to that existing fixture in a scratch checkout; its package/install check passed and then failed at the archive inventory assertion when I removed just the Capy KEY_CHECK_FILES row.

  • R10 [polish] PR description, Facts and Self-check (Standards). Facts still identify head 233cbea and an older CI run and say the Capy key-check files are missing. The fail-closed self-check covers selected refusals and misses the reproduced malformed answers. Refresh the head, green run, and shipped key-check files, and narrow the self-check claim to the cases it proves. No GitHub follow-up issues were filed per the review assignment.

  • R11 [polish] adapters/capy/test_driver.py:229–239 (Standards). The test source spells the keychain entry name in its README exemption, and its scan never checks that entry name in the other files. The production driver does not name or call it. Derive the sensitive names from the reviewed host registry in the test, exempt the required README key line only, and check the entry as well as the key variable and keychain tools elsewhere in the driver folder.

Rulings

  1. Upheld. Capy's published origin and authorization form match the registry.
  2. Overturned as R5 for the effort-refusal claim. The successful create does carry the unchanged effort as model.reasoningMode. KH4 advertises effort, and the cited KH1 decision governs a different driver. The fixture tests the creation request itself, ahead of 0.1.2 EF15: the kit's key-host effort proof counts only the run-creation request #2819.
  3. Upheld for the subscription route, overturned as R7 for the blanket machine-time charge statement.
  4. Upheld. The harness selects the documented provider-prefixed model id and out-of-scope harnesses refuse.
  5. Overturned as R3 for incomplete project metadata. The explicit project, single-listing rule and refusal for zero or multiple valid matches are present.
  6. Overturned as R5. Looking up models after rejection preserves the successful fixture path, but the classification needs validated evidence.
  7. Upheld for the steer payload and same-run routing. R1/R2 cover the surrounding guards and acknowledgements.
  8. Upheld. KY1 (2292b17) and EF1 (371c9cb) are both ancestors of base df714db.

Facts

  • Live review-ticket@0.4.0 from a fresh WizSkills main clone at 648908d285235c86c7c40bec8c039edff2ba6854. Manifest verified as openwiz, with ./skills/review-ticket. OpenWiz instructions tracked at AGENTS.md blob 33bf578719c4c221d632aa72701f9af445ceac3a and docs/agents/fleet.md blob 18638834f94d6e7ce20b6e9b5da689f4fa57f5e5. Reviewed the driver contract, open-development rules and relevant review/release ADRs, the ticket/spec, and the diff from its merge base.
  • Every production host call goes through python -I kernel/driver-kit/hostkey.py with host/method/path/body. No runtime URL construction, socket or HTTP client in the driver. The key variable and keychain name occur together on the required README key line; the test also mentions the entry name in its source-scan exemption. The driver reads neither, passes no credential in its request, and lets the helper inherit the environment. The README contains the required login, storage/revocation and harness-login lines. The HTTP server is in the loopback fixture.
  • Schema comparison was byte-identical. The change adds 250 lines to test_driver.py, within the 400-line budget. The authorized changelog limits its claim to fixture proof pending the owner’s live check. Scope includes only adapters/capy/, its registry entry, CI test line, import row, DRIVERS entry, own supported changelog, and the single additionally granted KEY_CHECK_FILES row for README and kit-host.json. The exact-head commit only adds that granted row. The clause about fixtures in the packager's pre-existing comment is outside the diff.
  • 35 refusing CLI stubs first on PATH in a private mode-0700 directory. Each prints a refusal and exits 1. gh and git were not stubbed. Suites ran with OPENWIZ_GITHUB_APP_KEY unset, using synthetic credentials and the repository's fake host and harness fixtures. No agent CLI or live Capy request ran.
  • Capy driver 15/15 at this exact head, including the kit's 5/5 on the loopback fake host and its key/header check. Hostkey 25/25. Base comment checker and git diff --check passed. Read proof-first history and red receipts. Removing only reasoningMode from the create body in a scratch worktree made the exact create-body test fail at its intended assertion. Capy-expanded package/install proof passed in a scratch worktree.
  • The wider kernel kit ran 26 tests locally and reported 12 failed cases/subcases, all in its no-/proc macOS-simulation paths using the template or planted drivers. I reproduced two representative failing cases at the merge base. I did not rerun the other ten at the base. The Capy fixture run and exact-head pull_request CI passed.
  • Capy's public OpenAPI and docs corroborate the response types, origin, model setting, idempotency, archive/wake semantics and billing distinction. https://docs.capy.ai/openapi.json https://docs.capy.ai/api-reference/overview https://docs.capy.ai/threads https://docs.capy.ai/models-and-pricing

Next: the builder fixes or disputes R1–R5, then one exact-head re-check. Merge remains subject to #2819, the 0.1.1 cut and #2593's real 5/5 on Linux at an approved head. No GitHub writes, reruns or settings changes were made.

Co-authored-by: Jake Parker <jparker2006@users.noreply.github.com>
@cursor
cursor Bot force-pushed the room/2579-capy-driver branch from 19cf385 to ddf4537 Compare November 26, 2026 21:15
@jparker2006

Copy link
Copy Markdown
Member Author

Review #2652 at ddf4537

Reviewed #2579 against driver v1 and the current base. GitHub’s timeline shows cursor[bot] pushed this head on Nov 26, so I treated the reviewed revision as Grok.

  • Blocking · Spec · adapters/capy/driver:14, :165 — start rejects valid model selections such as anthropic/claude-synthetic-1 before contacting Capy. The schema it prints permits provider-qualified names and up to 100 characters (kernel/driver-kit/schema.json:101). The same fixture starts with the bare name. Accept the schema’s model syntax, retain matching Capy-qualified IDs, and add the harness prefix only to bare IDs.
  • Blocking · Reliability · adapters/capy/driver:178 — A failed retry can lose the fact that the first create may have succeeded. On the loopback host, the first request created the thread and returned 503, and the same-ID retry returned 401. The driver told the caller to start again. Doing so minted a fresh ID and left two threads running. Keep the possible-start guidance when a retry leaves the first attempt unresolved. With an explicit project and no key, the driver also replaces the helper’s setup advice with archive-and-retry guidance. Preserve the setup advice when the helper confirms the request was never sent. Capy’s idempotency contract
  • Blocking · Reliability · adapters/capy/driver:228, :243 — Overlapping wake and stop can both succeed and leave the thread working. I held the wake’s active-thread read while stop finished archiving, then let wake continue. Capy’s message behavior unarchived the same thread. Serialize the read and writes per run or use an atomic guard that prevents sending to an archived thread. Capy’s archive behavior
  • Nit · Standards · adapters/capy/driver:88 — The response checks reject harmless extra fields, although Capy evolves the API additively. Validate the fields used for decisions, including identity, state, project selection, and write receipts, while allowing unrelated additions. Capy API overview
  • Nit · Reliability · adapters/capy/driver:194 — A documented 429 with a five-second retry delay was retried after about three seconds and refused again. Honor the host’s retryAfterSeconds with a bounded retry. Capy rate limits
  • Nit · Spec · adapters/capy/driver:222 — A start with effort and an unsupported harness starts nothing and returns generic harness guidance. E1 calls for the exact effort refusal in this case.

The diff stays within the driver folder, its registry entry, and its changelog. The CI discovery and release selector cover the new driver and its installed key-check files. The schema matches byte for byte, the template-failure receipt is present, and the fixture suite passed all five kit checks, including the helper-only key check. The owner’s live check in #2593 remains open.
Exact-head CI passed. Locally, Capy passed 22 tests, the key helper passed 25, and CI discovery passed 4. The broader driver kit reported one failure in 59 tests in the macOS decoy-path simulation. That case passed when rerun on this head and on the base. Exact-head CI

VERDICT: CHANGES at ddf4537

…op lock

- start takes the schema's model syntax (up to 100 characters, provider-qualified), keeps an
  anthropic/ or openai/ id that matches the harness, prefixes only a bare one, and refuses
  the other provider before any call.
- a retry that fails after an unanswered create keeps the possible-start guidance; a start the
  key helper refused before sending keeps the helper's own setup advice.
- wake and stop of one run take turns on a per-run lock file, so a wake can't unarchive a
  thread a stop just archived.
- answers may carry fields Capy adds later; a 429 waits Capy's retryAfterSeconds (up to 30)
  before the one retry; an effort on an unsupported harness gets driver v1's effort refusal.

Red receipt: evidence/red-review-ddf4537.txt (7 new proofs fail on ddf4537); green:
evidence/green-review-ddf4537.txt (27 of 27).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0.1.2 KH4: the Capy driver passes the kit through the key helper

1 participant