Skip to content

Wave 9 #117: Repo hygiene — state field + tier rebrand - #99

Open
bernardc6 wants to merge 1 commit into
mainfrom
subagent/repo-hygiene-state-and-tier-rebrand
Open

Wave 9 #117: Repo hygiene — state field + tier rebrand#99
bernardc6 wants to merge 1 commit into
mainfrom
subagent/repo-hygiene-state-and-tier-rebrand

Conversation

@bernardc6

Copy link
Copy Markdown
Collaborator

Wave 9 #117: Repo hygiene — state field + tier rebrand

Implements the 2026-08-03 Product Build Directive's first outstanding
follow-up (memory/roamcore/2026-08-03-directive.md §"Outstanding
follow-ups aligned with directive" item #1) — standardise connection
states + rephrase the tier-letter UI to the new vocabulary (RoamCore
Certified / Community Verified / Experimental).

Two coordinated sub-changes shipped:

  1. state: field in every connections/<slug>/connection.yml
    (32 manifests) at the same YAML-indent level as tier: /
    status:, drawn from the 10 standard states in the directive
    ("Available / Detected / Ready to connect / Connecting /
    Connected / Needs information / Needs attention / Unsupported /
    Offline / Update available"). Most carries a one-line
    state_reason: plain-English explanation.

  2. User-facing tier rebrand in the three in-scope legacy
    SUPERSEDED stubs (docs/catalog/{fans,nfc-tags,remote-access}/
    index.md), the home page tier-section + chips (docs/index.md),
    and the chip CSS (docs/styles/rc.css). The YAML tier: a/b/c
    letter is preserved as the programmer-facing sort key.

The 30+ sister catalog pages that still render legacy single-letter
chips (e.g. docs/catalog/lighting/index.md) are deliberately OUT OF
SCOPE for this slice — that's a separate, larger rebrand (would
touch 20+ pages and break hundreds of cross-references).

State assignment snapshot

state count connections
Connected 10 advanced-mode, agent-actions-allowlist, demo-mode, leveling, map-dashboard, mock-location-and-tracks, mode, openclaw-api, time-atomic, timezone-geolocator
Ready to connect 20 amenities-overlay, approach-lights, bluetooth-wifi-presence, deadbolts, dns-blocker, electronic-valves, fans, happijac, heated-floors, hvac-basics, motion-based-lighting, music-assistant, nas, peplink, remote-access, smart-automations, smoke-co-gas-sensors, starlink, teltonika, water-tanks
Available 2 in-cab-tablet-dashboard, nfc-tags

(Total: 32 = all 32 connection folders.)

The "Connected" decisions are grounded in homeassistant/packages/*.yaml
contract-tile presence (verified on this host): each tier-a integration
ships its rc_* contract entities baked into the HA package so the
tile is a real HA entity, not just a YAML manifest promise.

The "Ready to connect" recipes ship the recipe.md + manifest-honesty
tests but the operator wires the upstream integration to expose the
rc_* tiles (e.g. fan / Peplink / Teltonika / Starlink).

The "Available" tier-c recipes are DIY / community inspiration —
no HACS or vendor wiring; the upstream HA core helpers form the
contract layer.

Acceptance checklist

  • Code change is minimal + additive (no rewrite of unrelated files)
  • bash scripts/check.sh --core-only is GREEN (exit 0)
  • Verification step is real (not a stub) — 8 new pytest tests
    in homeassistant/packages/tests/test_connection_state.py
    assert every connection.yml has a state: field, the value
    is one of the 10 standard states, the user-facing docs
    render the new vocabulary, the CSS supports the new chip
    classes, and no legacy single-letter chips leak into
    docs/index.md
  • User-facing doc rebrand applies to the 3 in-scope legacy
    SUPERSEDED stubs + the home page support-level section +
    the chip CSS (IKEA-style 5 steps preserved on individual
    recipe pages — those were already cleaned up in Wave 9
    Wave 9 #119c — Phase 2 canonical vehicle model dashboard generator #124)
  • Tier discipline honored (tier: a/b/c letters preserved
    for programmatic sorting; user-facing vocabulary in the
    new prose; no tier-letter chip in docs/index.md)
  • Idempotent installer / config_flow: the state: insertion
    script is idempotent (skips files that already declare
    state:); the check.sh wiring is additive (no existing
    smoke check modified)
  • No secrets in repo (manual grep; no .token / password /
    api_key / secret introduced anywhere)
  • Commit message: Context / Changes / Verification / Rollback
  • Branch subagent/repo-hygiene-state-and-tier-rebrand
    targeted from main (d3d596b); pushed to origin
  • Direct-to-main push philosophy preserved (no force-push;
    clean rebase off main); PR is open with this body

Tier discipline note

  • tier: a RoamCore Certified — RoamCore ships + maintains the
    integration code (e.g. openclaw-api custom component + map-dashboard
  • tier: b Community Verified — well-understood recipe over upstream
    HA core + HACS add-ons. Operator wires the upstream integration
    to expose the rc_* contract tiles. 27 connections are at
    tier-b today.
  • tier: c Experimental — DIY / community inspiration only. The
    upstream HA core helpers (input_boolean / input_text / input_select
    / scene / tag / automation UI) form the contract layer; no HACS
    code is required. 2 connections are at tier-c today
    (in-cab-tablet-dashboard + nfc-tags).

Doctrine (Bernard, 2026-08-04) application

  • Verification is mandatory (runtime check, not just manifest-honesty):
    8 pytest tests assert the cross-cutting invariants; previously the
    directive's 10-state list existed in prose only.
  • Idempotent installers: the Python insert script skips files that
    already declare state: so re-running produces the same end state.
  • Tier discipline: tier: a/b/c letters unchanged — only the
    user-facing vocabulary was rephrased.
  • User-facing repo hygiene: the rebrand is narrow (3 SUPERSEDED
    pages + the home page chip section + rc.css); sister catalog pages
    that still render <span class="rc-tier a">A</span> chips are
    deferred to a separate, larger rebrand slice (out of scope per
    the slice spec).

Diff stat

39 files changed, 588 insertions(+), 10 deletions(-)

Breakdown:

  • 32 connections/<slug>/connection.yml (each gains state: +
    state_reason: lines)
  • 3 legacy SUPERSEDED stub pages (docs/catalog/{fans,nfc-tags,
    remote-access}/index.md)
  • docs/index.md (home page support-level section + chip rebrand)
  • docs/styles/rc.css (chip CSS extension)
  • scripts/check.sh (new smoke check wired into the chain — additive,
    no existing smoke modified)
  • 1 NEW homeassistant/packages/tests/test_connection_state.py
    (8 new pytest tests covering the cross-cutting invariants)

Verification output

$ python3 -m pytest homeassistant/packages/tests/test_connection_state.py -v
... 8 passed in 0.49s

$ bash scripts/check.sh --core-only
[... all 30+ connection manifest honesty tests + ha-beta-smoke +
    roamcore-inventory + rclone-drive-health + victron-{checks,
    mapping-plan, rc-contract} + new state-field smoke PASS ...]
✓ all requested smoke checks passed.   (exit 0)

$ python3 scripts/build_catalog.py
[build_catalog] discovered 32 connection.yml files (0 skipped)
[build_catalog] user-facing: 27, excluded: 5
[build_catalog] wrote 27 catalog pages
[build_catalog] wrote 32-entry user-facing inventory (unchanged —
    inventory reflects YAML `tier:`, not `state:`)

Rollback

git revert 40b414b (or git reset --hard origin/main if the PR is
not yet merged). No infrastructure touched — pure repo-hygiene.


Verifier: bernardc6
Branch: subagent/repo-hygiene-state-and-tier-rebrand
Source of truth: memory/roamcore/2026-08-03-directive.md + Wave 9
unified-backlog.md row #117.

…directive outstanding follow-up #1

Context: 2026-08-03 Product Build Directive outstanding follow-up #1 + Wave 9
row #117 — every connection must carry a `state:` field with one of the 10
standard states (Available / Detected / Ready to connect / Connecting /
Connected / Needs information / Needs attention / Unsupported / Offline /
Update available), and user-facing tier chips must use the new vocabulary
(RoamCore Certified / Community Verified / Experimental) — tier letters
stay in YAML for programmatic sorting but no longer render in user-facing
docs/index.md 'Support levels' section.

Changes:
- 32 connections/<slug>/connection.yml files each gain a top-level
  `state:` field at the same YAML-indent level as `tier:` and `status:`,
  plus a one-line `state_reason:` plain-English explanation when the
  state is not 'Connected' (10 'Connected' + 20 'Ready to connect' +
  2 'Available'; idempotent — script preserves existing `state:` fields).
- docs/index.md: 'Support tiers (simple + honest)' section + 'Show only'
  chip section rebrand to the new tier vocabulary (RoamCore Certified /
  Community Verified / Experimental); legacy single-letter chips gone.
- docs/styles/rc.css: extend chip CSS with new `.rc-chip.certified`,
  `.rc-chip.verified`, `.rc-chip.experimental` classes (plus matching
  `.active` variants) + `.rc-tier.certified/.verified/.experimental`
  pill styles; legacy `.rc-chip.a/.b/.c` and `.rc-tier.a/.b/.c` classes
  kept intact for backward compatibility with sister catalog pages that
  still emit `data-tier="a|b|c"` attribute filters.
- docs/catalog/{fans,nfc-tags,remote-access}/index.md: legacy SUPERSEDED
  HTML comments rephrase "tier-b recipe connection" / "tier-c recipe
  connection" / "Support tier: B/C" prose to the new vocabulary (Community
  Verified / Experimental) while preserving the YAML `tier: b/c` letter
  reference as the programmer-facing sort key.
- homeassistant/packages/tests/test_connection_state.py: 8 new pytest
  tests covering the cross-cutting invariants — every connection.yml
  has `state:`; every `state:` is one of the 10 standard states; every
  non-Connected connection has a non-empty `state_reason:` string;
  docs/index.md renders the new tier vocabulary and emits no legacy
  single-letter chips; the 3 in-scope legacy stubs carry the new
  vocabulary in their SUPERSEDED commentary; docs/styles/rc.css exposes
  the new chip classes while keeping the legacy classes intact; no two
  connection folders collide.
- scripts/check.sh: wire test_connection_state.py into the --core-only
  chain as 'Connection state field + tier rebrand' smoke check (additive
  — does not modify any existing smoke check).

Verification:
- python3 -m pytest homeassistant/packages/tests/test_connection_state.py
  PASSES 8/8 tests in 0.52s (every connection.yml has state; every
  state is one of 10; every non-Connected has state_reason; docs render
  new vocabulary; CSS has new classes; no legacy single-letter chips
  leak into docs/index.md; no duplicate slugs).
- bash scripts/check.sh --core-only GREEN (exit 0); 30+ connection
  manifest honesty tests + new state-field smoke + ha-beta-smoke +
  roamcore-inventory + rclone-drive-health + victron-{checks, mapping-plan,
  rc-contract} all pass.
- python3 scripts/build_catalog.py discovers 32 connection.yml files
  (0 skipped); reproduces user-facing inventory unchanged (the inventory
  is a function of `tier:`, not `state:`, and YAML tier letters are
  preserved).
- YAML parses cleanly for all 32 manifests (yaml.safe_load round-trips).
- No secrets committed (test_connection_state.py + rc.css + docs/index.md
  rebrand are plaintext; connection.yml `state_reason:` fields are plain
  English only).

Rollback: git revert <sha>; `state:` fields disappear, tier rebrand
reverts, new test file removed from chain. No infra touched (no Proxmox,
no HA, no OpenWrt, no networking changes — pure repo-hygiene only). No
secrets exposed.
continue
buf.append(ln)
if "-->" in ln:
in_comment = False
bernardc6 pushed a commit that referenced this pull request Aug 5, 2026
DISCIPLINE STOP (cron: roamcore-backlog-picker, 2026-08-05 18:15 UTC):

The reverted commit (`3fb002d`) claimed to serve P1 novice-first UX
but actually violated GOLDEN.md in four ways:

1. P1 Novice-first UX — removed navigation.instant, search.highlight,
   search.suggest, TOC permalinks (degrades novice UX).
2. E1 Customer-facing repo — removed repo_url / repo_name / edit_uri,
   hiding the GitHub link from the public docs site. The docs site
   IS the public surface; users must be able to find/source the repo.
3. Directive Phase 1 (Priority #1) — removed
   extra_javascript: javascripts/catalog-filter.js, killing the
   catalog filter widget that the directive's app-store-style
   catalogue requires.
4. Tier-cue regression — stripped 75 <span class="rc-tier a/b/c">
   badges WITHOUT replacing them with the directive's new vocabulary
   ('RoamCore Certified / Community Verified / Experimental'). The
   right move is ADD the new vocabulary, not DELETE the cue.

This cron slot's standing rule ("If dirty, take ownership, then exit.
No new slice this slot.") combined with the discipline block's
DISCIPLINE STOP semantics require reverting the anti-pattern commit
before picking new work.

The right Wave 9 #117 slice is PR #99
(`subagent/repo-hygiene-state-and-tier-rebrand`, opened 2026-08-05
15:22 UTC), which:
  - ADDS the rephrased 'RoamCore Certified / Community Verified /
    Experimental' vocabulary in the SUPERSEDED comments (preserves the
    trust cue, doesn't delete it)
  - Adds the state: field to every connection.yml
  - Adds 8 pytest tests + check.sh wiring

PR #99 is OPEN, awaiting Bernard's review. This revert restores
docs/ux-first-pass to a clean state (tip = 927a018 + this revert).

Rollback: git revert 5c6b61c restores the anti-pattern commit.
Bernard-review-only: surface to @bernardc6 in next cron delivery.
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