Repository navigation
Description
Owner: Pranav · Priority: P0 · Blocked by: the issue-12-found-problems branch landing on main (it edits report/templates.py)
Parallel work: Can be written while the other two issues wait; it must be on main before the final run.
1. Goal
Every finding in the "fix first" list says what to do about it. Today most of them do not.
The sponsor's judging hints ask that the tool "suggests realistic improvements", and spec §11.4 item 3 says the top 10 each carry "facts, claim, fix and simulation result". In the bundles on main:
| Repo | Top 10 by type | Top 10 with any fix text |
|---|---|---|
| artemis | 3 shaky_foundation, 3 cheap_loop, 3 hidden_partners, 1 broken_rule | 3 |
| graylog | 3 shaky_foundation, 3 cheap_loop, 3 hidden_partners, 1 foundation_on_features | 3 |
| shopware | 3 shaky_foundation, 2 overloaded_class, 2 broken_rule, 2 cheap_loop, 1 hidden_partners | 2 |
Ranks 1 to 3 are shaky_foundation in all three, and templates._fix returns an empty fix for every type except cheap_loop. Running codexray judge does not close this: job B only covers broken_rule, cheap_loop, foundation_on_features and overloaded_class (settings/judge.yaml, job_b.types), so shaky_foundation, hidden_partners and large_complex_changed keep an empty fix either way.
2. Decide first (spec)
The spec is not consistent here: §11.4 promises a fix for each of the top 10, while §8.3 and §9.3 give the three pressure-point types none. Settle it in a small spec pull request before any code. Two ways:
- Fix text built from stored facts, per type (proposed). No AI call, so the report stays complete with zero AI calls (§8.7) and nothing is detected by a model. Shown as "not simulated" unless the fix removes a specific link.
- Extend job B to these types. Needs new verdicts in §8.3, a change to
core/contracts.py, and more AI calls. Only if option 1 reads too thin on the real findings.
If neither gives an honest suggestion for a type, the finding says "no improvement proposed" in plain words instead of showing an empty field.
3. Scope & File Boundaries
Create or edit
spec.md§8.7 and §11.4 (own pull request, first)src/codexray/report/templates.py(_fix),src/codexray/settings/report.yamlfor any wording or limitsrc/codexray/analyze/history_findings.pyonly if a fact the sentence needs is not stored yet
Do not touch
src/codexray/core/contracts.py: use the existingFix.actionvalues. If a new one is needed, stop and follow "Changing a contract" inCONTRIBUTING.md.src/codexray/judge/.
4. Implementation Steps
- For each of the three types, list which facts and evidence the finding already stores (
shaky_foundation:direct_users,changes_12m, evidence rolesdirect userandchanges;hidden_partners:shared_commits,shared_share, the two partner files;large_complex_changed:top_functions,branches,lines). - Write one fix sentence per type that uses only those values and names, for example naming the functions in
top_functionsto split, or the two partner files whose shared part should get one owner. - Every number in the sentence is a fact value and every code name is in the facts, a path or a cited slice, the same rule job B's text must pass (§8.4).
- Keep the wording rules of spec §12.4 and
AGENTS.md: calm, no blame, limits stated.
5. Acceptance Criteria & Verification
No new test cases; run it and look (TEAM_RULES.md rule 3).
uv run codexray report --repo <id>on all three repos, twice each:findings.jsonis byte for byte the same on the second run.- In each repo's top 10, every finding has fix text or the plain "no improvement proposed" line. State the count per repo in the pull request.
- Open the Decisions screen for each repo and read the first ten suggestions against the code they point to. Say in the pull request which ones read as realistic and which do not.
make checkpasses.
Branch: issue-74-suggested-improvements. Open a pull request whose description says Closes #74. The specification is spec.md; the working rules are in AGENTS.md, TEAM_RULES.md and CONTRIBUTING.md.
Activity
Pranav-Mathad commentedon Nov 29, 2026
The spec step is up as a pull request (#78). It takes the first way: fix text built from stored facts, no AI call, no contract change. Every placeholder is a value the findings already store, so the code step needs no new Stage 5 fact and stays in
report/templates.py.Three things for the code step, found while checking the spec text against the code on
main:web/src/screens/decisions/FixFirst.tsxshows "No fix proposed." whenfix.actionisnone(line 272). The spec now says "No improvement proposed." One of the two has to change; that file is in the web lane.fix.action !== "none", not from the text (line 256). A fix with an action and empty text would render an empty span. The template must never produce that pair: when a needed value is missing, return actionnone.extract_interface, is inLINK_REMOVINGinsrc/codexray/judge/jobs.py(line 54), which sends a fix tosimulate_remove_link. It is not simulated today only because a finding without both asourceand atargettarget returnsnot_simulated()first (lines 259 to 260), and hidden partners use the rolepartner. Check after the change that all three types still come out as "not simulated".Also:
top_functionsis one preformatted string holding one or two function names with line ranges and no branch counts (analyze/history_findings.py, lines 220 to 224). The fix sentence uses it whole.