feat(context): canonical report-flag vocabulary + validation#428
Merged
Conversation
…ation
Add a fixed vocabulary of report-flag codes each mapped to a severity
bucket (action/watch/info/positive), and validate/normalize a report's
`flags` in mureo_state_report_set. Structured flags {code, severity,
params} keep detail in params (not the code) so the dashboard can show a
coarse, localizable chip; a `custom` code carries an author label for
novel findings. Legacy bare-string flags pass through unchanged.
This was referenced Jul 15, 2026
This was referenced Jul 15, 2026
Merged
hyoshi
added a commit
that referenced
this pull request
Jul 15, 2026
Bump 0.10.26 -> 0.10.27 (pyproject, __init__, plugin.json, 51 SKILL.md frontmatters) and cut the CHANGELOG for the report-flag changes merged since 0.10.26 (#428 / #429 / #430 / #431). Added — structured, localizable report-flag chips on the Reports dashboard: flags persisted via mureo_state_report_set can be {code, severity, params} from an 18-code vocabulary; the dashboard renders coarse, localized (en / ja), severity-coloured chips with the detail on a click-to-expand drill-down. The daily-check / weekly-report / goal-review skills author flags in this shape. Changed — mureo_state_report_set validates report flags (unknown non-custom codes rejected, severities defaulted); legacy bare-string flags still pass through.
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.
Problem
Report-flag chips on the Reports dashboard were free-form snake_case strings
with their detail baked in, e.g.
adspot_4311492_invalid_traffic_spike_115740yen_0cv_ctr4.66pct.Read as bare chips they were too detailed for an at-a-glance tag, could not be
localized (English-only in the Japanese UI), and mixed positive/informational
flags in with alarms so a coherent report read as self-contradictory.
This PR (backend contract — base of a 3-PR stack)
Introduce a canonical flag vocabulary and validate/normalize a report's
flagsat themureo_state_report_setboundary:mureo/analysis/report_flags.py—FLAG_SEVERITY(18 canonical codes →default severity),
SEVERITIES(action/watch/info/positive), andnormalize_flags().{code, severity, params}:codefrom the vocabulary,severitydefaulted from the code,paramscarrying the detail (adspot ids,yen, ctr) — so the chip stays coarse and the numbers move to a drill-down.
code: "custom"is an explicit escape hatch (author-suppliedlabel+severity) for a finding outside the vocabulary. Unknown non-custom codesare rejected.
never reaches disk).
Tests
tests/test_report_flags.py(vocabulary contract, legacy passthrough, customhatch, immutability, boundaries) + handler integration tests in
tests/test_mcp_tools_mureo_context.py. ruff/format clean, new code mypy-clean.Stack
main— backend vocabulary + validation.PR B and PR C both depend only on this PR. Merge order: merge this PR first;
the children retarget to
main(retarget before deleting this branch).