Repository navigation
tooling: blocker-initiative tools -- baseline cache, history, provision, unmask, pr_check (#4270, 1 of 2) - #4596
Merged
Merged
Conversation
- cics_census survey --baseline: one survey per main SHA with that commit's own translator, cached at <root>/census-cache/<sha>/ (a no-op once cached, locked); blockers --baseline and compare --before-baseline read it. - cics_census history append/show: docs/language_status/blockers_history.jsonl, seeded with #4587 / #4590 / #4592 (approximate SHAs, noted) and #4593. - equivalence_env --provision: private cics-crucible at the pin + census clones (INELIGIBLE_LIST minus burned; estate4 candidate names refused), provision.json with SHAs, the exports; --check WARNs on an off-pin shared checkout. - blockers --unmask GAPKEY: what-if re-translation of the programs one whole-program refusal stops, with that check off via det.source.survey_unmask (survey-only; det_survey.py is its only caller). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
…, usage, compare, blockers) (#4270) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
| def test_restored_when_the_block_raises(): | ||
| with pytest.raises(RuntimeError), SRC.survey_unmask("unmodelled"): | ||
| raise RuntimeError("boom") | ||
| assert not SRC.unmasked("unmodelled") |
Contributor
…n test over survey, usage, compare (#4598) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
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.
Part of #4270 (blocker-initiative tooling, PR 1 of 2: items 1-4). Fixes #4598. Companion: #4595 (pr_check, one rosetta-audit run per push, nightly baseline) -- merge this one first (the nightly job calls
survey --baseline).What this fixes: every slice agent re-ran a 20-60 min before-survey on the same main SHA, rebuilt census clones and a private crucible clone by hand, kept scratch in /tmp, only learned what a whole-program refusal hid after fixing it, and had no history of the whole counts.
1. Baseline cache keyed by SHA
cics_census.py survey --baseline [--root DIR] [--sha SHA] [--no-fetch] [--force]: fetches origin/main (default) and surveys that commit with that commit's own translator --git archive <sha> gitgalaxy tests/tools pyproject.tomlinto<root>/census-cache/<sha>/src-- into<root>/census-cache/<sha>/before-{b,nb-local,nb}, pluscics_programs.json(so later reads need no corpora),blockers.txt/json, andmeta.json(written last: the cache is complete). A cached SHA is a no-op; anflockon<sha>.lockmakes a second agent wait, then find the cache. A cache surveyed without the census refuses a census run (exit 2,--forceto redo) instead of mixing.--root, else$GG_SCRATCH, else<worktrees dir>/_shared-scratch(worktrees dir =$GITGALAXY_WORKTREES, else the directory holding this worktree, else<main>/../gitgalaxy-worktrees). On this box:/srv/storage_16tb/projects/gitgalaxy-worktrees/_shared-scratch. Census clones:--census-corpora,$CICS_CENSUS_CORPORA, else the provisioned<root>/census.blockers --baseline [--sha SHA]reads it;compare DIR --before-baseline --verb Vtakes the before rows from it, so an agent surveys only its own branch (survey --out DIR --label after).--no-censusstill read$CICS_CENSUS_CORPORAinsurvey/usage/compare/blockers; now it reads no census root at all whatever the env holds, and--no-censuswith--census-corporais an argument error (cics_census.py: --no-census still reads $CICS_CENSUS_CORPORA #4598;test_no_census_never_reads_the_census_rootcovers survey, usage and compare, plustest_no_census_ignores_the_census_envfor the baseline). The nightly burned-only job depends on it.survey --outnow also writes<label>-runs.json(which corpora root each run read), which--unmaskneeds.Real run (main 8dff2ec, 17 corpora; 125 CICS programs):
second call:
baseline 8dff2ec2e032 already surveyed (burned + local + census corpora, 2026-10-07T09:39:52Z): ... -- nothing to do(0.06 s).blockers --baseline, top of the ranking:(76/125 vs #4592's 75/123: this baseline includes
cics-java-jcics-samples, which #4592 left out; its EC01 is whole.) Gap keys now also blank backquoted source text (a cut literal's tail), so no source text reaches a key and the 7 NexusBank programs share one key.2. History
docs/language_status/blockers_history.jsonl, one line per merged slice: PR, main SHA, date (UTC), whole / total, burned and non-burned, refused whole, top 5 gaps (counts), scope, note.history append --pr N [--note ...] [--sha]reads the cached baseline (refuses a duplicate PR+SHA);history show:The first three are seeded from the PR bodies. SHAs approximate (each note says so): #4587 was surveyed on its base b6c3e4e (recorded at its merge commit; tooling-only PR); #4590's line covers #4588 + #4590, measured on #4590's branch after merging main; #4592 was measured on its branch, without jcics-samples (123 programs), and reported neither refused-whole nor a ranking. #4593 is the first real entry (
history append --pr 4593). Names and counts only.3.
equivalence_env.py --provision [--root DIR]Idempotently:
<root>/cics-crucible(a private clone checked out attests/_cics_crucible_pin.py's PINNED_REF; refuses to move a clone with local changes),<root>/census/<repo>for onlyestate4_draw.INELIGIBLE_LISTminus the burned estates (shallow), and<root>/provision.jsonwith each clone's SHA. Before cloning anything it compares the list against the names inestate4_candidates.json(onlyfull_nameis read) and refuses on any overlap. Progress on stderr, the--shellexports on stdout (eval "$(... --provision)"), now includingCICS_CENSUS_CORPORAandGG_SCRATCH;--shell --root DIRexports an existing provision. Census dirs not on the list are reported, never touched.--check: the shared checkout (beside the main checkout) off its pin is now a WARN with the provision hint (do not move it, other agents use it); any other off-pin checkout still FAILs.re-run: nothing cloned, 0.29 s.
4.
blockers --unmask GAPKEY-- a what-if, not a translationFor a
*row (a refusal that stops the whole program): re-translates only the programs that gap refuses, with that one refusal check off, reusing the baseline's generated estates (det_survey.py --program/--unmask/--estate-from), and reports the gaps hidden behind it and whether any program would become whole. Output is headed# WHAT-IF, NOT A TRANSLATIONand rows carry"unmasked": CHECK.det.source.survey_unmask(*checks), a context manager over a module-level frozenset, honoured only inside itswithblock. No env var or flag turns it on; the only caller istests/tools/det_survey.py --unmask, andtest_no_production_path_opens_the_what_iffails if any module undergitgalaxy/(or another tool) calls it. Production behaviour is unchanged: the three pre-parse checks moved intosource.refusal()in the same order.UNMASKABLE):cut-literal(the literal read with its text past column 72, as if the source were fixed),several-programs,unmodelled(national / DBCS, IDMS, DECIMAL-POINT IS COMMA, control characters),missing-copybook(expanded to nothing; not an ambiguous one). A gap with no switch says so and lists these.Real run on the column-72 gap:
So the #1
*row (7, an upper bound) would make no program whole: each NexusBank program has 25-53 holes behind it, led byno such item(7) and missing generated screens (6). That is the "we only learned it after fixing" case answered before fixing.Checks
test_cics_census_baseline.py(7: cache once per SHA + no-op + scope mismatch, failed survey leaves no cache, blockers/compare from the baseline, history append/show/duplicate, the committed history well-formed, gap -> check mapping, the labelled what-if with only the refused programs re-translated),test_det_unmask.py(6, importorskip tree_sitter_language_pack where the parsers run: off by default and only in the block, restored on raise, unknown check refused, the cut-literal what-if reaches both parsers, missing copybook expands to nothing, no production caller),test_equivalence_env.py(+5: provision at the pin with SHAs + idempotent + stray dirs, candidate refusal before any clone, census list = ineligible minus burned and disjoint from candidates, shared off-pin WARN vs private FAIL, scratch root order).test_det_source_4462.py,test_det_translate.py, the census / env tests: 369 passed, 1 skipped (JDK 17 cell).pr_gates --only lint) and mypy clean on the touched tools (det_survey.py's 3 mypy errors are pre-existing lines);pr_gates --only audits secretspass.pr_gates.py --ratchets: port-surface, estate, fact-crosscheck, completeness, ground-truth PASS; ports SKIP (no shared cics-crucible checkout at the default path during the run). Re-run withCICS_CRUCIBLE_PATH=<the provisioned clone at v0.5.0>: ports FAIL on all 25 equivalence cases -- identically on an origin/main worktree (tooling: blocker-initiative tools -- pr_check, one rosetta-audit run, nightly baseline (#4270, 2 of 2) #4595's branch):aws-mainframe-modernization-carddemo is not fetched at its pinned ref-- the box's shared mainframe corpora are off their pins, not this change (I did not re-fetch the user's corpora). A skip is not a pass.pr_gates.py: lint, audits, secrets, xray, gauntlet, golden PASS; suite 15150 passed, 1 failed --test_source_readsflagged a lossyerrors="replace"read in my new test, fixed (re-run passes).🤖 Generated with Claude Code
https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6