Universal Tuya docsHomeSupported devicesRequest a deviceFAQChangelogArchitectureKnowledge baseCreditsSourcesContributing

Platform limits (P3026)

Every limit this project can hit, where it comes from, what we measure on each branch and how much room is left. Measured on 25/10/2026 (Paris time) with scripts/ci/platform-budget-gate.js, which reads config/platform-limits.json. Text in our own words; sources linked, not copied.

How to read it. "self" = a ceiling we set ourselves from past Athom outcomes (Athom documents no number for these). "hard" = a published platform limit. The gate warns at 80 % and fails at 90 % of each limit (the combos cap has its own 99 % / above-cap rule, see below). It runs in report mode (never fails CI); switch "mode": "block" in config/platform-limits.json once the report has stayed green for a week on all three branches.

Run it: node scripts/ci/platform-budget-gate.js [--publish-dir <prepared dir>] [--online] [--json]. CI: .github/workflows/platform-budget.yml (read-only: builds and prepares in RUNNER_TEMP, never uploads to Athom, never pushes; per-ref concurrency with cancel-in-progress).

1. Athom upload (prepared payload, scripts/prepare-publish.js output)

LimitKindValuemasterstable-v5bastien-home
Uploaded app.json (compact)self4 MiB3.09 (77 %)2.75 (69 %)0.48 (12 %)
Uncompressed payloadself50 MiB31.36 (63 %)37.30 (75 %)21.56 (43 %) — was 21.8
Gzip archiveself20 MiB (warn 10)9.22 (46 %)15.87 (79 %)5.63 (28 %) — was 5.83
Zigbee manufacturerName × productIdselfHOMEY_ZIGBEE_MAX_TOTAL_COMBOS (15500 live, 14000 fallback)15470 (99.8 %)15498 (100 %)4044 (26 %)
Drivers in the uploadinfo—34734127

2. Homey runtime memory

LimitKindValuemasterstable-v5bastien-home
Boot heap, every module loaded (scripts/perf/boot-heap.js)self45 MB (P3023 "elevated")33.9 (75 %)35.4 (79 %)36.3 (81 %)
Boot + every lazy data file parsed at onceself45 MB39.4 (88 %)40.9 (91 %)41.8 (93 %)

3. GitHub Actions, repository, API

LimitKindValueMeasuredUse
Workflow file sizehard500 KBlargest 48.6 KB10 %
Concurrent jobs (Free plan)hard20 (5 macOS)—concurrency groups + path filters
Job / workflow run durationhard6 h / 35 days——
Matrix jobshard256——
Actions cache per repohard10 GB (LRU eviction)10.66 GB, 341 entries107 %
Cache upload / download ratehard200 / 1500 per min——
GITHUB_TOKEN REST quotahard1000 req/h per repo (PAT 5000/h)0.7 % used—
Repository sizesoft1 GB advised, 5 GB strongly~0.9 GB18 % of 5 GB, ~84 % of 1 GB
Single tracked filehard100 MiB (warn 50)12.1 MB12 %

Sources: docs.github.com/en/actions/reference/limits, GitHub REST rate-limit docs, GitHub repository-size docs. The repo is public, so standard-runner minutes and artifact storage are free.

Actions cache: cause and fix

Automatic storage cleanup (P3033)

.github/workflows/storage-cleanup.yml runs every day at 03:30 UTC on master (scheduled workflows only run from the default branch, and the cache API covers every branch of the repo, so one copy is enough; stable-v5 and bastien-home do not get one). Manual runs take dry_run (default on) and max_deletions. Rules live in scripts/ci/storage-cleanup.js:

ObjectDeleted whenNever deleted
Cachean older entry of the same family on the same ref exists (family = key minus trailing hash / run id / version)the newest entry of each family on master, stable-v5, bastien-home
Cacheits branch is gone or its PR is closed (refs/pull/N/merge)when the branch/PR list could not be read, this rule is skipped
Cachethe newest entry of a non-state family was not used for 7 daysthe newest entry of a state cache found in the workflows (run_id keys such as gmail-diag-state, resolver-state, diag-ledger-queue, quirks-db, xr-*; names with state/baseline/ledger/queue)
Artifactolder than 14 daysthe newest artifact of a name another run downloads later (forum-poll, sanitized-diagnostics-report, digest-leads-*)

The state and cross-run lists are read from the workflow files and .github/actions/*/action.yml on each run, so a new state cache is protected without editing the script. Calls go through .github/scripts/retry-helper.js (403/429 waits, 5xx backoff), pages are capped at 40 and deletions at 400 per kind per run (largest first). The job summary gives counts and sizes before, after and deleted, and a warning annotation fires when the cache is still at 80 % or more of gha_cache_gb in config/platform-limits.json. It never fails and blocks nothing. Kill switch: vars.STORAGE_CLEANUP_DISABLED; vars.STORAGE_CLEANUP_DRY turns the schedule into a dry run. Stale bot/* PRs and branches are not touched here; repo-autopilot.yml (P3022) already does that.

First real run (2026-10-25 02:40 Paris): 220 caches / 1.19 GB and 251 artifacts / 12.1 MB deleted, 0 errors. Caches went from 240 / 1.50 GB to 20 / 309 MB (3.1 % of the quota): one newest entry per family on master (18), stable-v5 (1) and bastien-home (1). The biggest kept families are the cross-research state caches of master (xr-master-*, up to ~85 MB each). Known side effect: jobs on one ref that restore npm caches with two different lockfile hashes (the jobs that check out another branch) keep only the newest hash, so the other one downloads again on its next run. That costs time, not correctness.

Other CI changes

4. Not done, and why

Tests

test/critical/p3026-platform-budget.test.js (limits config, thresholds, combos rule, live cap, report mode, npm cache key, rate-limit wait) and test/critical/p3026-driver-images.test.js (PNG signature and Homey sizes for every driver image). test/critical/p3033-storage-cleanup.test.js covers the cleanup rules (families, protected refs, state caches, gone refs, cap, artifact age, workflow parsing, quota threshold).

← Knowledge base index · source