Repository navigation
Add AI jobs B and C with checked votes and fix simulation - #67
Merged
Merged
Conversation
This was referenced Nov 28, 2026
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.
What this changes
Judge lane, spec.md §8:
codexray judgewrites checked AI text for the findings the report shows (job B) and two-sentence module descriptions (job C), and simulates fixes. The report stays complete when every AI call fails: such a finding keeps its template judgement.judge/packet.py: the job B packet (spec §8.2).blob_sha.judge/prompts.py: the job B and job C instructions (884 and 793 tokens, so both are cached) and the §8.3 output schema. Repository text is declared as data. Every rule stated there is also checked by code afterwards.judge/jobs.py:check_response(Module: checks on every AI response (judge/types.py,judge/checks.py) #23). Onretryfailures there is one retry with the checks' messages.rejectandtemplatefailures are dropped. The verdict is the majority of passing answers, and the claim and fix come from the first passing answer with that verdict. With no passing answer, the template stays.links.name, most used first), neighbours and most changed files. It is checked for length, judgement words, names and numbers.judge/simulation.py) #25):move_symbolmoves the imported-declaration files;route_through_api,invert_dependencyandextract_interfaceremove the offending cell. Then all cheap-loop moves go throughsimulate_batch. Exceptions are read off the module matrix forforbidbetween named modules and foracyclic.judge/__init__.py:report.assemble), the firstjob_b.max_findingsofjob_b.types;workersthreads, one gateway client per thread, with a finding's votes kept in one worker;judgements/findings/*.json,judgements/simulations.json,judgements/descriptions.json,judgements/cache/,judgements/calls.jsonandsimulation_batch.json;usage.json, so the ledger keeps the real cost and a cached re-run leaves it unchanged.settings/judge.yaml:effort: mediumfor jobs A and B (spec §8.8 says to set it; a live call confirmed the gateway accepts it), plusworkers,job_b(max_findings,types) andjob_climits.tests/test_cli.py: thejudgeline is removed fromSTUBS.Closes #8
What I ran and what I saw
The run used the real pipeline on Artemis at the pinned
end_sha, from this folder:ingest→parse→model→analyze. Then:Fake transport, the real stage, no network:
simulation_batch.jsonis still written.usage.json, are byte-identical.Live, with the gateway key:
misplaced_type, 7insufficient_evidence, 1missing_api, 1legitimate_wiring.programming/domainimportLocalVCRepositoryUrifrom thelocalvc.servicepackage … so domain code depends on a type placed in a service folder."usage.json.codexray judgewith no key in the environment: 166 calls, 0 answered by the gateway (all cache hits), and all 139 outputs byte-identical.codexray reportafterwards: the 25 AI judgements appear inweb/findings.jsonbeside their findings, including the 4 exception findings in the top 10. The usage rows inreport.jsonshow $2.32 and $0.02, and the batch simulation is inreport.json.Before this,
probes/gateway_check.pyand one live job C call through the client passed; see the comment on #47.make checkpasses. No new test file: TEAM_RULES rule 3 replaces it with the runs above.For the report lane (#6)
Two outputs are written but no reader exists yet:
judgements/simulations.json: aSimulationper finding id, forFinding.simulation. The report sets none today.judgements/descriptions.json:NodeDescriptionrecords withsource: "ai", which could replace the computed module descriptions inmap.json.load_ai_judgementsskips both, since they are notJudgementrecords. Reading them is a change inreport/, which this PR does not touch.Choices to look at
job_b.types). Spec §8.3's verdicts are for exceptions and overloaded classes. Shaky foundations, hidden partners and supporting detail keep their template text, although shaky foundations rank high on Artemis.LLM_API_KEY is not set), as Module: gateway client with cache and usage ledger (judge/client.py) #24 designed. The report does not needjudge, so the report stays complete without it.usage.jsonis cumulative per run folder. It holds every call the gateway answered.judgements/calls.jsonholds this run's calls, cache hits included.codexray judgefrom the folder that holdsrepos/, likecodexray report.Checks
make checkpassessettings/judge.yamlcore/contracts.py,core/schema/orcore/runs.py