Repository navigation
readiness scanner: gitgalaxy assess -- offline, read-only, no source text in the report (Part of #4726) - #5234
Merged
Merged
Conversation
…e text in its report (Part of #4726) The feature inventory's scan core and the era tagger move into the package (gitgalaxy/tools/readiness/, tests/tools keep shims and their CLIs; fixtures byte-identical). schema.project is the only path to a report (closed vocabularies, names or keyed-hash labels, class-name reasons); offline.install guards the network in the command and its galaxyscope child; the estate is only read. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nventory (Part of #4726) Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 tasks
…gitgalaxy/tools/readiness (Part of #4726) schema.py reads the CICS command spec as its vocabulary: listed in test_cics_spec IMPORTERS. The readiness package reads the scanned estate, so test_source_reads' rule 2 now covers it; the --options file goes through read_source like estate_options.load_estate. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
Author
|
No description provided. |
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 16, 2026 09:05
squid-protocol
enabled auto-merge (squash)
October 16, 2026 09:06
Comment on lines
+14
to
+21
| from gitgalaxy.tools.readiness.inventory import ( # noqa: E402, F401 | ||
| census_lines, | ||
| extract_sql_forms, | ||
| fallback_parse, | ||
| inventory_template, | ||
| process_program, | ||
| scan_estate, | ||
| ) |
Contributor
This was referenced Oct 16, 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.
Part of #4726.
What
gitgalaxy assess ESTATE [--options FILE] [--redact [--redact-key-file F]] [--out FILE]scans a COBOL / CICS estate onthe customer's machine. It runs offline and only reads the estate. It writes a JSON report that holds counts, feature names,
program names (or their redacted labels) and statuses, and never source text. Customer doc:
docs/assess.md.Design
gitgalaxyconsole script (gitgalaxy/cli.py) with one subcommand,assess(
gitgalaxy/tools/readiness/assess.py). Without the console script,python -m gitgalaxy.cli assess ...does the same.--jclis refused by name: reading options from JCL is a follow-up.tests/tools, which a pip install does notship. It moves into the package as
gitgalaxy/tools/readiness/:inventory.pyisfeature_inventory.scan_estateand its helpers, plusdet_survey.copy_dirs.scan_estategainstwo parameters: a
scanhook (assess passes its guarded scan) andestate_opt.era_tags.pyis moved withgit mv.tests/tools/feature_inventory.pyandtests/tools/era_tags.pybecome re-export shims that keep their CLIs.feature_inventory.py --all-burned --checkpasses: all six committed fixtures are byte-identical after the move.pip install gitgalaxy[translator](the det parser). No Docker, Db2 or JDK.gitgalaxy-assess/1):totals: programs, parsed, unparsed, refused by family, assembler members.eras: era counts and tell counts.features: per category, each feature with its count and the programs that use it.other: per category, features outside its vocabulary, as counts only.copybook_gaps: missing copybooks and the programs that need them.programs: name, kind, status, reason, era tags (tell, era, count; no line numbers).tool_versionandredacted. No date, host or absolute path.schema.projectis the only function that builds a report. A feature name is printed only if it is in a closedvocabulary:
Anything else is counted under
other. An unparsed reason is the exception's class name,missing copybookorunreadable, never its message.schema.validatere-checks the finished report. If it fails, nothing is written and the command exits 3.Tests (below) hold the report against each burned estate's real source.
--redactturns program paths intoP-labels and copybook names intoC-labels, each 12 hexdigits of an HMAC-SHA256. Without a key file the key is random, so the labels can't be linked across runs.
--redact-key-filegives the same labels every run. Counts don't change.offline.install()refuses connect / connect_ex / sendto / sendmsg on any non-AF_UNIX socket, andrefuses
create_connectionand the DNS calls. It is installed in the assess process and, through a-cbootstrap, inthe galaxyscope child before any of the engine's code runs. Forked workers inherit it.
--db-only --no-dependency-cachewith git history off.--outinside the estate is refused.Class: every way estate text can leave the site through the report
missing copybook/unreadabletest_an_unparsed_reason_prints_its_class_never_its_messageotheras countstest_projection_holds_its_schema[*6],test_carddemo_sequence_numbers_never_reach_the_reportfirst_linevalidate--redacttest_redaction[*6]--redacttest_redaction[*6], plantedtest_the_guard_*,test_the_scan_child_runs_under_the_guard--outrefused inside; tree snapshot equaltest_the_estate_is_read_only,test_out_inside_the_estate_is_refusedA real leak this caught: CardDemo's committed raw inventory has sequence-area numbers as CICS command words
(
02750012 029200,ASKTIME 03430012,READ 03700306). These come from the census fallback of CODATE01 / COACCT01,whose MQ copybooks are missing. The report counts them under
other(7 command keys, 54 option keys) and prints none.Evidence
tests/cobol_mainframe/test_assess.py: 30 passed and 5 skipped with plainpytestfrom/tmp. The skips are thenightly per-estate runs; all 35 passed with them enabled locally.
validate;data / paragraph name of that estate appears in the report;
with another; every count matches the plain report.
the sequence area, a non-function
FUNCTIONword, SQL names and a non-COBOL file. It never appears, plain orredacted. The estate snapshot (sizes, mtimes, hashes, directories) is unchanged.
unchanged, no source text, and the report equal to
project(committed inventory).test_feature_inventory,test_era_tags,test_support_matrix,test_det_cics_macro_refusal_5121: 146 passed, 1 nightly skip.feature_inventory.py --all-burned --checkexits 0.heavy-run.sh, JDK 17):pr_gates --fastpassed 6/6 (lint, audits, secrets, xray, gen-docs, gauntlet).pr_gates --ratchets: 8 passed, 0 failed, 0 skipped.Follow-ups (named, not in this PR)
package").
--jclto estate options.Cross-repo
None.
🤖 Generated with Claude Code