Skip to content

docs(debug-journal): recover the stalled backlog and correct five entries - #4980

Merged
springfall2008 merged 2 commits into
mainfrom
bot/debug-journal-2026-09-07
Sep 7, 2026
Merged

docs(debug-journal): recover the stalled backlog and correct five entries#4980
springfall2008 merged 2 commits into
mainfrom
bot/debug-journal-2026-09-07

Conversation

@springfall2008

@springfall2008 springfall2008 commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Recovers the debug-journal backlog that the flush could not land. Rebased onto main now that #4979 has merged, so the diff is a single file: tools/debug-journal.md.

This is the work the 2026-09-06 18:20 and 2026-09-07 00:00 runs did and then discarded: both verified their candidates in full, hit the .claude/ write block, explained themselves and exited 0. Every claim below has been re-verified against main at f0cb3f0d, not carried over on trust.

Folded in

GH#4967 — the consider_full clamp has a twin in the C++ kernel. Extends the car-charging row with the three things the issue does not mention: the clamp is duplicated verbatim at prediction.py:799 and prediction_kernel.cpp:827 (fix one and the plans diverge), octopus_intelligent_consider_full never reaches predict() at all, and car_charging_limit is held by reference and read by execute.py for a real control decision — so a fix must assign a separate model-facing value, not mutate it. Also records the fix-order dependency: that clamp is currently the only thing bounding GH#4952's overestimate.

GH#4975 — new symptom row for "low power mode does nothing". The PV-overlap guard in find_charge_rate() uses a fixed 0.1 kWh threshold (const.py:83), not one scaled to system size, and the GH#4577 dawn split only protects the pre-dawn part of a window — so a window lying entirely in daylight can never engage low power. That is by design (PR #4373), which makes this class of report an enhancement rather than a defect. Worth having as a row because it is a repeat: GH#3311, #4557, #4699, #4975.

GH#4965 — new trap, and the second half is the useful one. The test_control_ledger.py stub trap is minor. The finding worth keeping is that the harness cannot reproduce the crash the issue describes: the clock-skew read sits behind if "discharge_start_time" in self.base.args:, which the mock inverter never satisfies, so an attribute-deletion reproduction passes whether or not the bug is fixed. Verified by stashing the fix and re-running the suite. Assert the guard is present instead.

(Note: the candidate located this behind if self.discharge_enable_time:. That gate closes two lines earlier; the real one is the args check. The observation held, the explanation did not — corrected before folding.)

Rewritten rather than folded

GH#4973 claimed gh search issues was silently dead on the runner. Re-probing dissolved the premise: the search worked, and the "must-hit" query missed because the run had silently corrected a typo in the issue title while retyping it. Folding the original claim would have told future runs to distrust a working tool. The salvageable half — treat an empty duplicate-search result with the same suspicion as a confident one — went into the existing bullet.

Existing entries corrected

Entry Invalidated by Change
Octopus row, GH#4946 PR #4957 Fixed; dispatch_billed_off_peak() prices completed dispatches off-peak regardless of location
Fox row, GH#4939 PR #4962 The half the reporter actually hit was event routing on a literal predbat prefix. The zero-caller set_battery_charging_time() half is still live
Carbon row, half (a) PR #4958 Fixed; one ISO8601 call built in UTC
Carbon row, half (b) Narrowed: the zero-scoring is still in the code, carbon_replicate() only reduces how many minutes reach it
GivTCP row PR #4864, #4959 The inverter.py:1435 citation had drifted onto unrelated code after REST handling moved to givtcp_rest.py
Two-scans trap PR #4943 Both halves fixed; was written in present tense as if still live

Fixed entries keep their mechanism rather than being deleted — a reader holding an older log still needs it.

Nothing dropped

