Repository navigation
docs(debug-journal): fold in eight triage findings, correct entries the fortnight's merges invalidated - #4995
Merged
Merged
Conversation
…s the fortnight's merges invalidated Co-Authored-By: Claude Code <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 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_exportreachability, 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
getattrto 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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated
/journal-updaterun (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 againstmainatb8996659(v9.0.1) first. One candidate is a rewrite because its headline claim was wrong on the tree it named.Per candidate
Inverter()construction in two test modules, only one of them the PR's own);rest_datais gone since refactor(givtcp): move GivTCP REST handling into its own component #4864 andinverter_source_active()is the replacement question; components-consulting calls inInverter.__init__need agetattrguard because test components-stubs leak across modules. Verified: norest_datareference remains ininverter.py;inverter_source_active()exists (inverter.py:76).optimise_swap_export"disabled in the live plan sequence") — rewritten. The headline claim is wrong on the commit the candidate names: atb8996659the pass is live — the commented-out call atplan.py:4314is the old pre-Excessive SoC Ramp Down 6hrs before cheap rate slot #4478 position, and the live call atplan.py:4349runs 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 "readoptimise_all_windows()end to end".Warn: … REST failed to setDischargeRate to <X> got <X>where got == requested is a zero verify tolerance (aninverter_limit_discharge/chargeAPI 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).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.inverter_typedefaults toGE(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.count_errorsis a lifetime counter,api_startedmeans "run() returned truthy once" (Gateway'srun()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 thecurrent_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.Existing entries corrected (step-3 re-check against the fortnight's merges)
4a045e07) landed the model-facingcar_charging_limit_model; withoctopus_intelligent_consider_fulloff (default) IOG-slot cars get an uncapped model limit, the real limit is untouched, both engines read the same attribute, andupdate_car_manual_soc()caps the manual SoC write-back. The old "consider_full never reaches predict() at all" and "nothing asserts the switch's effect" claims are no longer true; the clamp-duplication and by-reference notes are kept for pre-fix(octopus): honour octopus_intelligent_consider_full in the prediction #4971 logs. Flagged the changed interaction with the unfixed GH#4952 Ohme overestimate.teslemetry_tbc_control, a signal-tariff TBC mode (build_signal_tariff(),evaluate_schedule_tbc(),_settable_reserve()rounds an 81-99% request up to 100), so the row's "a slow charge ramp is Tesla firmware, not a Predbat write bug" now holds only for the default reserve-driven mode; Teslemetry: an export window ending at midnight priced the whole of the next day at peak #4977 fixed a midnight-ending export window pricing all of tomorrow at peak.Also
getattradded to the cspell dictionary (genuine Python builtin; the only spelling failure in the fold).multi_car_iog_load_slots_regressionandmulti_car_iog_model_limit_fetch_4967fail when run standalone on a clean docs-only tree at 00:06–00:07 local. The fixture (tests/test_multi_car_iog.py:561) forcesnow_utcto 12:00 on the machine's UTC date whilemidnight_utcstays 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.mvis denied in this session's permission mode, so the eight processed candidates are still injournal-queue/rather thanjournal-queue/processed/; the next/journal-updaterun should re-archive them (or ignore them as already-folded).