Skip to content

fix(legend): compact --zoom, --tree, churn-decay and map rows carried twelve attributes with no definition - #189

Merged
joyful-ii-V-I merged 1 commit into
mainfrom
fix/compact-remaining-terms
Sep 12, 2026
Merged

fix(legend): compact --zoom, --tree, churn-decay and map rows carried twelve attributes with no definition#189
joyful-ii-V-I merged 1 commit into
mainfrom
fix/compact-remaining-terms

Conversation

@joyful-ii-V-I

Copy link
Copy Markdown
Collaborator

Follows #185. --legend=compact strips the legend prose and rebuilds definitions from kCompactCompletenessTerms. Twelve more attributes got nothing back, so compact answers printed them with no definition. Each was confirmed on main by running it:

attribute where it appears how it is defined now
files= --tree root in the root's purpose line (it appears on every answer), next to files_unlisted=
symbols=, isolated=, top_modules=, levels_shown= --zoom root in the root's purpose line, next to levels=
children= <module> at the depth cut (--zoom-levels) a term printed only when present, qualified to <module>
<recent of=>, <rc age_d= w=> churn-decay map a present-only term qualified to <recent>, because of= on the map root is --around's seed
lpin=, overloads=, prov= map rows present-only row terms; each has one meaning across the tool

Gate

