Skip to content

Add the stability table, the rules export and codexray check - #72

Merged
Viraj5503 merged 5 commits into
mainfrom
aryan-11-robustness-check
Nov 29, 2026
Merged

Viraj5503 merged 5 commits into
mainfrom
aryan-11-robustness-check

Conversation

@WiseyXD

@WiseyXD WiseyXD commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Closes #11

What this adds

codexray check <base>..<head> --repo <id> lists the decisions a change breaks, with file and line, and exits 1 when there is one.

  • It builds a scratch run with two snapshots, base and head, using Stage 1's own listing code.
  • It copies the facts the run already read for each file content (they are keyed by blob), so parse reads only the contents the change added.
  • It then runs the real parse and model stages on both snapshots and checks every reviewed, checkable decision from the run's decisions.yaml on both maps.
  • A decision is broken when head has an exception between two files that base does not have, or has more link lines there.
  • The scratch run is deleted afterwards. No CLI change was needed: the stage prints its list and raises, which the CLI turns into exit 1.

make robustness REPO=<id> (report/robustness.py) measures the five tests of spec §11.3 against the baseline order at END.

  • It writes robustness.json in the run folder, then runs codexray report again so report.json carries the table.
  • Measures: share of the top 5 and top 10 kept, and rank-biased overlap at p = 0.9. The functions come from report/stability.py (Module: ranking stability measures (report/stability.py) #21).
  • identical_rerun: a copy of the run's database goes through codexray analyze again. It records whether the findings are byte-identical and whether every analyze table has the same fingerprint.
  • fresh_ai_run: the order with the stored AI verdicts against the order without them. This is 1.0 by design. Beside it is the agreement of the separate votes stored per judged finding; this makes no new gateway calls.
  • commits_removed_5pct: a copy of the database with 5% of commits (fixed seed) removed from commits and file_changes, the two history tables analyze and report read, then analyze again.
  • end_date_minus_1_month: the whole pipeline (ingest, parse, model, analyze) again, with END pinned to the last mainline commit before END's date one month earlier.
    • It runs in its own working folder under the run folder, with its own repos.yaml; repos/ and rules/ link to the real ones.
    • The facts already read per file content are copied in first, so parse reads only new contents.
  • weights_changed_20pct: each weight raised and lowered by 20% and renormalised. The row shows the worst of the six variants, and all six are kept in robustness.json.

Report:

There are no new test files, per team rule 3. The check line is removed from STUBS.

What I ran and saw

codexray check on Graylog

I made two commits in the Graylog clone with git plumbing; nothing was checked out.

  • Breaking commit: adds import org.graylog.datanode.Configuration; to graylog2-server/.../shared/utilities/StringUtils.java.

    $ codexray check check-bad~1..check-bad --repo graylog
    check 4912933127e1..09438e3c5380: the change breaks 1 decision(s) with 1 new link(s)
    
    graylog/datanode-packages-private: Data Node packages (org.graylog.datanode) must not be used outside the data-node module.
      graylog2-server/src/main/java/org/graylog2/shared/utilities/StringUtils.java:18 uses data-node/src/main/java/org/graylog/datanode/Configuration.java
    codexray: the change breaks 1 decision(s); 3 reviewed decisions checked
    exit 1
    
    • It named the decision and line 18, the inserted line.
    • Only 1 file content was read; 13,666 were reused from the run. It took 1 min 52 s.
  • Comment-only commit: the change breaks no decision (3 reviewed decisions checked; 0 exceptions gone), exit 0.

  • Unknown revision: codexray: 'nosuchref' is not a commit in repos/graylog, exit 1.

  • The scratch folder is gone afterwards.

Stability table, all three repos

These runs used the reviewed rules from #69, placed in the working tree for the runs and not committed here.

Test Graylog Artemis Shopware
Identical re-run 5/5, 10/10, 1.00 5/5, 10/10, 1.00 5/5, 10/10, 1.00
Fresh AI run, cache off 5/5, 10/10, 1.00 5/5, 10/10, 1.00 5/5, 10/10, 1.00
5% of commits removed, fixed seed 5/5, 10/10, 0.99 5/5, 8/10, 0.93 5/5, 10/10, 0.88
End date moved back one month 3/5, 8/10, 0.82 (target not met) 4/5, 7/10, 0.86 4/5, 5/10, 0.64
Each weight changed by 20% (worst of 6) 3/5, 7/10, 0.79 (target not met) 4/5, 8/10, 0.87 5/5, 10/10, 0.87

Cells show top 5 kept, top 10 kept, and rank-biased overlap.

  • Identical re-run: byte-identical findings, and every analyze table has the same fingerprint, on all three repos. A second codexray report on Graylog wrote the same bytes in all 2,873 files.
  • Fresh AI run: on Artemis, the only run with stored verdicts, 66 of 73 votes match the verdict they produced, and all votes agree on 18 of the 25 judged findings. Graylog and Shopware have no stored verdicts yet, so only the order is compared there.
  • Commits removed: 5% of commits were removed (Graylog 890, Artemis 628, Shopware 994). Every top 5 held; Artemis's top 10 kept 8 of 10.
  • Where the target of 4 of the top 5 is not met:
    • Graylog, END moved back and weights changed (3 of 5). The list to fix first allows 3 findings per type. Graylog's third shaky-foundation place is a tie at score 0.75 between components/bootstrap/index.ts (rank 3) and logic/telemetry/Constants.ts (rank 11). The tie is broken by finding id, so a month less history, or a 20% weight change, swaps them. The cheap loop at 0.66 and the foundation finding at 0.64 are just as close. Three of the six weight variants keep 5 of 5. Ties at the per-type cap are what moves.
    • Artemis meets the target on every test. Its lowest results are 4 of 5 for END moved back and for the worst weight variant, and 8 of 10 in the top 10 when commits are removed.
    • Shopware, END moved back: top 5 kept 4 of 5, which meets the target, but the top 10 kept only 5 of 10. The newcomers at END minus one month are findings that existed then and were gone by END, for example a Core → Elasticsearch exception to the namespace rule.

The robustness run took 14 min on Graylog, 13 min on Artemis and 21 min on Shopware. Most of it is the END-moved-back pipeline; its run folder is kept under <run>/robustness/.

make check passes.

Not done

  • I did not open the report screen in a browser. The web app's stability table is unchanged; it now receives real rows instead of an empty list.
  • The fresh AI test makes no new gateway calls. A true cache-off run of job B needs codexray judge from Add AI jobs B and C with checked votes and fix simulation #67 and would cost about $2.30 per repo. The stored votes are separate calls, so their agreement is what is measured.

@Viraj5503
Viraj5503 merged commit 46f8f34 into main Nov 29, 2026
2 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.

Robustness table, coverage section, exports and codexray check

2 participants