Android backends: device records and baselines name the backend that made them
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- android, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 730
- Forks
- 44
- Merge medio
- 15 h 28 min
- PR fusionados (30 d)
- 387
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstackincubator/simlock
-
bug:new
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
callstackincubator/simlock#2088 ·
Los mantenedores suelen responder en 1 día
-
bug:new
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
callstackincubator/simlock#2080 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
task:ready
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
callstackincubator/simlock#2079 ·
Los mantenedores suelen responder en 1 día
-
platform:ios task:ready
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
callstackincubator/simlock#2078 ·
Los mantenedores suelen responder en 1 día
-
iOS copy: keep the app database at the copy's own UDIDPosiblemente ocupada @V3RON la tomó hoy. Abiertoplatform:ios task:ready
callstackincubator/simlock#2077 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de callstackincubator/simlock
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
melgarafael/DeskcommCRM#5614 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
slackapi/slack-health-score#253 ·
Los mantenedores suelen responder en 1 día
-
feature needs triage site
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
owid/owid-grapher#8019 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
simstudioai/sim#10710 ·
Los mantenedores suelen responder en 1 día
-
via-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día