test/compactlegendcheck.sh gains three kinds of arm:

  • (D13)–(D16): six rows covering the twelve attributes, all red on main. For example: FAIL (D13) --zoom (its root's counts): symbols="14" is carried but the compact legend never defines it.
  • (D17): a present-only mirror that also checks the element qualification. When a reading was spliced into four real compact legends, it fired on all four.
  • (S), fourth population: every row field that serialize.h's always-on legend marks as absent by default. On main it is red on lpin=, overloads= and prov=. Under each of three mutations it goes red on exactly the mutated name.

Result: main has 87 PASS / 15 FAIL, this branch has 94 PASS / 0 FAIL, and all 86 existing rows stay green.

Bytes

  • Pins: none moved. The (L) loop stays at 4,089 B against its 4,100 B pin. --zoom goes from 324 to 394 B and --tree from 219 to 238 B, both under 400.
  • Everything else: 93 of the 96 (U) answers are byte-identical, and the three that changed have identical payloads.
  • Over the nominal size: four unpinned answers that carry these attributes now exceed 400 B (423–632 B).

Still undefined under compact

These need a decision about the byte pins, so they are not in this PR:

Verification

  • gates=12 pass=12 skip=0 fail=0.
  • limits_build --check and gatecount_build --check both return 0.
  • Output is deterministic and xmllint is clean.
  • --quality-delta reports gating=0.

🤖 Generated with Claude Code

… files=, children=, prov= and nine more with no definition

6ea3c0f closed the map header and the PageRank roots, and its agent listed four instances it did not fix. Each was
RUN here on 3c89ac0: carried under --legend=compact, defined by the full legend, silent in the compact one.

CONFIRMED, by running:
  --tree            files= on the root (full legend: "files= is the indexed corpus")
  --zoom            symbols= isolated= top_modules= levels_shown= on the root; children= on a <module> AT the
                    levels_shown= cut (test/chafix at --zoom-levels=1)
  churn-decay       <recent of=> with <rc age_d= w=>, single-root rank_by=churn-decay
  --communities     drill= isolated= on the root. NOT FIXED, see below
FOUND BY SWEEPING those answers: lpin= and overloads= on <s>, prov= on <c>. The always-on `<!-- ripwire v1` legend defines
them absent at their default, and compact strips it. test/declinefix and test/lpinfix, (D10)'s own corpora, carry them.
NOT THIS DEFECT: --communities' modules=/bridges=/isolated_*=/symbols=, which its full legend never defines either.

THE FIX, src/compactlegend.h only. --tree's files= and --zoom's four root counts ride every answer of their root, so they
read in that root's purpose line, beside the files_unlisted= and levels= it already named. Five present-only terms:
children= (onTag module), <recent> (onTag recent, because of= on the map root is --around's seed), and lpin=, overloads=,
prov= (row-level: one meaning tool-wide, one XML writer).

GATE, test/compactlegendcheck.sh (no new file):
  (D13)..(D16) 6 behavioural rows, 12 specs: --tree, --zoom, --zoom --zoom-levels=1 over test/chafix,
  --rank-by=churn-decay, and the declinefix and lpinfix maps. RED on 3c89ac0, 12 FAIL lines, for example:
    FAIL (D13) --zoom (its root's counts): symbols="14" is carried but the compact legend never defines it
    FAIL (D14) --zoom --zoom-levels=1 over test/chafix (modules AT the depth cut): children="2" is carried but ...
    FAIL (D15) --rank-by=churn-decay (the <recent> file rows): of="6" is carried but the compact legend never defines it
    FAIL (D16) the map over test/declinefix (merged overloads, split edges): prov="split" is carried but ...
  (D17) the mirror over --around (its <r of=>), --rank-by=churn, a one-level --zoom, the plain map and --communities
  (isolated=/symbols= on its own root), each lack asserted first. Green on both binaries by construction. With a reading
  spliced into four real compact legends its check fired on all four, and on none unspliced.
  (S) gains population 4, read from source: every unprefixed row field of serialize.h's always-on legend marked
  absent-if-N or absent=, whose term must read the payload. RED on 3c89ac0: lpin=, overloads=, prov= FAILed. On the fix,
  deleting the prov row, making overloads head-only, or making lpin header-only each went red on exactly that name.
  compactlegendcheck with this gate: 87 PASS, 15 FAIL on 3c89ac0; 94 PASS (86 before, all still green), 0 FAIL, 1 INFO
  on the fix.

BYTES, compact prose. No ceiling or pin moved:
  (L) ten-verb loop 4,089 -> 4,089 B (pin 4,100)
  (U) --zoom 324 -> 394   --zoom=3 324 -> 394   --tree 219 -> 238   (pin 400); every other (U) probe unchanged
  Differential over the (U) universe, same fixture and git dates: 93 of 96 compact answers byte-identical; the three
  that moved keep byte-identical payloads.
  Unpinned, over the nominal 400: churn-decay map 376 -> 496, declinefix map 446 -> 632, lpinfix map 391 -> 559,
  chafix --zoom --zoom-levels=1 285 -> 423.

NOT FIXED, stopped on bytes:
  --communities' drill= and isolated=: 385 B of compact prose. The shortest honest pair, "drill= takes an id=; isolated=
  edgeless symbols", costs 49 B (434 B); even "drill=/isolated=: id= verb/edgeless" costs 37 B (422 B). Over (U)'s 400.
  --community=0's modules= and partition= (the sibling drill verb, same defect): 371 B + 43..57 B = 414..428 B.

QUALITY: --quality-delta against HEAD exits 0, gating=0, with two minor short-horizon-churn findings on
kCompactCompletenessTerms and kCompactLegendSpecs (both touched by #185 earlier today).

Gates: compactlegendcheck legendcoveragecheck graphlegendbudgetcheck legendcostcheck estchargecheck communitydrillcheck
communitylabelcheck zoomcheck treecheck churndecaycheck printffmtparitycheck xmlwellformed,
gates=12 pass=12 skip=0 fail=0 tree_writes=0. limits_build --check and gatecount_build --check exit 0. Two compact map
runs over the repo are byte-identical and pass xmllint.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 1d8249ca-8ad3-4180-91b9-e92ad3362029

📥 Commits

Reviewing files that changed from the base of the PR and between 8c80566 and 27fc151.

📒 Files selected for processing (2)
  • src/compactlegend.h
  • test/compactlegendcheck.sh

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Summary

Summary by CodeRabbit

  • New Features

    • Compact legends now show additional completeness details for zoom and tree views, including symbols, isolated items, top modules, displayed levels, and indexed files.
    • Added completeness indicators for child modules, recent items, low-priority items, overloads, and provenance information.
  • Tests

    • Expanded validation coverage for conditional legend attributes, zoom and tree roots, churn-decay rows, and map fields.

Walkthrough

The compact legend now describes additional tree, zoom, churn-decay, and map-row fields. The validation script adds runtime and source-driven checks for compact definitions, presence-only readings, and payload-reading terms.

Changes

Compact legend contract

Layer / File(s) Summary
Legend specifications
src/compactlegend.h
Tree and zoom readings now include additional completeness attributes. New terms define children, of, lpin, overloads, and prov.
Legend coverage checks
test/compactlegendcheck.sh
The test contract adds D13–D17 checks and source-driven validation for the new conditional fields and payload readings.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 27fc1

The compact legend and its coverage updates are ready to merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the compact legend fixes for zoom, tree, churn-decay, and map rows.
Description check ✅ Passed The description directly explains the twelve missing compact legend definitions, test coverage, verification results, and deferred scope.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/compact-remaining-terms

Comment @coderabbitai help to get the list of available commands.

@joyful-ii-V-I

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@joyful-ii-V-I

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@joyful-ii-V-I

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@joyful-ii-V-I

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@joyful-ii-V-I
joyful-ii-V-I merged commit d67aabb into main Sep 12, 2026
31 checks passed
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.

1 participant