fix(reports): tolerate malformed action_log entries + populate 30-day window from daily-check#319
Merged
Merged
Conversation
… window from daily-check Two reporting-reliability fixes surfaced on a customer's Agency machine: 1. Tolerant action_log parsing (read-only Reports view). An old / hand-authored action_log entry missing a required field (`timestamp` / `platform`) made `parse_state` raise a KeyError, blanking the whole Reports document — the same class as #315 (campaign tolerance), which did not cover action_log. Add `_parse_action_log(raw, *, strict)`: writers stay strict (default), the read-only view (`strict=False`, via the #315 `_read_state_tolerant` path) skips nonconforming entries with a warning. Structural problems still raise. 2. daily-check now populates `periods["LAST_30_DAYS"]` too. The period toggle only appears once two windows have data; `YESTERDAY` was written by daily-check but `LAST_30_DAYS` only by sync-state, so a daily-check-only routine never showed the toggle. Step 13 now writes every window whose numbers it already gathered (reusing the step-4 / step-8 figures — no extra API call), so daily-check alone yields both windows. Bundled + source skill copies kept in parity. Regression tests at parse level (strict=False skips a field-less entry; strict default still raises) and dashboard level (platform totals + the conforming recent action survive a malformed action_log entry). python-reviewer: APPROVE. Claude-Session: https://claude.ai/code/session_01NxBrN8Qn53Tpivt9SumdGn
Merged
hyoshi
added a commit
that referenced
this pull request
Jun 23, 2026
Bump version across pyproject / __init__ / .claude-plugin and add the CHANGELOG entry for 0.10.12: the Reports action_log tolerance + daily-check 30-day window fixes (#319), the `mureo upgrade` post-upgrade refresh (#320), and the docs refresh (#321). Claude-Session: https://claude.ai/code/session_01NxBrN8Qn53Tpivt9SumdGn
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.
Two reporting-reliability fixes surfaced on a customer's Agency machine.
1. Tolerant action_log parsing (read-only Reports)
An old / hand-authored
action_logentry missingtimestamp/platformmadeparse_stateraise a KeyError → whole Reports document blanked. Same class as #315 (campaign tolerance), which didn't cover action_log. New_parse_action_log(raw, *, strict): writers stay strict; the read-only view (strict=False) skips nonconforming entries. Structural problems still raise.2. daily-check populates the 30-day window
The period toggle needs two windows.
YESTERDAYcame from daily-check,LAST_30_DAYSonly from sync-state — so a daily-check-only routine never showed the toggle. Step 13 now writes every window whose numbers it already gathered (no extra API call), so daily-check alone yields both. Bundled + source skill copies in parity.Regression tests at parse + dashboard level. python-reviewer: APPROVE. Targets 0.10.12.
https://claude.ai/code/session_01NxBrN8Qn53Tpivt9SumdGn