Universal Tuya docsHomeSupported devicesRequest a deviceFAQChangelogArchitectureKnowledge baseCreditsSourcesContributing

Automation coverage without AI (P3048)

Everything the Grok Bot Homey routines do is also done by GitHub Actions, deterministically, with no AI, no assistant and no paid service. The Grok Bot routines stay as a complement (judgement, wording of public replies, chat). Optional AI or Firecrawl layers only run when their secret is set (secrets.X != '') and never block a job.

Free and AI-free, step by step

NeedFree means usedNever used
GitHub data (runs, logs, issues, commits, artifacts)GITHUB_TOKEN of the run, polite client scripts/automation/gh.cjs (250 ms pause, waits on 429 / x-ratelimit-reset)PAT for read, paid API
Forum watchpublic Discourse JSON (/latest.json, /t/<id>.json) and /raw/<topic>/<post>, incremental pointers (data/leads/forum-lastseen.json, image-ocr-cursor.json)login, posting
ScreenshotsTesseract eng+fra (Ubuntu apt tesseract-ocr tesseract-ocr-fra), sha256 hash cache data/leads/ocr-hash-cache.json (labels only, no OCR text, bounded to 20 000 entries)cloud OCR, vision models
Upstream sourcesraw.githubusercontent.com, shallow / sparse clones (Z2M, ZHA, deCONZ, Blakadder, tuya-local)scraping services (Firecrawl is optional)
Computefree GitHub-hosted minutes of a public repositoryself-hosted or paid runners
Classification, decoders, couplesregexes and literal patterns in the repo, exact couples from a source onlyLLM calls, invented couples

Routine → workflow map

Grok Bot routine (Paris time)GitHub Actions equivalent (UTC cron)Notes
Shared notebook homey/routines-context.md (72 h read, dedup key, one line per run)data/progress/automation-journal.jsonl + scripts/automation/journal.cjs72 h window, dedup by key and status, rotation above 2 000 lines into data/progress/archive/automation-journal-YYYY-MM.jsonl, merge=union, [skip ci] commits via safe-auto-commit.js in the automation-journal concurrency group
Homey CI et PRs (≈ 16:00)ci-autofix.yml (on workflow_run), automation-loop.yml (05:10), dependabot-auto-merge.yml, existing repo-autopilot.ymlsee "CI autofix" below
CI health in the digestautomation-loop.yml → docs/progress/DIGEST.mdflaky workflows, repeated signatures, combo margins
Weekday morning digest (≈ 08:30)existing daily-digest.yml (06:16 / 07:16 UTC) + docs/progress/DIGEST.md from automation-loop.ymlno mail, no post
Forum watch (≈ 10:30)existing forum-poll.yml (every 4 h), now Tesseract eng+fra + hash cacheposting stays out of CI
Enrichment loop (≈ 11:00), lead promotion (≈ 14:00)existing market-couples-intake.yml, peer-complementary-enrich.yml, fleet-intelligent-enrich.yml, auto-enrich-closed-loop.ymlexact couples only, apply-safe tiers, provisional leads stay provisional
Monday upstream watch (≈ 07:00)existing blakadder-fetch.yml, market-couples-intake.yml (Z2M/ZHA), oss-lan-source-enrich.yml and kb-refresh.yml (tuya-local), johan-thread-intel.ymlincremental, Firecrawl optional
Bases de connaissances (≈ 06:20)existing homey-knowledge-refresh.yml, kb-refresh.yml
Gmail diags (≈ 12:00)existing fetch-diags.yml, gmail-diagnostics.yml (CI secrets; AI providers optional)
Homey réponses (anti-flood)scripts/automation/reply-candidates.cjs in automation-loop.yml → data/progress/reply-candidates.jsoncandidates only, never posted by CI
Athom publish watch.github/scripts/athom-publish-policy.js (P3036 + P3048) in every upload pathCI never triggers an upload
Self-maintenance (t539u)automation-loop.yml (self-maintain, watchdog), existing storage-cleanup.yml (caches / artifacts), Dependabotsee below

CI autofix (deterministic)

ci-autofix.yml listens to the non-publish CI workflows (Node 22 tests, Homey App Validate, Syntax Check, Unified CI/CD, Validate Homey App, Platform Budget). On a failed first attempt ci-failure.cjs handle:

Mechanical fixes stay with the existing scripts (repo-autopilot.yml, safe-auto-commit.js gates); no new code-writing automation was added.

Athom upload policy in code (master)

Kept from P3036 / P3042: green CI on the SHA (or a code-identical ancestor), at most 1 successful upload per 24 h, one lock, no upload while a build is processing, 1 retry on a transient error, breaker on a real error, stateMeta, bisect mode only while athom-bisect-state.json says running.

New in P3048: at least 120 min after the last upload of ANY of the 3 apps for master (crossAppMinIntervalMin, env override ATHOM_CROSS_APP_MIN_INTERVAL_MIN). The master gate refreshes the stable and bastien build snapshots read-only. The hold is deferred, so the existing self-heal slot retries later; a manual force_publish dispatch stays the only override. The automation never starts an upload.

Public replies: anti-flood limits

CI never posts, comments, reacts or mails. reply-candidates.cjs lists an issue only when a commit pushed to master in the last 60 days references it, CI on that commit is green, the thread is open, active in the last 60 days, and the last message is neither from dlnraja nor from a bot; an issue listed in the last 14 days is not listed again. Limits for whoever replies (the Grok Bot routine "Homey réponses"):

Digest docs/progress/DIGEST.md

Versions of master / stable-v5 / bastien-home, last known Athom outcome and P3036 gate state, failed runs of the last 72 h, reply candidates, health over 7 days: workflows rescued by a re-run (flaky), repeated failure signatures, margin under 17 000 combos in total and 1 008 per driver measured on the published payload (artifact platform-budget-report of platform-budget.yml → data/status/package-combos.json), raw source combos marked as indicative only, live caps of auto-publish-on-push.yml, watchdog findings.

Self-maintenance (t539u)

Guards: no cron more often than hourly, [skip ci] commits, concurrency groups, safe-auto-commit.js loop guard and daily cap, ci-autofix ignores re-run attempts and its own completions.

Known limits

Branches (stable-v5, bastien-home)

GitHub runs schedule and workflow_run triggers from the default branch only, so automation-loop.yml, ci-autofix.yml and the forum OCR step stay on master. They still cover the port branches: the loop fetches stable-v5 and bastien-home (depth 1) for the digest, and the watchdog and CI failure collector read runs of every branch through the API. The port branches get the byte-identical athom-publish-policy.js (hash checked by test/critical/p3036-athom-publish-policy.test.js), the gate action, the scripts in scripts/automation/, data/automation/failure-patterns.json, the platform-budget report artifact, the journal merge=union rule and the p3048-* tests, so a manual workflow_dispatch on a branch uses the same code.

← Knowledge base index · source