Repository navigation
#2579: 0.1.2 KH4: the Capy driver passes the kit through the key helper - #2652
jparker2006 wants to merge 2 commits into
Conversation
|
First successful push: 45349f2 at 2026-11-22T23:58:37Z |
|
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.
Rulings
Facts
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>
19cf385 to
ddf4537
Compare
Review #2652 at ddf4537Reviewed #2579 against driver v1 and the current base. GitHub’s timeline shows
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. 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).
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 throughkernel/driver-kit/hostkey.pyas hostcapy. The driver sends only a method, a path and a body.CAPY_PROJECT_IDnames, 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, namingCAPY_PROJECT_ID, and never guesses. ThenPOST /api/v1/threadswith a freshrequestId, the ticket's prompt and the harness's model:anthropic/<model>forclaudeorclaude-code,openai/<model>forcodex. 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 samerequestId, and Capy turns that into the same thread.reasoningMode. When Capy rejects the model (ModelSelection.Rejected), the driver readsGET /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.GET /api/v1/threads/<id>, thenPOST /api/v1/threads/<id>/messagewithdelivery: steer. Capy unarchives a thread when it gets a message, so the driver refuses to wake an archived thread before it sends anything.POST /api/v1/threads/<id>/interrupt, thenPOST /api/v1/threads/<id>/archive. Stopping an archived thread answers again, and an unknown run is refused.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.jsonanswers the thread routes for the kit's static fake host. The kit runs withCAPY_PROJECT_IDset, so its key check'sstartneeds no project list.Evidence
Before:
adapters/capy/evidence/red-kit.txtis the kit run against the copied template:fail start: harness claude-code is not installed here, wake and stop not run, andfail token: the capy key never reached the kit's fake host. Inevidence/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.txtshows 15 of 15. For ruling 5,evidence/red-project.txtis the project test failing on45349f25, whose start ran the ticket in the user's only project although it doesn't list the repository.Self-check
git diff --name-status --find-renames origin/main...HEADprinted only the Capy adapter, its four shared edits and the covered changelog.cmp adapters/capy/schema.json kernel/driver-kit/schema.jsonprinted nothing and exited 0.python3 -I adapters/capy/test_driver.py Driver.test_effort_reaches_the_host_as_the_model_reasoning_modein a scratch copy with the assignment removed printed AssertionError at the fixture's create-body assertion becausereasoningModewas missing.python3 -I adapters/capy/test_driver.pyprinted OK, including invalid input, unsupported effort, missing project, unknown run, stopped run, host error and lost create.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 8on fake Capy withCAPY_PROJECT_ID=project_synthetic1printed all five passes, including the helper-only authorization header check.python3 -I kernel/driver-kit/test_kit.pyandpython3 -I kernel/driver-kit/test_hostkey.pyprinted OK with the Capy registry entry present.python3 -I tools/comment-check/check.py diff --base origin/mainprinted comment-check: ok andgit diff --check origin/main...HEADprinted nothing.git push origin HEAD:refs/heads/room/2579-capy-driverprinted literals: not used and passed the pre-push privacy hook. The fixture uses synthetic records and a loopback host.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
capyathttps://api.capy.aiwithauthorization-bearer. Why: Capy's API overview gives the base URL ashttps://api.capy.ai/api/v1, its OpenAPI document'sserversentry ishttps://api.capy.ai, and every request carriesAuthorization: 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.effortincanand sends the user's value unchanged asmodel.reasoningModein thePOST /api/v1/threadscreate body. Omitting effort omits that field. The driver schema matches the kernel byte for byte, and its effort refusal matcheskernel/driver.v1.mdexactly. Why: Capy'sCreateThreadRequest.model.reasoningModeis 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.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.claude/claude-codemap toanthropic/,codextoopenai/, and any other harness is refused. Why: Capy runs a model, not a harness CLI, and its model ids are<provider>/<id>. driver v1'smodelcan't hold a/. Cost if wrong: low: a wrong id is refused by Capy, and the driver names the model.CAPY_PROJECT_IDwhen it's set, else the one project that lists the repository (case-insensitive), else a D3 refusal namingCAPY_PROJECT_ID. There's no fallback to the user's only project. The spec lead ruled this. Why: Capy's create needs aprojectId, 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_IDisn't a credential (likeDEVIN_ORG_ID), and the README names it. The kit's key check runsstartagainst 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 setCAPY_PROJECT_ID: without it, token fails withstart 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.GET /api/v1/modelsis 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.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.2292b177and merged EF1 #2558: 0.1.2 EF1: driver v1's optionaleffortstart field, itscanentry and the can't-set-effort statement (the contract) #2659 at371c9cbfinbc974d99. 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
room/2579-capy-driver. Head:233cbeab653a90b12a69ed0b207552ddc28909cb. Tree:00f6e7b08e21f9f17397c55685fa26b9ba480132. Main merged throughdf714db0e44247499b5d54f7d0f41b7d0bde2a3c.adapters/capy/(new);kernel/driver-kit/hosts.json(thecapyentry only);.github/workflows/ci.yml(its one test line);tools/open-import/paths.json(its one entry);tools/release/build_products.py(capyinDRIVERS).changes/2579.md, kind: changelog line under fleet standing rule 2, for the new driver and its helper-only access inadapters/capy/.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_IDignored, 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 newrequestId, 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, atokenfield 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 missingeffortcapability or a schema that differs from the kernel copy.PATHin a private temporary directory. Each prints a refusal and exits 1. Tests used synthetic fixtures and ran withOPENWIZ_GITHUB_APP_KEYunset.evidence/red-kit.txtandevidence/red.txt, commit952f5d35, committed before the driver.evidence/red-project.txt, commitc5ec9834, committed before theCAPY_PROJECT_IDfix. After that red commit, the test also clears the fake's request log before itsCAPY_PROJECT_IDcase: the earlier refusal'sGETwas still counted. No assertion changed.evidence/red-effort.txtatbaf3002drecords 2 of 15 failing at their own assertions for the missing capability and stale schema.evidence/green.txtatd1e62d2frecords 15 of 15 passing. The earlier kernel-kit rerun had the same seven macOS-simulation failures at that head and7c89e11e, before the current main sync.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 needsCAPY_PROJECT_IDon Linux, with a model served by the Capy connection.pull_requestCI workflow passed, includingci, both release jobs, Rust, lint and owned paths. Privacy and changelog passed.KEY_CHECK_FILEScurrently carries only Devin's README and routes. To verify Capy's host key from an installed copy, the packager also needs to carry Capy's README andfixtures/kit-host.json. The fixtures and source-tree live check use the checkout.Built with Cloudroom