All four candidates produced something. Also checked and found already current: the GE Cloud row (corrected in #4969), Sigenergy #4926, Solis #4875/#4923, the memory row, and the still-unmerged Solis guards.

Second commit: a sweep of the run logs

The user asked for the bot's logs to be reviewed for anything that never reached the queue. Three more findings, all verified against main:

  • Ohme row, GH#4952 (still live). slot_list() derives energy as watts * hours (ohme.py:124) while the observed 16A→10A→6A taper shows watts is a per-slot cap — 2.55x over on the reporter's data. Ohme publishes estimatedSoc, which would give the true delta, and ohme.py never reads it. The same slots publish as AT_HOME dispatches with no source (ohme.py:670), so the whole plug-in-to-target block is stamped at the low rate. Cross-referenced to the car-charging row, because the predict() clamp is currently the only thing bounding it.
  • Octopus row, GH#4950 (fixed, PR fix(octopus): don't replenish the IO low-rate slot cap mid-window at midday #4951). The low-rate slot budget was keyed on the loop minute rather than the slot start, so a noon-straddling window drew a fresh budget at midday. It had no entry at all, and "a cheap slot at an hour Octopus never offered" now has three distinct documented causes in that row.
  • New trap: midnight_utc is local midnight, and now_utc is local time. Both names are wrong in the same direction — update_time() sets now_utc_real = datetime.now(self.local_tz) (predbat.py:654). This already sent one PR review hunting for a timezone frame mismatch that does not exist.

Deliberately not folded in: PR #4957's review flagged "three unshared copies of the dispatch predicate". The merge it reviewed has since addressed that — dispatch_billed_off_peak() is a shared helper and the one remaining plain location test carries an explicit #4946 cross-reference. Folding it would have added a stale warning to the file.

Note on spelling

The GH#4973 entry needs to talk about a typo in an issue title. I reworded around it rather than adding a misspelling to .cspell/custom-dictionary-workspace.txt — the dictionary is for real vendor terms.

run_pre_commit: clean.

🤖 Generated with Claude Code

Base automatically changed from fix/journal-flow-permissions to main September 7, 2026 07:20
@springfall2008
springfall2008 marked this pull request as ready for review September 7, 2026 07:20
Copilot AI lite review requested due to automatic review settings September 7, 2026 07:20
…ries

The first flush since the journal became writable again. Four candidates that the
2026-09-06 and 2026-09-07 runs verified but could not land, plus the corrections those
runs found while re-reading the file against what has merged since.

Folded in:

- GH#4967 - the `octopus_intelligent_consider_full` clamp is duplicated in
  prediction_kernel.cpp, `car_charging_limit` is held by reference, and the clamp is
  currently the only bound on GH#4952's overestimate. Extends the car-charging row.
- GH#4975 - new symptom row for "low power mode does nothing": the PV-overlap guard is
  a fixed 0.1 kWh threshold and midday windows are expected to fail it, so these are
  enhancement reports rather than defects.
- GH#4965 - new trap. The interesting half is that the harness cannot reproduce the
  crash the issue describes, so a guard-presence assertion is the only honest
  regression test.

Rewritten rather than folded:

- GH#4973 claimed `gh search issues` was dead on the runner. Re-probing dissolved the
  premise - the run had silently corrected a typo in the issue title it searched for.
  The salvageable lesson went into the existing duplicate-search bullet.

Corrected:

- Octopus row: GH#4946 fixed by PR #4957 (`dispatch_billed_off_peak()`)
- Fox row: the half of GH#4939 the reporter actually hit was event routing, fixed by
  PR #4962; the zero-caller `set_battery_charging_time()` half is still live
- Carbon row: half (a) fixed by PR #4958; half (b) narrowed to what is still true
- GivTCP row: PR #4864 moved REST handling out, so the `inverter.py:1435` citation had
  drifted onto unrelated code
- Two-scans trap: both halves fixed by PR #4943, was written in present tense

Every claim above was re-verified against main at f0cb3f0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@springfall2008
springfall2008 force-pushed the bot/debug-journal-2026-09-07 branch from 6e3c3cf to 3423c71 Compare September 7, 2026 07:21

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.

🔵 Needs a closer look

journal_pr_opened() can crash the daemon on invalid/non-JSON gh output because json.loads() isn’t guarded, undermining the intended “fail closed and preserve the queue” behavior.

Pull request overview

This PR recovers and corrects the triage debug-journal backlog, and hardens the /journal-update flush so verified findings aren’t silently lost when the run can’t actually write/open its PR. It also updates internal agent/skill docs to reference the new journal location.

Changes:

  • Move the debug journal reference to tools/debug-journal.md and update the daemon + skill/docs pointers accordingly.
  • Gate queue archiving on a PR existing for today’s journal branch (protects against “blocked but exit 0” flushes).
  • Fold in multiple debug-journal corrections/additions (Octopus, Fox, Carbon, GivTCP, low-power charging symptom row, etc.) and add tests covering the new flush semantics.
File summaries
File Description
tools/triage_daemon.py Moves journal path and changes flush semantics to archive only after a PR exists (adds journal_pr_opened() and passes today).
tools/test_triage_daemon.py Updates/extends tests for new journal path constraint and “archive only if PR exists” behavior.
tools/debug-journal.md Recovers backlog and corrects multiple entries; adds new symptom/trap notes and marks fixed items as fixed while keeping mechanism.
CLAUDE.md Updates debug-journal path reference.
AGENTS.md Updates debug-journal path reference.
.claude/skills/journal-update/SKILL.md Updates maintained journal path and git add instructions for the new location.
.claude/skills/issue-triage/SKILL.md Updates links to the debug journal.
.claude/skills/issue-triage-followup/SKILL.md Updates links to the debug journal.
.claude/skills/issue-pr/SKILL.md Updates links to the debug journal.
Review details
  • Files reviewed: 1/1 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.

A sweep of the triage bot's logs for findings that never reached the queue.

- Ohme row, GH#4952 (still live): `slot_list()` derives energy as `watts * hours`
  while the observed amperage taper shows `watts` is a per-slot cap - 2.55x over on
  the reporter's data - and the `estimatedSoc` field that would give the true delta is
  never read. The same slots publish as AT_HOME dispatches with no source, so the whole
  block is stamped at the low rate. Cross-referenced to the car-charging row's
  fix-order note, since the predict() clamp is currently the only bound on it.
- Octopus row, GH#4950 (fixed, PR #4951): the low-rate slot budget was keyed on the
  loop minute rather than the slot start, so a noon-straddling window drew a fresh
  budget at midday. Had no entry at all.
- New trap: `midnight_utc` is local midnight and `now_utc` is local time. Both names
  are wrong in the same direction, and it already sent one review hunting for a
  timezone frame mismatch that does not exist.

Deliberately not folded in: PR #4957's "three unshared copies of the dispatch
predicate" finding, which the merge it reviewed has since addressed -
`dispatch_billed_off_peak()` is now a shared helper and the one remaining plain
location test carries an explicit #4946 cross-reference.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@springfall2008
springfall2008 merged commit 292f920 into main Sep 7, 2026
2 checks passed
@springfall2008
springfall2008 deleted the bot/debug-journal-2026-09-07 branch September 7, 2026 09:58
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