Skip to content

docs(debug-journal): fold in eight triage findings, correct entries the fortnight's merges invalidated - #4995

Merged
springfall2008 merged 1 commit into
mainfrom
bot/debug-journal-2026-09-08
Sep 8, 2026
Merged

springfall2008 merged 1 commit into
mainfrom
bot/debug-journal-2026-09-08

Conversation

@springfall2008

Copy link
Copy Markdown
Owner

🤖 Automated /journal-update run (bot branch, not for direct merge — a human merge is the review gate on this file).

Folds the 2026-09-07/08 triage queue into tools/debug-journal.md, re-verifying every candidate against main at b8996659 (v9.0.1) first. One candidate is a rewrite because its headline claim was wrong on the tree it named.

Per candidate

  • 4645 (PR fix(inverter): auto-create charge_rate entity for script-driven "power" inverters (#3311) #4645 auto-merge over the GivTCP refactor) — folded into a new "Traps when investigating" bullet. A textually clean auto-merge can be a semantic conflict (the merged tree crashed the first Inverter() construction in two test modules, only one of them the PR's own); rest_data is gone since refactor(givtcp): move GivTCP REST handling into its own component #4864 and inverter_source_active() is the replacement question; components-consulting calls in Inverter.__init__ need a getattr guard because test components-stubs leak across modules. Verified: no rest_data reference remains in inverter.py; inverter_source_active() exists (inverter.py:76).
  • 4677 (optimise_swap_export "disabled in the live plan sequence") — rewritten. The headline claim is wrong on the commit the candidate names: at b8996659 the pass is live — the commented-out call at plan.py:4314 is the old pre-Excessive SoC Ramp Down 6hrs before cheap rate slot #4478 position, and the live call at plan.py:4349 runs deliberately last, after the plan and solar passes ("Swaps run once all other passes have settled… Running the swap before them left those pinned in place (Excessive SoC Ramp Down 6hrs before cheap rate slot #4478)"). A triage run trusting the candidate would have told a reporter the swap pass never runs. What survives is the candidate's verified secondary finding, folded in: remove_intersecting_windows() runs inside every scoring simulation (prediction.py:598), a freeze-export window's 99.0 counts as enabled and does the clipping, and the clip is shared with the kernel path — added to the GH#4914 symptom row; plus a sharpened GH#4478 bullet noting the commented-out remnant and "read optimise_all_windows() end to end".
  • 4984 (GivTCP REST rate-verify zero tolerance) — folded into the GivTCP row as fixed-but-mechanism-kept: Warn: … REST failed to setDischargeRate to <X> got <X> where got == requested is a zero verify tolerance (an inverter_limit_discharge/charge API override of 0 drove the old tolerance to 0 against a strict <), not a failed write. Verified on main: write_tolerance_watts() (givtcp_rest.py:355) now sizes both rate-write tolerances (:604, :626).
  • 4987 (Chrg↗/Exp↘ in the same slot) — folded as a new symptom row: hold-charge window clipped before an export window + the 30-min html row's split State cell — sequential, not simultaneous; the hold window is cycle-dependent (replaying the same dump later produced no charge window). The saving-session bonus is stamped on the import rate too (load_saving_slot() runs on both rate tables, fetch.py:1191/:1214) — mechanism verified by reading; the metric impact stays marked suspected, as in the candidate.
  • 4990 (both candidates) — folded together into a new symptom row: "Predbat reports a GivEnergy error but I use Solis / Fox / GE-Cloud" — inverter_type defaults to GE (inverter.py:258), component auto-config writes it only after discovery succeeds, while the component is active from instantiation — so a startup outage surfaces as "check the GivEnergy credentials" on a non-GE install. PR Name the configured inverter components when inverter_type is unset (#4990) #4992 (open) renames messages only. The two 4990 candidates overlap heavily and are merged into one entry rather than two.
  • 4992 (component health signals) — folded as a new per-integration-table row: count_errors is a lifetime counter, api_started means "run() returned truthy once" (Gateway's run() deliberately returns True while unconfigured), is_alive()/last_updated_time() are the real health accessors, record_status() writes the raw message as HA state with no 255-char truncation, and the current_status-only-survives-the-last-call test trap. All verified against the current tree (component_base.py:71/263/270, components.py:950/967, gateway.py, output.py:2628); the PR-specific bits stay out — PR Name the configured inverter components when inverter_type is unset (#4990) #4992 is still open.
  • 4989 (clock-skew warn band) — deferred, not folded. Its instruction is conditional on draft PR Warn on a moderate inverter clock skew of 5-29 minutes #4991 ("if it merges, the row should say instead…"), and Warn on a moderate inverter clock skew of 5-29 minutes #4991 is still open; the current journal text is accurate against main. The file is left in the queue un-archived on purpose so the next run re-checks it once Warn on a moderate inverter clock skew of 5-29 minutes #4991 merges — folding it now would make the journal describe behaviour main does not have.
  • 4989's sibling session-trap (git log/show denied in bot permission mode; WebFetch commit pages / raw.githubusercontent at a tag as substitutes) went to bot memory rather than the journal — it is a property of the bot's permission mode, not of the repo.

Existing entries corrected (step-3 re-check against the fortnight's merges)

Also

  • getattr added to the cspell dictionary (genuine Python builtin; the only spelling failure in the fold).
  • Pre-existing test failure noticed at the gate, not fixed here: multi_car_iog_load_slots_regression and multi_car_iog_model_limit_fetch_4967 fail when run standalone on a clean docs-only tree at 00:06–00:07 local. The fixture (tests/test_multi_car_iog.py:561) forces now_utc to 12:00 on the machine's UTC date while midnight_utc stays on the real clock, so between 23:00 UTC and midnight the forced slot falls behind local midnight and is dropped — the machine-clock fixture class the journal already warns about. All 12 pre-commit hooks pass; the failure is outside this PR's scope, and one sentence on it was added to the existing trap bullet.
  • Queue archiving: mv is denied in this session's permission mode, so the eight processed candidates are still in journal-queue/ rather than journal-queue/processed/; the next /journal-update run should re-archive them (or ignore them as already-folded).

…s the fortnight's merges invalidated

Co-Authored-By: Claude Code <noreply@anthropic.com>
@springfall2008
springfall2008 marked this pull request as ready for review September 8, 2026 07:13
Copilot AI lite review requested due to automatic review settings September 8, 2026 07:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Changes are limited to documentation and spellcheck dictionary updates, and the updates appear internally consistent with no review-blocking issues found.

Pull request overview

This PR updates Predbat’s debug/triage knowledge base by folding in recent triage findings and correcting several journal entries that were invalidated by recent merges, keeping tools/debug-journal.md aligned with current main behavior.

Changes:

  • Expanded and corrected multiple debug-journal entries (notably around optimise_swap_export reachability, GivTCP REST post-#4864 behavior, Teslemetry updates post-#4976/#4977, and the GH#4967 car-charging fix context).
  • Added new “Symptom → first place to look” rows and new investigation traps (e.g., semantic-conflict auto-merges, component-health signal pitfalls).
  • Added getattr to the CSpell custom dictionary to prevent false spelling failures.
File summaries
File Description
tools/debug-journal.md Folds in new triage findings, rewrites/corrects outdated claims, and adds new symptom + investigation-trap guidance.
.cspell/custom-dictionary-workspace.txt Adds getattr to the project dictionary to avoid spelling-tool noise.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@springfall2008
springfall2008 merged commit c325037 into main Sep 8, 2026
2 of 3 checks passed
@springfall2008
springfall2008 deleted the bot/debug-journal-2026-09-08 branch September 8, 2026 08:11
springfall2008 added a commit that referenced this pull request Sep 8, 2026
… fail for an hour a day (#4998)

multi_car_iog_load_slots_regression and multi_car_iog_model_limit_fetch_4967
failed on PR #4995's docs-only branch while passing on main. Nothing in that
PR touched code: the two tests pin now_utc to noon on the current UTC date but
leave midnight_utc on the real clock, and update_time() derives midnight_utc
from datetime.now(Europe/London). Between 23:00 and 00:00 UTC under BST the
London date is already the next day, so midnight_utc lands on the following UTC
date - after the pinned now_utc. Every IOG slot built as now+1h..now+3h then
decodes to negative minutes relative to it, decode_octopus_slot() clamps
start/end to 0, start == end returns kwh 0 and the slot is dropped, so the
tests see no charging slots. #4995's test step ran at 23:11:37 UTC.

Pin midnight_utc alongside now_utc via a shared pin_test_clock() helper, so
slot offsets are a fixed 780/840/900 minutes whatever the wall clock says.
run_multi_car_iog_adhoc_dispatch_test had the same latent hazard - in that
window its IOG slot was silently clipped away and the test only passed on the
car_charging_now fallback slot - so it uses the helper too.

The clock is now restored on the way out rather than left pinned:
restore_test_clock() in the two tests without a snapshot harness, and
midnight_utc added to snapshot_attrs in run_iog_model_limit_fetch_test.
Previously now_utc leaked out pinned while midnight_utc stayed real.

Verified by running the module under an emulation of the CI instant (00:11
Europe/London on the day after the current UTC date): 2 failures before this
change with the same error text as the CI log, 8/8 passing after, and 8/8
passing on the real clock both ways.

Co-authored-by: CI <ci@example.com>
Co-authored-by: Claude Opus 5 (1M context) <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