Repository navigation
Merged
Conversation
…ck component remove removes a component Simlock installed
`simlock component remove <ios|android> <version> [--dry-run] [--yes]`
removes a runtime or system image Simlock installed. It is the admin
operation `component.remove`, `removeComponent` on the admin client and
`DELETE /v1/components/{platform}/{version}`.
The installer proves the record against the listing, refuses users and
a busy platform, holds the platform's turn, and marks the component in
the decision gate so no device is provisioned on it. Each driver's
`removeComponent` re-proves, re-counts foreign devices, removes and
verifies. iOS reports the asset-store download as `residue`.
Closes #221
V3RON
added a commit
that referenced
this pull request
Oct 2, 2026
…ion's component; the dispatcher double has #234's members
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 #221
simlock component remove <ios|android> <version> [--dry-run] [--yes]removes a runtime or system image Simlock installed. The same admin operation,component.remove, isremoveComponenton the admin client andDELETE /v1/components/{platform}/{version}over HTTP. A gateway answersUNSUPPORTED_IN_GATEWAY_MODE. There are three new codes:COMPONENT_NOT_OWNED,COMPONENT_IN_USEandCOMPONENT_BUSY. One new event:component.removed.ComponentInstaller.removechecks the record against the listing, refuses users and a busy platform, and takes the platform's turn. Inside the decision gate it marks the component. Each driver'sremoveComponentgoes throughremoveListedComponent: it proves the receipt again, counts foreign devices again, removes, and checks the component is gone. On iOS it reports a download left in the asset store asresidue.Not in the spec:
DeviceProvisionerclaims each new device inside the gate throughComponentInstaller.claimProvision. A device still being created counts as in use, and a marked component refuses it withRUNTIME_MISSING.COMPONENT_BUSY.close()aborts a running removal, which answersDAEMON_STOPPING.runBoundedProcess:SIGTERM, thenSIGKILL, then wait for the process to exit.Done when
simlock catalog, with the asset-store andresidueoutcome recorded: not run, needs the maintainer's go-ahead.e2e/component-remove.test.tscovers remove, dry run, not owned, in use (a leased device and a foreign one) and the agent refusal.pnpm checkis green: 2667 unit tests and 82 fast-lane e2e tests.#213 Completion conditions
e2e/component-list.test.ts, and the dry-run case ine2e/component-remove.test.ts.simlock catalogstops listing it: fake-driver e2e. Not run on real hardware.removeComponentcall), plus installer and driver unit tests.FORBIDDEN: e2e and dispatcher test.docs/CLI.mddescribes the commands and both refusals, anddocs/EVENTS.mdlistscomponent.removed.Review
Spec review: 8 findings, 4 fixed; round 2: 5 findings, 1 fixed. Code review: 10 findings, 7 fixed; round 2: 8 findings, 7 fixed.
Rejected:
pnpm checkcannot be seen from the diff. It is green on the head commit; the counts are above.DeviceProvisioneras the only caller ofdriver.provisionandregisterDevice, and its claim is tested.COMPONENT_BUSYfor a second removal is not in the spec. A removal holds the platform's turn, so a second one cannot take it, and refusing is the safe answer.close()aborting a removal is not in the spec. Architecture rule 12 needs every exit to end in one named state, and a daemon stop ends an install the same way (ADR 0010 §3).devicesin the listing now counts devices being provisioned. A removal must see a device before it has a record, and rule 10 makes the listing and the removal use one count.simctl --set <root> runtime delete. Every scoped simctl call goes through one insertion point, enforced by a test (safety rule 8). Runtime commands ignore the device set, as the existingruntime listcall shows.RUNTIME_MISSING. No device is created, and a runtime deleted outside Simlock between resolve and provision behaves the same way.Written by an agent.