Count circular deps and god objects from issue items - #90
Merged
Conversation
snapshotFromAnalysis treated Circular/Large issues as 0-or-1 presence flags. The analyzer emits one aggregate issue per kind, so the real count is items.length. History already written stays as-is; new snapshots store the actual counts. Co-authored-by: Braedon Saunders <braedonsaunders@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
braedonsaunders
marked this pull request as ready for review
August 18, 2026 12:11
Owner
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Fixes #89.
snapshotFromAnalysis()was counting matching issue objects, socircularandgodObjectscould only ever be 0 or 1. The analyzer emits one aggregate issue per kind; the real count lives on that issue’sitems.length.A repo with 5 circular-dependency groups therefore badged the same as a repo with 1. That number is what the SVG card HIDDEN COSTS panel, sparklines/trend arrows, and PR receipt
dCircdiffs display.Fix
Find the aggregate issue and use
items.length. Missing / non-arrayitemsstay 0.History call: fix in place, no rename. Existing
state.jsonruns that already wrote 0 or 1 stay as written. New snapshots store the real counts. Sparklines/receipts may show a one-time jump on the first run after this change; that is the count becoming honest, not a sudden flood of new cycles.Verified against
58ad9feThe writeup’s 6-file markdown fixture does not produce circular issues on current main. Markdown cross-links are explicitly not import cycles (
index.htmlaround the circular-detection comment). I reproduced the counting bug with:3 Circular Dependencies/2 Large Files)tests/fixtures/three-cycles/)In each case
data.issueshad one aggregate with the realitemslength, and the old snapshot reported1.Tests
items.length, not issue objects; missing items → 02, not1Does not touch
index.html, the public one-file app, or the in-flight code-cards work oncursor/code-cards-confirm-delete-bdff.