Skip to content

feat: add Sungrow observe-only FTW pilot - #3

Merged
frahlg merged 1 commit into
mainfrom
codex/sungrow-observe-only
Jul 20, 2026
Merged

frahlg merged 1 commit into
mainfrom
codex/sungrow-observe-only

Conversation

@frahlg

@frahlg frahlg commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

  • import the exact FTW Sungrow legacy source without edits
  • record original id sungrow-shx, version 1.1.0, public alias sungrow and source hash
  • derive package 1.3.2 from the exact FTW fingerprint and poll functions
  • remove every write path and control capability from the new target
  • block driver_init while the approved exact model and firmware profile list is empty
  • keep Sungrow 1.3.1 staged and unsafe for the live pilot

FTW baseline

  • repository commit: srcfl/ftw@699873d
  • source: drivers/sungrow.lua
  • SHA-256: 466a5f8637e6756fc2e1af4197d4edc1845474231413c0016f0e5900acb7b7ac
  • import status: byte exact

Candidate evidence

  • public commit: b44b5ee
  • public tree: f8aff737ceddf13e64d75fd8d1aa2db971b5b0e6
  • package: com.sourceful.driver.sungrow@1.3.2 beta
  • recipe SHA-256: b3413431b538483f1f74305e8c75131b1dcf151d84185aad2684b074a93cdc29
  • FTW artifact SHA-256: e16b392c912d90259cfd01d5e4a52c6b6b063d2f3b2720b84b5166f980459f9f
  • artifact size: 16441 bytes
  • permissions: modbus.read only
  • read_only: true
  • commands and control capabilities: none
  • target control_enabled: false

Validation

  • make check: 2514 passed, 480 skipped
  • focused package and parity tests: 20 passed
  • Lua source harness: 56 passed, 8 skipped, 0 failed
  • Lua bytecode harness: 56 passed, 8 skipped, 0 failed
  • target artifact contains no write-capable host call
  • fingerprint and poll functions match the FTW baseline byte for byte
  • git diff --check passed

Gates

  • do not sign or activate until the pilot exact model, firmware and register-map revision are reviewed
  • only FTW-tested SH-RT models are listed; SG-CX, SG-RT, SH-RS and SH-T need separate profiles
  • FTW must deny write APIs for a read-only package before install as defense in depth
  • physical telemetry parity and rollback must pass before site activation
  • all control remains blocked

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@frahlg
frahlg merged commit bbfc616 into main Jul 20, 2026
5 checks passed
@frahlg
frahlg deleted the codex/sungrow-observe-only branch July 20, 2026 18:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b44b5ee326

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +20 to +22
verified_by = { "frahlg@homelab-rpi:14d" },
verified_at = "2026-04-18",
verification_notes = "Battery control + telemetry in continuous use on homelab-rpi. Device type 0x0E0E (SH8.0RT-V112).",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove private site identity from baseline metadata

This public repo’s AGENTS.md says to never add site data, but the imported baseline now includes a verifier string with a user/host identifier and the adjacent notes name the same host. Even if the baseline is intended to stay byte-exact, publishing this operator/site identity in the repository is unnecessary for parity checks and should be redacted or moved to non-public evidence.

Useful? React with 👍 / 👎.

Comment on lines +200 to +202
mppt1_w = mppt1_w,
mppt2_w = mppt2_w,
pv_source = pv_source, -- "primary_reg" | "mppt_sum" | "zero"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep diagnostics out of PV telemetry fields

When an approved profile eventually lets this target poll, the PV DER includes mppt1_w, mppt2_w, and the string pv_source, but the repo’s runtime field contract only recognizes PV fields listed in drivers/tests/test_emit_fields.py / spec/host-api.md (w, rated power, MPPT V/A, temp, lifetime, and limits). These diagnostics are already sent through host.emit_metric, so leaving them in host.emit("pv", ...) can cause the package target to produce telemetry the FTW runtime rejects or silently drops.

Useful? React with 👍 / 👎.

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