Skip to content

readiness scanner: feature inventory extractor, deterministic JSON per estate with a schema (Fixes #4723) - #4821

Merged
squid-protocol merged 4 commits into
mainfrom
feat/4723-feature-inventory
Oct 9, 2026
Merged

squid-protocol merged 4 commits into
mainfrom
feat/4723-feature-inventory

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #4723 (epic #4721).

python tests/tools/feature_inventory.py ESTATE_DIR / --all-burned --write / --all-burned --check gives, per estate:

  • statement forms;
  • data types and PICTURE features (P-scaling, COMP-1/2, national, edited);
  • CICS commands and options;
  • SQL forms (static, dynamic, cursors, WHENEVER);
  • intrinsic functions;
  • compile options (through gitgalaxy/core/estate_options.py);
  • copybook gaps.

Each comes with a count and the sorted program list. The output is deterministic, with no paths outside the estate and no timestamps.

Nothing is dropped: every category has an unknown bucket. A program the det parser can't read goes into unparsed_programs with its reason, and a regex fallback still counts its constructs.

Checked against the existing census: CICS command totals equal cics_census.py's on all 6 burned estates (CardDemo 240, CBSA 751, GenApp 500, zECS 118, DBB 34, async 67). Copybooks resolve through det_survey.copy_dirs. 4 programs stay unparsed, each for a copybook the repos don't ship: IBM MQ CMQODV/CMQGMOV (CardDemo ×3) and LE CEEIGZCT (CBSA ×1).

Files: the tool, feature_inventory.schema.json, fixtures for the 6 burned estates (tests/fixtures/feature_inventory/, ~300 KB, with .gitignore exceptions), docs/language_status/feature_inventory.md, and tests:

  • one synthetic test per category, plus the parser fallback;
  • determinism;
  • a built-in schema check over every fixture, with a negative case (jsonschema isn't installed in the venv);
  • fixture --check, which skips without corpora;
  • the module importorskips tree_sitter_language_pack.
    10 passed + 1 corpus test; ruff and mypy audits clean; pr_gates --fast 5/5.

How it was made: written by agy (Gemini 3.1 Pro) in three headless rounds under orchestration; review rounds fixed copybook resolution (62 → 4 unparsed) and per-category unknown buckets. Test guards were added in review.

🤖 Generated with Claude Code

…N inventory per estate, with a schema (Fixes #4723)

tests/tools/feature_inventory.py ESTATE | --all-burned --write | --check: per estate, the statement forms, data types
and PICTURE features, CICS commands and options, SQL forms, intrinsic functions, compile options (estate_options
resolver) and copybook gaps, each with a count and the programs that use it. Unknown constructs are counted in each
category's unknown bucket; a program the det parser can't read is listed in unparsed_programs with its reason and
still counted by a regex fallback. Copybooks resolve through det_survey.copy_dirs. CICS command totals equal
cics_census's on all 6 burned estates (240/751/500/118/34/67); 4 programs stay unparsed, each for a copybook the repo
does not ship (MQ CMQODV/CMQGMOV, LE CEEIGZCT). Fixtures for the 6 burned estates, schema, doc.

Written by agy (Gemini 3.1 Pro, three rounds) under orchestration; reviewed, with test guards added: the
tree_sitter_language_pack importorskip, a corpus skip for the fixture --check, and a built-in schema check (jsonschema
is not installed, so the schema test had silently passed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: real failure(s) on this head. Reproduce locally with the repro line; don't re-push to find out.

PR #4821 @ 71c6b2036357: 1 failed check(s)

== full-suite (failure) -- real
   https://github.com/squid-protocol/gitgalaxy/actions/runs/37988166295/job/114015273909
   repro: python -m pytest -q tests
   log tail:
     (log unavailable: the response contains terminal escape sequences; pass --allow-escape-sequences to output it anyway)

squid-protocol and others added 3 commits October 9, 2026 17:06
…ed since #4820, same fix as #4823)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
squid-protocol added a commit that referenced this pull request Oct 9, 2026
…nfra (rerun once), not real

#4821's muninn failed on Docker Hub's 429 Too Many Requests while building a third-party action's image; the digest
called it real and the shepherd only posted a note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@squid-protocol
squid-protocol marked this pull request as ready for review October 9, 2026 22:15
@squid-protocol
squid-protocol merged commit e25d7f4 into main Oct 9, 2026
18 of 21 checks passed
@squid-protocol
squid-protocol deleted the feat/4723-feature-inventory branch October 9, 2026 22:15
squid-protocol added a commit that referenced this pull request Oct 9, 2026
…nces) (#4823)

* fix main: re-render carddemo-tranadd's evidence page; ci_digest fetches job logs with ANSI escapes

Main's ground-truth / full-suite went red at #4820: the evidence-refresh bot's refresh was computed on a main before
#4759 (which re-proved carddemo-tranadd), then squash-merged on top of it, leaving the record (CI oracle image
d7e387df360c) and its rendered page (local image 42d04bb08a2a) out of step. `evidence.py render` from the record;
no record changed. Every open PR inherited the failure (test_the_rendered_pages_are_current).

ci_digest: `gh api` refuses to print a job log holding terminal escapes unless passed --allow-escape-sequences, so
every log came back "unavailable"; clean() already strips them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci_digest: registry / Docker Hub rate limits and network resets are infra (rerun once), not real

#4821's muninn failed on Docker Hub's 429 Too Many Requests while building a third-party action's image; the digest
called it real and the shepherd only posted a note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci_shepherd: an infra failure is rerun up to 3 times, 15 min apart (a flake once)

Docker Hub's 429 / auth 504 on 2026-10-09 failed muninn on every PR for over an hour; one rerun was not enough.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
squid-protocol added a commit that referenced this pull request Oct 11, 2026
…nframe Ground Truth nightly) (#4920)

test_feature_inventory_cli_check (feature_inventory.py --all-burned --check)
runs only in the nightly Mainframe Ground Truth job, which could not reach it
until #4912 installed [full]; once it ran, two fixtures were stale.

- CBSA: bisected to #4885 exactly (fixture current at its parent, stale at it).
  CRECUST went from refused (COPY CEEIGZCT) to parsed: the copybook gap is
  gone, the two "unknown" CICS commands (EXEC CICS text inside a DISPLAY
  literal, misread before #4885's literal fix) are gone, and its statement /
  data-type / SQL counts are now the real parse (IF 503->478, DISPLAY
  156->145, ADD folded into ARITH, GET/WRITE +1).
- DBB Mortgage: data_types EDITED 59 -> 58 (same three programs). Stale
  already before #4885, i.e. drift since the fixture's creation (#4821); not
  attributed to one commit.


Claude-Session: https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

Readiness scanner: feature inventory extractor — every COBOL/CICS/SQL feature, data type and option an estate uses, with program counts

1 participant