Repository navigation
#3805: fresh-estate trials -- the trial ledger, trial start / report, and the attempts-to-proof histogram - #3959
Merged
Merged
Conversation
… and the attempts-to-proof histogram tests/tools/trial.py + tests/cobol_mainframe/trials.json: `start` freezes the system (engine commit/version, porting-rules hash, model + backend, harness commit), runs the harness's scan -> refract -> cobol-to-java path (the tickets), and declares eligibility up front (hashed); `sync` imports port_runner's port_log.jsonl as attempts, causes from `Trial-Cause:` commit trailers (a retry with no fix = model); `close` ends a trial; `report` writes docs/language_status/fresh_estate_trials.md + .svg; `check` / test_trials.py keep them current. The ledger is seeded with the six development estates. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01TmgE1CwLgaqxqKEgQn5Dw5
Comment on lines
+695
to
+697
| "<style>.t{font-size:15px;font-weight:600;fill:#0b0b0b}.s{font-size:11px;fill:#52514e}" | ||
| ".h{font-size:10.5px;font-weight:600;fill:#0b0b0b}.a{font-size:9px;fill:#706f6a}" | ||
| ".l{font-size:10px;fill:#0b0b0b}.c{font-size:10px;fill:#52514e;font-style:italic}</style>", |
Comment on lines
+700
to
+701
| '<text x="16" y="44" class="s">Programs by the attempt that proved them (or why not), coloured by estate, ' | ||
| 'one panel per engine version.</text>'] # fmt: skip |
Contributor
2 of 3 tasks
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 #3805 (part of epic #3803)
Design
The headline is the first-try proof rate on estates the system has never seen: per program, did the porting loop's first attempt produce Java that the equivalence harness proves identical to the COBOL?
tests/tools/trial.pyis modelled onfield_testing.py. A committed ledger feeds a generated page and a CI check. The trial reuses the existing machinery and does not reimplement it:startruns the same scan, refract and cobol-to-java path the equivalence harness builds its project with (java_target_matrix.refactor(scan=True)+generate(..., "h2")). That path writes the porting tickets.syncreads port_runner'sport_log.jsonlthroughport_runner.events().git logtrailers.development, with no trials.Ledger schema (
tests/cobol_mainframe/trials.json)estates[]:id,kindpublic | private,statusfresh | development. A public estate also hasrepoandref. A private estate has an anonymisedlabelonly, and validation fails if it carries a repo, ref or path.trialled_byis set once a trial starts; a trialled estate is development for good.trials[]:id,estate,started,closed.system(the frozen system):engine_commit;engine_version(the last tag);porting_rules_hash(sha256 ofPORTING_RULES+TICKET_VERSION) andticket_version;model,model_version,backend;harness_commit(the last commit touchingtests/tools/equivalence*.pyor the GnuCOBOL Dockerfile).eligible[]andout_of_scope{program: reason}are declared at start.declaredis a sha256 over both, so an exclusion edited in later to hide a failure fails validation. Onlystart --excludecan add one.programs{PROG: {attempts: [{n, outcome proven|failed|no-port|error, cause model|ticket|generator|engine|harness|null, fix_commit, at, model}], final}}.finalis one of:proven@N, followed by the causes of the earlier failures, e.g.proven@2(generator);not-proven(cause), set at close;open.Out-of-scope programs show as
out-of-scope(reason)in the report.finalfollows from the attempts;Eligibility (declared in code,
ELIGIBILITY_RULES)A program is eligible if the batch harness can run it. The first rule that fails gives the out-of-scope reason:
EXEC CICS,EXEC SQL, DL/I, or MQ calls;--shipped-data PROGwaives this rule for a program whose estate ships its data.A program with no ticket is out of scope as "no business logic to port".
How an attempt and its cause are recorded
proven/proof-failedin the port log), or one run that produced no port:no-port, orerrorwhen the backend raised. A proposed port that was replaced by another run before any proof counts as anerrorattempt. Attempts stop at the first proven one.Trial-Cause: <ticket|generator|engine|harness> <PROGRAM>, landed between the failed verdict and the next attempt's start, is a fix on our side (that cause plusfix_commit);model;The chart (
docs/language_status/fresh_estate_trials.svg, plain SVG, no plotting library)first-try proof rate: X/Y (Z%) on N fresh estates at engine <ver>. The latest engine version is used; Y counts programs whose first attempt has a verdict, plus every program of a closed trial.<title>hover.How to run a trial
startrefuses:--excludeis refused;gitgalaxy/ortests/tools/.Tests (
tests/cobol_mainframe/test_trials.py)commandbackend and a stub proof;Trial-Cause: generator FIXPGMcommit lands in a temporary engine repo.proven@1andproven@2(generator), and the report bins them.online (EXEC CICS).startrefuses a development estate and an already-trialled estate (so an exclusion cannot be added late), and an exclusion edited into the ledger fails validation.model, and a recorded attempt is never rewritten.Gates
Full
tests/tools/pr_gates.py: 7/7 pass (lint, audits, secrets, xray, gauntlet 188s, golden 104s, suite 509s). After merging origin/main (already up to date): lint and audits pass, andtest_trials.py+test_port_runner.pygive 15 passed.Notes
Trial start on the fresh opensourcecobol4j checkout: I ran it against a scratch ledger only. It took 5s. 14 of 471 programs are eligible:
Widening eligibility would need the harness to compare SYSOUT and generate from inline FDs.
The online (CICS) harness (
equivalence_cics.py) exists, but CICS programs are declared out of scope for now, as the brief's "batch" rule says.🤖 Generated with Claude Code
https://claude.ai/code/session_01TmgE1CwLgaqxqKEgQn5Dw5