Repository navigation
Conversation
…sical devices (#437) 30 failing: every flow of e2e/physical-enrollment.test.ts fails on the unknown command `device`. The scripted-device script types are added beside it so the e2e typecheck holds.
…evices (#437) 30 failing -> implementation in place; unit tests follow.
…, drivers, console (#437)
…ical in the fixtures (#437) 9 failing -> 0 failing
…ete comments that say what; docs that named the old facts (#437) 0 failing -> 0 failing
…, dispatch, routes, client (#437) 174 alive -> unit tests added for each; one guard left as equivalent
21 alive -> re-run without the branch's cached mutant results
…hrough transition; tests prove their titles; docs name the busy operations (#437)
…comments and docs true of the code (#437) Review findings: 2 test titles, 1 duplicated decision, 12 claims.
…437) Spec test added after review r2; 1 missing -> 0 missing
…lete comments that restate or misname (#437)
… words its own refusals (#437)
Contributor
Author
Review notesNot blocking, not verified. Each is one reviewer's claim.
Written by an agent. |
V3RON
marked this pull request as ready for review
October 11, 2026 09:57
2 failing -> 0 failing
This was referenced Oct 11, 2026
V3RON
added a commit
that referenced
this pull request
Oct 11, 2026
…iew; fewer pushes; Stryker failures say why (#452) From the #437 delivery (PR #449). Each change targets a class of problem, not that run's particular defects. - **CI failures reach fix runs.** Every push cancels the CI run before it, so the head's checks were always pending at the pre-round check. A real e2e failure stayed red through 4 review rounds unseen. The new `.agents/scripts/ci-failures.mjs <pr>` prints the failed tests of the newest finished run of each workflow on the branch. `deliver` runs it before every review round and fix run, and puts its failures into the fix run's `fixes`. Implementers use it for their `ci:` value. - **Audit runs the comment review.** The `comment-reviewer` brief now lives in its own definition, so the reviewer and the implementer's audit spawn it the same way. Audit deletes what it flags instead of rewording. The claims review now judges only whether a comment is true. Whether a comment should exist is the comment review's call. - **Rewritten docs and comments cite the code.** In fix mode, each fact in new text names the `path:line` that shows it. Fixes that brought in new false claims cost rounds in #436 and #437. - **Fewer pushes.** Each push runs mutation testing for minutes. Implementers now push when they need the mutant list, and once before the report. They read the whole push output. - **Stryker failures say why.** `mutate.mjs` prints the last lines of Stryker's error output at the end and exits 2. Before, it exited 1, and the hook then printed "Mutants survived". A crash on #449 couldn't be reproduced at the same commit, and its cause was lost to `| tail`. Tests: `src/ci-failures.test.ts` (new) and `src/mutate.test.ts` (one new case). Every check was probed by breaking the script.
1 task done
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.
Closes #437
Status
Implement: done (31/31 green) Review: 5 rounds, none open Mutate: 8 alive, all equivalent Hardware: n/a Gate: not run
Next: gate
Done when
pnpm test:e2e e2e/physical-enrollment.test.tspasses: with the fake driver,device addenrolls a scripted iPhone,status --jsonshows itreadyandphysical, and onedevice.enrolledis recorded.DEVICE_NOT_ENROLLABLEwith its reason, and no record is written.device addanddevice remove, over the CLI and over HTTP, answerFORBIDDEN, and the driver is never asked.device removeof areadydevice leaves itdeleted, recordsdevice.deletedwithinitiator: "operator"andphysical: true, and the driver log shows no call for it.list --devicesnever shows two non-deleted records with one canonical ID.device addanddevice removeanswerUNSUPPORTED_IN_GATEWAY_MODE, with a message to run them on the worker, and no worker is asked.PROTOCOL_VERSION_RANGEis one abovemain's when this PR merges.simlock list --deviceson a gateway, andsimlock status --jsonfrom an agent session, show an enrolled device's canonical ID asdriverDeviceId.EVENTS.mdfiles listdevice.enrolled, anddevice.deletedwithoperatorandphysical.docs/CLI.md,docs/HTTP-API.mdanddocs/CLIENT.mddocument both commands, both routes and both methods.Assumptions
device.removeanswers asid— the registry ID, asdevice.addandstatususeid;driverDeviceIdcarries the canonical ID.virtual-devicerefusal — any non-deleted virtual record on either platform whosedriverDeviceIdoraddressis the typed ID, the narrowest reading of "Simlock's own".driverDeviceIdstays off a status entry now the schema has the field —statusDeviceSchemadrops it for a non-physical device on parse, because a gateway's worker view parses fulllist.getrecords through it; this keeps the old output for every virtual device.addwhen a record exists — enrolled on the other platform, then leased, then reclaiming or a heldreclaimclaim, then another claim (busy), as the spec's step 4 lists them.DEVICE_BUSYandUNKNOWN_DEVICEmessages and of the gateway refusal — each names the ID and what to do next, the plainest text that carries the required fact.Equivalent mutants
src/contract/errors.ts, thetrueflags ofDEVICE_NOT_ENROLLABLE,DEVICE_BUSYandUNKNOWN_DEVICEin the details-declared map: type-level key set, nothing reads the value.src/core/physical-enrollment.ts, theclaim === undefinedbusy refusal inadd:#requireFreeandtryClaimrun in one synchronous step underdecisions.run, so it cannot be reached.src/core/registry.ts,error instanceof IllegalTransitioninunenrollPhysicaland inreenrollPhysical:transitionthrows nothing else.src/daemon/server.ts, theoptions.enrollment === undefinedspread: anundefinedproperty reads the same as an absent one in the dispatcher.How each Done when line was checked
Lines 1-6 and 8 by e2e flows in
e2e/physical-enrollment.test.tson the out-of-process fake driver (ande2e/gateway-*for the gateway lines); line 7 by thePROTOCOL_VERSION_UNSUPPORTEDe2e test and the version diff; line 9 bye2e/console/workers.spec.ts; lines 10-11 by the claims review of bothEVENTS.mdfiles and the three docs.Review
Spec review: 21 blocking, 11 fixed, 7 notes. Code review: 22 blocking, 6 fixed, 8 notes. Claims review: 15 blocking, 54 fixed, 8 notes. Comment review: 155 blocking, 155 fixed, 0 notes.
Mutate: 527 mutants, 8 alive.
Comment-review findings were fixed through the claims review's deletion lines. The last two claims lines (
docs/CLI.md:1809,docs/internal/COMPONENTS.md:65) were fixed in37b9a6aand not reviewed again.Rejected:
src/core/physical-enrollment.test.ts:305no test proves INTERNAL for a throwing inspection — titles now match bodies;dispatcher.test.ts:3392proves pass-throughsrc/contract/protocol.ts:16the comment no longer namesdevice.addas the reason for the bump — rule 17 forbids it; Done when 7 was changedsrc/core/quarantine-coordinator.ts:219claim held whiledevice.deletedfires — not blocking, a deleted device is never grantedsrc/core/physical-enrollment.ts:190the allowlist repeats the state machine — not blocking, nothing else can reach it todaye2e/physical-enrollment.test.ts:295title claims more than the body proves — not blocking, it is the spec's Tests line word for worde2e/fake-driver/types.ts:1-6header breaks rule 17 — not blocking, it gives the whysrc/daemon/dispatcher.ts:124test convenience as the reason — rule 17 allows a why for an optional dependencyWritten by an agent.