Skip to content

Make public examples independent of the fork and validate both transports - #40

Merged
flowcool merged 2 commits into
JGAguado:V2R1from
flowcool:align/upstream-examples-ci
Oct 21, 2026
Merged

flowcool merged 2 commits into
JGAguado:V2R1from
flowcool:align/upstream-examples-ci

Conversation

@flowcool

Copy link
Copy Markdown
Collaborator

Summary

The upstream API/MQTT examples still fetch their shared packages from the fork. Point both examples and the core usage comments at JGAguado/Smart_Plant@V2R1 so the upstream repository can stand alone.

actual API/MQTT examples -> current-checkout packages -> ESPHome schema validation

Add python scripts/validate_public_examples.py to CI. It preserves the actual examples, supplies synthetic secrets in a private temporary directory, uses the public local background, and validates the PR checkout instead of a previously merged remote revision. ESPHome can fetch the existing Google Fonts. No firmware lifecycle or sensor code changes.

Evidence

  • Before: four executable package URLs and two usage-comment URLs select the fork; CI validates only standalone.
    After: all six point upstream, and both real public examples pass schema validation with ESPHome 2026.9.0. The new CI step runs the same command.
  • Negative control: an invalid static IP in a private copy of the actual API example makes this command fail.
  • All 19 inherited tests pass with no skips. YAML/Python syntax, original line endings and whitespace checks pass.
  • Synthetic credentials only. No compiler, device, NAS, broker or deployment service used. Schema validation is not firmware compilation or hardware evidence.

Merge Danger

Door: two-way. Revert this PR; no runtime state changes.

Blast Radius: examples. New users select upstream packages. Existing deployed configurations retain their own package URLs. The CI change needs the repository maintainer under CODEOWNERS.

AI assistance: Codex implemented and checked the exact source and validation. CodeRabbit is skipped on this upstream repository per Florent; no bot approval is claimed. Maintainer review remains required for .github/.

@flowcool
flowcool requested a review from JGAguado as a code owner October 21, 2026 09:19

@JGAguado JGAguado left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this closes the long-standing issue of the examples depending on the fork, and the CI hardening (contents: read, persist-credentials: false) is welcome. Approving.

@flowcool
flowcool merged commit a861d64 into JGAguado:V2R1 Oct 21, 2026
1 check passed
@flowcool
flowcool deleted the align/upstream-examples-ci branch October 21, 2026 15:20
flowcool referenced this pull request in flowcool/Smart_Plant Oct 21, 2026
…features (#34)

* feat: expose the running ESPHome version and native config hash

* feat: expose the filtered soil voltage without changing calibration

* fix: preserve raw gauge labels while clamping needles

* fix: recover the missing KiCad symbol library from schematic caches

* feat: add transport-independent low-battery protection

* fix: bound standalone display recovery and invalid rendering

* ci: add firmware tests workflow and CODEOWNERS

Run the unit tests and validate the standalone ESPHome configuration on
every PR. CODEOWNERS keeps hardware, documentation and repository
governance paths under maintainer review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: keep low-battery guide focused on user behavior

* docs: remove trailing empty line from battery guide

* fix: keep recovered KiCad symbol libraries LF on Windows

* fix: align core display recovery and support native tests without UBSan

* test: guard shared recovery parity and fresh timer budgets

* test: make battery display recorder format-security safe

* docs: keep recovery compatibility comments shared between entry points

* fix: make public examples self-contained upstream and validate both transports

* Limit test CI checkout credentials

* feat: add retained MQTT maintenance and storage modes

* test: adapt mode checks to merged soil diagnostics and portable libraries

* fix: reconcile maintenance/storage modes with the shared display recovery

Drop the globals duplicated by the #31 merge. Let the parity test accept the
multi-device extensions (fault hook, counter, logs, MQTT status) and the
per-profile sleep_after_display. Bound the flow tests by each profile's
on_display_fault delay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017fn1KdJJTY7LedVqZ7SxcA

* feat: generate generic label bands from explicit scales and inputs

* ci: install pinned label renderer dependencies for unit tests

* docs: refresh project entry points and first-install guides

* docs: provide firmware-matched label input and clarify defaults

---------

Co-authored-by: J.G.Aguado <jon.garcia.aguado@gmail.com>
Co-authored-by: J.G.Aguado <jon-garcia@hotmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants