Repository navigation
Conversation
…(ADK D4(a))
GET /api/operators/:slug/status called an operator "ready" once a kernel,
a capability and a channel existed. Nothing checked that a device could
execute or that any run had produced real evidence, so an operator with
only a mock device and a self-attested setup test read as ready.
The response gains an aggregate readiness object (interface agreed with
gateway in bus #2622), and "ready" now also needs it:
- devices {registered, executable}, adapterReady: a registered machine
whose adapter the kernel can build (listRegisteredMachineAdapters), and
not the simulator or the generic-http refusal. Sensors, cameras and
adapters the kernel cannot build as machines (modbus, sila) never count.
- verifiedRun: a completed job on one of the operator's kernels whose
evidence verifies against that kernel's REGISTERED signer, using SEAM-2's
verifyDeviceSignedEvidence and registeredSignerInputFromColumns (reused,
not copied; the settlement gate is untouched). Self-attested, test-key,
gateway-placeholder, wrongly signed and unregistered-signer evidence
never counts, nor does a run that did not complete. The setup test job
cannot satisfy this today: it self-attests, or runs on the gateway's
in-process kernel with the zero-address test key (bus #3367).
- runEvidence and setupTestEvidence: evidence CLASSES, never keys,
signatures or job ids.
- payout: "not_supported" (R41); openOffers: open job offers for the
operator's capability types, or null when the offer store is absent.
The route's docstring claimed the endpoint was PUBLIC; it is not on the
api-gate allowlist, so the doc now says it needs a key (gateway, #2622:
fix the doc, not the code). Owner-only detail waits for WP-A (N2).
Examined work is bounded (10 completed runs per kernel, 10 bundles per
run) and errs toward "not ready", never toward "ready".
Tests: 29 unit tests with real Ed25519 keys (tweetnacl); the route test
goes from 7 to 18 cases (the two "ready" cases now seed a verified run;
new cases for self-attest, test key, wrong key, unregistered signer,
failed job, another operator's run, a flood of newer failed jobs,
mock-only devices, no secrets served, open offers). 10 of 10 mutants
killed. Gateway suite 3021 passed, 6 skipped; tsc clean.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 29, 2026
LamaSu
added a commit
that referenced
this pull request
Oct 3, 2026
… the run, so a mockMode or downgraded adapter never passes (N59 r3) Astra's r2 HIGH (F2): deviceIsSimulated() guessed from the adapter's class name. An OctoPrintAdapter in mockMode, an IppAdapter defaulting to mock, or an IppAdapter that downgrades to mock at runtime keeps its real-sounding name, so a simulated completion could return passed:true. Reproduced on a real KernelService (no vi.mock) at f77375d: an ipp row with no adapterConfig, an octoprint row with mockMode:true, and an ipp row with mockMode:false whose optional 'ipp' package is missing (a real downgrade). Each returned passed:true or simulated:false. deviceIsSimulated() now reads the adapter's evidence source, source.simulated. Every built-in machine adapter sets it in mock mode (OctoPrint, OPC UA, IPP, Opentrons, Hamilton, SiLA, the mocks), and IPP sets it when it downgrades. The route reads it after the run, so a downgrade during the run counts. Fail closed: an unknown device, an adapter with no evidence source, or a marker that is anything but true or false counts as simulated. The class-name guess remains only as a last fallback. The comments that overclaimed "real adapter" and "REAL device" now say what the route checks: recorded ownership and local dispatch, not physical identity (that is D4a, #428). Tests: setup-test-job-simulation.test.ts drives the real route against a real KernelService with real @pcc/kernel adapters (14 tests, written by test-writer-uniform, reviewed in the lane). 6 fail at f77375d: the three repros, and three marker unit tests (a true marker, a non-boolean marker, no evidence source). A neutral, non-simulated control adapter still passes. With setup.test.ts, 59/59; gateway tsc clean. Agent: test-writer-uniform (tests) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBTXKQ2uqtcrsUtPnQdtf8
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ADK D4(a), PX-10/R40:
GET /api/operators/:slug/statusderives readiness from canonical rows, with the interface agreed with gateway in bus #2622.The route called an operator ready once a kernel, a capability and a channel existed. Nothing checked that a device could execute or that any run had produced real evidence, so an operator with only a mock device and a self-attested setup test read as ready.
The response gains an aggregate
readinessobject, andstatus: "ready"now also depends on it.devices {registered, executable},adapterReadylistRegisteredMachineAdapters()), excluding the simulator and thegeneric-httprefusal. Sensors, cameras and adapters the kernel cannot build as machines (modbus, sila) do not count.verifiedRunverifyDeviceSignedEvidenceandregisteredSignerInputFromColumns, reused, not copied, and the settlement gate is untouched.runEvidence,setupTestEvidenceverified,invalid,unregistered-signer,unverifiable,test-key,gateway-placeholder,self-attestornone. Keys, signatures and job or bundle ids are never included.payout"not_supported"(R41).openOffersnullwhen the offer store is absent.Other changes:
Why a setup test does not count:
POST /api/setup/test-jobnever exercises the operator's machine (bus #3367). A kernel with no devices gets a self-attested bundle. Otherwise the job runs on the gateway's in-process KernelService, whose emitter signs with the zero-address test key.The work examined is bounded: 10 completed runs per kernel and 10 bundles per run. The bound errs toward "not ready", never toward "ready".
Consumers
get_operator_statustool, whose description still says "Public" and "four slots, then go live". That file belongs to aeo and feat(adk): @pcc/adk skeleton with a pinned agent package and a clean external install check (R4 D1) #411 pins its hash, so I will propose the new text to aeo instead of editing it here.Tests
onboarding-readiness.test.ts.tscis clean.Review
The owner of this route is gateway (0600b204), and gateway reviews. The PR touches evidence verification (read-only) and auth-adjacent copy, so it also needs a cross-family pack under the operator's current process.
🤖 Generated with Claude Code