Skip to content

exposition: LOC per project + main-result/dependency metrics in decls viewer - #407

Merged
Vilin97 merged 1 commit into
mainfrom
claude/lean-pool-exposition-metrics-f1f70f
Sep 10, 2026
Merged

Vilin97 merged 1 commit into
mainfrom
claude/lean-pool-exposition-metrics-f1f70f

Conversation

@Vilin97

@Vilin97 Vilin97 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Landing page (exposition/): adds a Lines of Lean stat tile and a sortable LOC column to the project table. LOC is the raw line count of LeanPool/<Project>.lean plus everything under LeanPool/<Project>/ (wc -l semantics; the pool total matches wc -l exactly).

Declarations viewer (exposition/decls/): each row now shows

  • Main — ★ when the declaration is one of the project card's main results; this is the default sort (main first, alphabetical within),
  • Deps / Dependents — direct intra-project counts,
  • Dep cone / Dependent cone — transitive cone sizes within the project (excluding the declaration itself).

Count columns sort largest-first on first click; the two cone columns collapse on narrow screens.

Implementation

  • cones.py: cone sizes over the SCC condensation using Python int bitsets (Tarjan emits components dependencies-first, so one forward and one backward pass suffice). 0.3 s for all 84K declarations of the live site.
  • decls.json rows extend to [name, kind, project, declId, main, deps, dependents, depCone, dependentCone]; index.json and shard stats gain loc. Documented in SCHEMA.md (schema 1.2, additive).
  • No extractor or CI changes; the generator CLI is unchanged.

Test plan

  • uv run --group test pytest (320 passed), ruff check, ruff format --check
  • Rebuilt index.json/decls.json from the live site's 174 shards and served the site locally: both pages render, default sort is main-first, per-column sorts verified (largest dep cone = topological_classification_of_surfaces, 5,905; largest dependent cone = Incompleteness LO.Arrow, 6,122)

🤖 Generated with Claude Code

Landing page: a "Lines of Lean" tile and a LOC column on the project table
(raw line count of LeanPool/<Project>.lean plus LeanPool/<Project>/**).

Declarations viewer: each row now carries whether the declaration is one of
the project's main results (starred, sorted first by default), its direct
dependency and dependent counts, and the sizes of its transitive dependency
and dependent cones within the project. Cones are computed over the SCC
condensation with integer bitsets (0.3 s for the whole pool).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown

Advisory cross-file review against Lean Pool's supervisory rubric. This is not by itself a significance, source-verification, or merge verdict.

Retrigger

The PR appears safe to merge with the changed exposition generation and rendering paths remaining internally consistent.

Summary

  • Computes dependency cones over the SCC condensation and emits compact declaration metrics.
  • Adds LOC totals, sortable landing-page data, declaration sorting, and responsive metric columns.
  • Documents the additive payload fields and covers graph, shard, index, and declaration-index generation with tests.

Reviews (1) · Last reviewed commit: "exposition: LOC per project + main/depen..."

@Vilin97
Vilin97 merged commit 5712c4a into main Sep 10, 2026
12 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