fix(formatters): render umbrella envelope in markdown + ai (closes #306) - #308
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Since the #195 consolidation, umbrella commands wrap sub-check output in {s, st, r:[...]}. The markdown and ai formatters never learned that shape, so every umbrella sub-check rendered empty: `context --check X --format markdown` printed "Symbol not found", and `--format ai` returned an empty items list. Affected all umbrellas, not just context. Root cause is a missing unwrap, not wrong handlers: each sub-result already carries `_check`, which maps to the correct per-command renderer. Detect the envelope and recurse per sub-result — dead-code reaches _md_dead_code, circular reaches _md_circular, etc, reusing every existing handler. Same unwrap for ai (merge items, namespace stats per check). Adds _md_tags for the new tag-audit sub-check, `flows` as an ai item source, and a last-resort summary->stats mapping so sub-checks carrying a flat `summary` (tags, diff) populate ai stats. Verified: all six umbrellas render non-empty markdown; scan (non-umbrella) unchanged; tags markdown lists flows + untagged; tags ai carries 22 flow items + summary stats. Full suite 19 failures = 19 on main. Co-Authored-By: Claude Opus 4.8 <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.



Closes #306.
Masalah
Sejak konsolidasi #195, umbrella membungkus output sub-check dalam
{s, st, r:[...]}. Formatter markdown + ai tak pernah paham shape itu → setiap umbrella render kosong:--format markdowncetak "Symbol not found",--format aikembalikanitems:[]. Lebih luas dari yang difile — semua umbrella, bukan cuma context.Fix
Akar masalahnya unwrap yang hilang, bukan handler yang salah — tiap sub-result sudah membawa
_checkyang memetakan ke renderer command yang tepat. Deteksi envelope, rekursi per sub-result: dead-code →_md_dead_code, circular →_md_circular, dst — reuse semua handler yang ada. Unwrap serupa untuk ai (merge items, namespace stats per check).Tambahan:
_md_tags(render tag-audit terbaca manusia),flowssebagai sumber item ai, dansummary→stats last-resort supaya sub-check yang bawasummarydatar (tags, diff) mengisi stats ai.Verifikasi (dijalankan)
deps circular→ "Circular Dependencies",audit dead-code→ "Dead Code Analysis",security secrets→ "Secrets Scan",impact diff→ "Registry Diff",context tags→ flow inventory penuh,context overview→ generic (bukan lagi "Symbol not found").scan(non-umbrella) tak regres → "Scan Result".tests/test_umbrella_formats.py): envelope→konten, dispatch sub ke handler-nya, envelope kosong tak crash, non-umbrella tak regres.main— nol regresi.Ini membuat output
context --check tags(fitur #307) terbaca manusia — arahan langsung Wolfvin.🤖 Generated with Claude Code