Android backends: device records and baselines name the backend that made them
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- android, typescript
- Domaine
- backend-api-design, databases, mobile-dev
Piste de recherche
Start with the cited modules in src/core/ and src/leasing/, then read the example tests in src/core/registry-component-records.test.ts, src/core/component-installer-remove.test.ts and src/core/startup-converger.test.ts. The change spans stored records, protocol, capacity, leasing and startup behavior, with dependencies on several other issues. Done means the listed behavior cases pass, the protocol bump check passes, and the website documents spec.backend.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Part of #2041.
Scope
Every Android virtual device and baseline records the backend that made it (avd for every one today), and core and leasing respect it: a spec of one backend never matches another's device, the RAM budget, component in-use checks and the provision claim go by backend, and a device whose backend is not running is left alone by startup, reclaim, quarantine, the health monitor and doctor. Only the avd backend exists, so nothing a user does changes; status, lease and list show spec.backend on Android virtual devices.
If it goes wrong, an upgraded worker loses or mislabels its devices and baselines, or a device is quarantined and stranded where it should have waited.
Technical spec
Commit b037ae2a0.
Rows
- Behaviours: B1, B4, B9, B20, B24, B26, B38
- Stored state: S1, S2
- Interfaces: I1, I5, I11, I12, I14, I17
- Existing code: X2, X3, X4, X5, X8, X9, X10, X11, X12, X13, X15, X16, X17, X18, X53, X54, X55, X56, X57
Facts
| # | Fact | Source |
|---|---|---|
| F1 | The protocol range is { min: 110, max: 110 } today; I5 adds spec.backend to the device view, a contract shape |
src/contract/protocol.ts:13 |
| F2 | origin/main moved from the design's commit 447cc5bbc to b037ae2a0; only src/ports/process-runner.test.ts changed under src/ and e2e/, so the parent's citations hold |
git diff --stat 447cc5bbc b037ae2a0 -- src e2e |
Modules touched
src/core/registry-schema.ts, src/core/baselines-schema.ts, src/core/registry-rows.ts, src/core/domain.ts, src/core/driver.ts, src/core/component-installer.ts, src/core/capacity/devices.ts, src/core/capacity/strategies/resource/index.ts, src/core/create-core.ts, src/core/startup-converger.ts, src/core/startup-read.ts, src/core/reclaim-coordinator.ts, src/core/quarantine-coordinator.ts, src/core/doctor.ts, src/leasing/lease-reconciler.ts, src/leasing/lease-health-monitor.ts, src/contract/device-schemas.ts, src/contract/status-schemas.ts, src/contract/protocol.ts, src/core/driver-catalog.ts (I1), src/core/capacity/strategies/index.ts (createCapacityStrategy, :47), src/core/fake-driver.ts, src/leasing/acquisition-spec-resolver.ts and src/core/warm-pool/converger.ts, learned.ts (X57), src/drivers/android/ (records and components name avd), src/drivers/ios/index.ts, components.ts, runtime-images.ts (componentFootprint as a function, serves, I12), e2e/fake-driver/fake-driver.ts. Searches: the parent's Existing code searches, plus rg "componentFootprint|isReadable\(" src e2e.
Rules in play
- ADR 0102 §2 (a device record and a baseline name their backend) and the not-running rule: Accepted — not yet implemented; the parent's rows hold the shapes.
- ADR 0036:
registryandbaselinestables change only through their owners' next migration (S1, S2:+1). - ADR 0061 §2 and §4: a used virtual device is never granted again; baselines keep their versions; the backend joins the spec, not the version.
- ADR 0010:
ComponentInstallerstays the only caller of install and remove; in-use matching moves to what a component serves (I12). src/core/AGENTS.md"Unreadable is not gone": extended from a platform to a backend (I14, I17).src/contract/AGENTS.mdprotocol rule: I5 bumps the protocol by one in this PR.
Tests
Seam: each row's Seam cell in #2041; model on src/core/registry-component-records.test.ts, src/core/component-installer-remove.test.ts and src/core/startup-converger.test.ts.
- B1: A daemon starts on a
state.dbfrom before this feature: every Android virtual device row and Android baseline gets backendavd, and leases, devices and baselines go on as before.: android virtual row →avd; android physical row → none; ios rows → none; android baseline →avd; ios baseline → none; a database already at the new version is unchanged - B4: Devices of two backends never share a pool: a ready device of one backend is never granted for a spec of another.: same model, OS and tag, different backend → not the same spec; same backend → same; both without backend (iOS) → same; Android
baselineSpec, warm-pool newest version and learned kind →backend: "avd"(X57) - B9:
status,leaseandlistshow a virtual device's backend in its spec (I5).: Android virtual device →spec.backend; iOS device → no field; phone → no field - B20: A device of a backend with its own RAM figure counts that figure against the RAM budget; every other device counts its platform's (I11).: backend in the map → its figure; a backend skipped at start and started on a retry → its own figure (the map holds it from start); backend not in the map → platform figure; no backend → platform figure; slim iOS unchanged
- B24: A backend the platform driver reports unreadable (I14) leaves its devices alone: startup ends none of their leases, resumes none of their reclaims, deletes none of them and re-arms none of their quarantines (B38), the health monitor skips them that tick, and doctor reports no drift for them. Devices of the other backends are judged as usual.: device of the unreadable backend → wait / skipped / no finding; its
reclaiming, spentshutdownorquarantineddevice at start → untouched, no driver call; device of another backend missing → missing as today; no backend unreadable → as today - B26: A component's in-use count, its removal's block on new devices and the provision claim match devices by the backend and API level the component serves (I12), not by its version string.: remove
redroid-34with a Redroid API-34 device →COMPONENT_IN_USE; the same with only an emulator API-34 device → removed; remove emulator34with only a Redroid API-34 device → removed; a Redroid provision during aredroid-34removal →ComponentBeingRemovedError; an emulator provision during it → goes on; a component with no footprint → no disk reservation - B38: Core leaves a device of a backend not running alone: a lease-end reclaim meeting
BackendNotRunningError(I17) leaves itreclaiming, no quarantine, no event; a quarantine retry meeting it waitshealth.probeIntervalMs, uncounted, as for an absent phone (src/core/quarantine-coordinator.ts:222); startup's four steps skip it (StartupRead.isDeviceReadable, I17). It keeps its capacity slot.: lease ends, shutdown throws it →reclaiming, nodevice.quarantined; destroy throws it after shutdown →shutdown, kept; quarantined device, retry throws it → attempts unchanged, re-armed, never stranded; any other error → quarantine as today; startup with the backend unreadable → none of the four steps calls the driver; capacity counts the device;core.resumeBackend(platform, backend)→ the four steps for that backend's devices only: lease ended during the outage → reclaimed,deleted; quarantined → retried, attempts as before; another backend's → untouched; a second call → nothing more
Done when
pnpm test:changedandpnpm typecheckpass; each Tests line above is a case table in one test.node .agents/scripts/protocol-bump-check.mjspasses:PROTOCOL_VERSION_RANGEis one abovemain's in this PR (I5).- A
state.dbfrommainopens: the migration test of B1 loads a fixture written by today's schema and findsavdon Android virtual rows and baselines only. - The website names
spec.backend(documentation rule 9):website/src/content/docs/docs/getting-started/first-lease.mdx, after the lease JSON at:55(an iOS spec, which gains no field), says an Android virtual device's spec carriesbackend. - No slow-lane test: the emulator path is unchanged, and the fast e2e suite (
pnpm test:e2e) still passes on the fake driver.
Out of scope
Several backends, routing and the merged catalog (#2050), the Redroid backend (#2051), Redroid components and doctor checks (#2052).
Depends on
- #1905 because:
PROTOCOL_VERSION_RANGE(src/contract/protocol.ts); its PR #1976 bumps it and is ready first - #1904 because:
PROTOCOL_VERSION_RANGE; PR #1972 bumps it - #1154 because:
src/core/create-core.tsandPROTOCOL_VERSION_RANGE; PR #2016 - #1155 because:
PROTOCOL_VERSION_RANGE; PR #2028 - #1907 because:
PROTOCOL_VERSION_RANGE - #2005 because:
PROTOCOL_VERSION_RANGE - #2006 because:
PROTOCOL_VERSION_RANGE - #2045 because:
PROTOCOL_VERSION_RANGE - #2043 because:
src/core/startup-converger.ts,src/leasing/lease-health-monitor.tsand the converger's ports atsrc/core/create-core.ts:423 - #2044 because:
src/drivers/ios/index.ts - #2046 because:
src/drivers/ios/index.ts
Written by an agent.
- Langage dominant
- TypeScript
- Étoiles
- 730
- Forks
- 44
- Merge moyen
- 15 h 28 min
- PR mergées (30 j)
- 387
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de callstackincubator/simlock
-
bug:new
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
callstackincubator/simlock#2088 ·
Les mainteneurs répondent en général sous 1 jour
-
bug:new
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
callstackincubator/simlock#2080 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
task:ready
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
callstackincubator/simlock#2079 ·
Les mainteneurs répondent en général sous 1 jour
-
platform:ios task:ready
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 18/100
callstackincubator/simlock#2078 ·
Les mainteneurs répondent en général sous 1 jour
-
iOS copy: keep the app database at the copy's own UDIDPeut-être pris @V3RON l’a pris aujourd’hui. Ouverteplatform:ios task:ready
callstackincubator/simlock#2077 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de callstackincubator/simlock
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
earendil-works/gondolin#222 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
endora-commerce/endora-commerce#2203 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement priority:medium ready-for-human
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
wondermoney/wondermoney#1079 ·
Les mainteneurs répondent en général sous 1 jour