Skip to content

test(mock_assistant): HA testing suite — backbone, time toolkit, DataProvider, simulation engine#253

Closed
zoe-codez wants to merge 9 commits into
mainfrom
zoe/agent/ha-testing-suite
Closed

test(mock_assistant): HA testing suite — backbone, time toolkit, DataProvider, simulation engine#253
zoe-codez wants to merge 9 commits into
mainfrom
zoe/agent/ha-testing-suite

Conversation

@zoe-codez

Copy link
Copy Markdown
Member

Draft — part of a cross-repo HA testing-suite effort (hass + synapse + automation + home-automation).

What this adds (hass mock_assistant)

  • Backbone (Pillar 1): entity.register(entity_id, initialState) post-boot registration API; re-anchored on the socket→MASTER_STATE single write path; unified EMIT_SLEEP settle primitive; MockServices loopback registry.
  • Time toolkit (Pillar 2): fake-clock wrappers (set/advanceTo/advanceBy), solar anchoring, tick-based advance; UTC-literal TZ contract; upstream sliding-schedule case fixed.
  • DataProvider interface (Pillar 3, pure): observedValues / worldAt / findMoment — no native deps.
  • Simulation engine (Pillar 4): scripted scenario() timeline, seeded reproducible sim, matrix/cartesian, findMoment solver (throws on no match); chaos mode auto-registers entities.

Gates

  • vitest: 331 pass / 5 skip (live-DB specs gated).

Heads-up for reviewers

This branch is stacked on three pre-existing local commits not yet on main (color_temp_kelvin dev-type fixes + a deps/eslint-10 upgrade, calver 26.6.13). They are not part of the testing-suite work — fold/rebase as you prefer before merge.

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.18750% with 73 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.35%. Comparing base (b391d25) to head (4e54622).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/mock_assistant/helpers/solar.mts 59.35% 63 Missing ⚠️
src/mock_assistant/services/services.service.mts 14.28% 6 Missing ⚠️
src/mock_assistant/services/entity.service.mts 83.33% 2 Missing ⚠️
src/mock_assistant/services/scenario.service.mts 99.04% 1 Missing ⚠️
src/mock_assistant/services/time.service.mts 97.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #253      +/-   ##
==========================================
- Coverage   81.79%   81.35%   -0.44%     
==========================================
  Files          47       50       +3     
  Lines        1774     2092     +318     
  Branches      197      243      +46     
==========================================
+ Hits         1451     1702     +251     
- Misses        322      389      +67     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@zoe-codez zoe-codez closed this Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant