Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ source files. Every finding cites the commit, file and lines behind it.
| Stage 5, `analyze`: decisions, finding types, before and after | Works on all three repositories |
| Stage 7, `report`: ranking, `findings.json`, the web bundle | Works on all three repositories |
| Web app: Decisions, Structure grid, Close-up, Code, Before and after, Size, Report | Works on the three bundles in `web/public/bundles/` |
| Stage 6, `judge`: AI text for the shown findings | Not built on this branch; prints "not built yet" |
| `decisions propose`: rules proposed from written decision documents | Not built on this branch; prints "not built yet" |
| `check <base>..<head>`: decisions a change breaks | Not built on this branch; prints "not built yet" |
| Stability table (spec.md §11.3) and the emerging-hotspots list | Not filled yet; the Report screen shows "Not measured in this run." |

Because `judge` is not built, the finding text is the fixed sentences built from the
facts, and no AI call was made for the results in this repository.
| Stage 6, `judge`: AI text for the shown findings | Works with `LLM_API_KEY` set; answers are cached in the run folder, so a re-run makes no call |
| `decisions propose`: rules proposed from written decision documents | Works with `LLM_API_KEY` set; writes `proposals.yaml` for review, and the reviewed rules are in `rules/` |
| `check <base>..<head>`: decisions a change breaks | Works; lists each broken decision with file and line, and exits 1 when there is one |
| Stability table (spec.md §11.3) | `make robustness REPO=<id>` after `report` measures it (13 to 21 minutes per repository on 4 cores) and rebuilds the report |
| Emerging-hotspots list | Not filled yet |

The results in this repository were made without AI calls: the finding text is the fixed
sentences built from the facts.

## Prerequisites

Expand Down
5 changes: 3 additions & 2 deletions src/codexray/report/robustness.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def ranking_of(
"""Finding ids in final order, and the findings as canonical JSON."""
from codexray.decisions import registry
from codexray.model.rollup import load_tree
from codexray.report import assemble
from codexray.report import assemble, line_shares

manifest = contracts.Manifest.model_validate(json.loads(run.manifest.read_text("utf-8")))
decisions = {d.id: d for d in registry.load_decisions(run.decisions)}
Expand All @@ -81,8 +81,9 @@ def ranking_of(
if end is None:
raise CodeXrayError(f"{run.root} has no END snapshot")
tree = load_tree(con, manifest.repo, end.sha)
origin = line_shares.load(con, manifest, end.sha, settings)
findings, _ = assemble.assemble(
con, manifest, settings, decisions, tree, end, dict(judgements or {})
con, manifest, settings, decisions, tree, end, dict(judgements or {}), origin
)
finally:
con.close()
Expand Down