Repository navigation
Description
Part of #1644.
Scope
A worker operator sets ios.slim.include and ios.slim.exclude in the worker config: slim simulators keep the named services running or turn them off, beside the categories, and a name taken out of both lists goes back on at the next prepare. This is the whole feature.
If it goes wrong, an operator sees a service that should run stay off (push, StoreKit, log stream), or a slim worker grant full devices.
Technical spec
Commit 1cd9315.
Rows
- Behaviours: B1, B2, B3, B4, B5, B6
- Stored state: S1, S2
- Interfaces: I1, I2, I3, I4
- Existing code: X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11
Facts
| # | Fact | Source |
|---|---|---|
| F1 | On iOS 26.4 (23E254a), an iPhone 17 in a private device set with com.apple.diagnosticd written true in disabled.plist before its first boot finished bootstatus -b, print-disabled system listed "com.apple.diagnosticd" => disabled, and no RuntimeRoot/usr/libexec/diagnosticd process ran; with the file removed and a reboot it ran. |
run on 2026-11-17: xcrun simctl --set <scratch> spawn <udid> launchctl print-disabled system and ps -axo pid,command | grep "RuntimeRoot.*diagnosticd" |
| F2 | com.apple.apsd is a label of the store category. |
src/drivers/ios/slim-labels.ts:107-112 |
| F3 | Module checks already run on the merged config, and both the daemon and the CLI pass the driver entries to the config load, so a driver check runs for daemon start and config set alike. |
src/core/config.ts:206, src/daemon/main.ts:243, src/cli/environment.ts:233-238 |
| F4 | copyOverrides returns early when the source has no disabled.plist, so a clone of a seed starts with no overrides folder. |
src/drivers/ios/slim-boot.ts:131-139 |
| F5 | The slow-lane slim test drives a real daemon with an ios config and reads back print-disabled. |
e2e/slow-ios-slim.test.ts:185-200 |
Modules touched
Searches: rg -n "overridesFor|writeOverrides|copyOverrides|resolveSlimCategories|DriverConfigEntry|runModuleChecks|iosDriverConfig" src e2e.
src/drivers/ios/(definition.ts,slim-labels.ts,slim-boot.ts,AGENTS.md)src/core/(config-types.ts,config-role-checks.ts,config.ts)src/drivers/ios/test-slim.ts(FaultyFilesystemfails onlydisabled.plistwrites,:143-148; it must be able to fail the record write too) andsrc/drivers/ios/index-slim-mode.test.ts(itsfilesystem.writeschecks at:172,:396,:429,:564hold for a config without the keys, since S2 writes no empty record)e2e/slow-ios-slim.test.tswebsite/src/content/docs/docs/reference/configuration.mdx,website/src/content/docs/docs/using-devices/choosing-a-device.mdxdocs/internal/EVENTS.md
Rules in play
- ADR 0083 (all sections): the lists, the precedence, the readback, when a device is slim, the record.
- ADR 0060 §1–§4: the file write stays a merge, atomic,
0644, folder0700; the readback table is unchanged for every label; destroy removes the whole folder. - ADR 0066 §2:
--exceptkeeps its strict failures for kept categories only;includenames never join them. docs/internal/agent-rules/documentation.mdrule 9: the configuration reference and the slim guide change in the same PR.- Drivers manual: a driver imports only core and ports; the new
checkis on core'sDriverConfigEntry.
Tests
The seams are configFromLayers (model on src/drivers/ios/definition.test.ts) and IosSimctlDriver.makeReady with fake simctl and filesystem (model on src/drivers/ios/slim-except.test.ts and src/drivers/ios/index-slim-mode.test.ts).
- B1: an operator loads a worker config with
include/exclude: both set; an empty list; a duplicate; a name in both (fails, names it);includein the file and the same name inexcludein the overrides layer (fails); a string instead of a list; an empty string;config get ios.slimshows both - B2: a slim prepare writes each managed label:
includeof a slimmed category →false;excludein no category →true;excludeof a never-disable label →true;--exceptcategory with one label inexclude→false; an unmanaged line kept; a recorded name in neither list →falseand the record rewritten; no record → empty, no log; an unreadable record → empty, logged; a failed record write counts as a failed write; an unchanged record is not written; a copy gets its source's record - B3: the readback grants I2's mode: all as written →
slimanddevice.slimmedcounting theexcludelabel;excluderead enabled →full;includeread disabled with no--except→full, no throw; readback fails →slim;categories: []+exclude→slim; nothing off →full, no event; no categories and noexclude→full, skipped as today - B4: a lease with
--excepton such a worker: kept label read disabled →KeptCategoriesError;excludelabel read enabled →full, no throw - B5: the configuration reference lists
ios.slim.includeandios.slim.exclude(src/core/config-reference.test.ts) - B6: slow lane, real simulator:
categories: [],exclude: ["com.apple.diagnosticd"]→slim, nodiagnosticdprocess;include: ["com.apple.apsd"], categories unset → readback showsapsdnot disabled and every other category label disabled
Done when
pnpm test:changedpasses, with the B1–B5 cases above.- The website build and its HTTP API check pass (
definition.tschanges). - On a Mac with a real simulator, the B6 cases pass in
e2e/slow-ios-slim.test.ts, run throughscripts/slow-e2e.sh e2e/slow-ios-slim.test.ts. src/drivers/ios/AGENTS.mdstates the precedence, the record and the old-baseline gap; the configuration reference says thatcategoriesandexcludeturn services off andincludekeeps them running.
Out of scope
- Service names on a lease (
--exceptstays categories-only). - Catalog, gateway routing or protocol changes.
- Checking that a name is a real service.
- Baselines saved before this ships (no record).
Depends on
Written by an agent.
Activity
test: a slim prepare writes each managed label by the precedence of t…
feat(ios): a slim prepare records the named services it wrote (#1650)
test: a recorded name in neither list is written back on and the reco…
feat(ios): a recorded name no list holds any more goes back on at the…
feat(ios): a recorded name no list holds any more goes back on at the…
test: a provisioned copy gets its source's record of named services w…
feat(ios): a copy of a simulator gets its source's record of named se…
test: the readback grants the mode of the named services and a lease …
test: a worker config loads include and exclude lists and refuses a n…
feat(ios): a worker config takes include and exclude lists of slim se…
5 remaining items
fix(ios): a name dropped from both lists is written back on even when…
fix(ios): a worker with no label written off is full, and an unconfig…
fix(ios): an unconfigured slim skip keeps the write error, and the ma…
refactor(ios): split the slim write and readback into smaller steps (#…
V3RON commentedon Nov 17, 2026
Handoff
Done: PR #1655 (
task/1650, stacked on ADR PR #1646, stack #1656) buildsios.slim.includeandios.slim.exclude. Review passed: round 1, round 2, and fix-checks at 5a0d833 and 5d9cfc6. Six blocking findings, all fixed. ADR PR #1646 passed review too. Both PRs are ready.Not done: the slow-lane Done when line (B6 in
e2e/slow-ios-slim.test.ts) and the feature's two real-simulator Completion conditions. The gate has not run, so nothing is merged. CI was still running on 5d9cfc6, the commit that fixed Fallow's CRAP findings.Findings: none open. The ledger and notes are on #1655.
Blocked on: the slow lane refused this machine because it has 10.2 GiB of free disk and needs 15. The maintainer can run
scripts/slow-e2e.sh e2e/slow-ios-slim.test.tson a Mac with room, or re-run/deliver 1644there. The stack then merges throughmerge-pr.sh 1655after the ADR flip to Accepted.Written by an agent.
fix(test): the slim include and exclude slow test runs both configs o…
docs(adr): accept 0083 (#1650)
fix(docs): the ADR index lists 0083 once (#1650)
docs(adr): propose 0083, a worker may turn single slim services on or…