Skip to content

Feature inventory counts a member held in several stages once; production stage stays (Part of #8412) - #8929

Merged
squid-shepherd[bot] merged 3 commits into
mainfrom
churn/8412-20261121T1812Z
Nov 21, 2026
Merged

squid-shepherd[bot] merged 3 commits into
mainfrom
churn/8412-20261121T1812Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8412 (checklist line: change-management stage trees and plain listings)

Checklist: done [c:81671baa]

Note on the DBB line [c:19982422]: already worked on main (#8573 cobol_dependencySearch, #8869 recursive masks). What is left there needs a zBuilder YAML format reference first (see #8869 Remaining slices), so this PR takes the next line's open slices.

What

Closes the two Sibling gaps #8574 left on the stage-tree line:

  1. Feature inventory counted every stage copy. inventory.scan_estate excluded listings (Feature inventory: compile listings and expanded copies are still counted as programs (follow-up to #8112) #8411) but never ran the census's duplicate-PROGRAM-ID rule, so one Endevor / ChangeMan member held in DEV / QA / PROD was counted three times. It now excludes the duplicates the same way (reported under excluded_listings, reason duplicate PROGRAM-ID (exact|near copy ...)).
  2. Which stage stays the program. Was "first sorted path" (DEV before PROD). Now the first path under a production stage directory (PROD, PRD, PRODUCTION, LIVE, matched on directory names only, never the file name) stays; with no production stage the first sorted path stays, as before.

To share the rule, source_lines, fixed_format_text, program_id and duplicate_reasons moved from tests/tools/cics_census.py to gitgalaxy/tools/readiness/listings.py (already home of listing_reason); cics_census re-exports them, so its callers are unchanged.

Evidence

  • tests/tools/test_change_management_listings_8412.py: production stage stays whatever it is called and wherever it sorts (4 names), no production stage keeps first-sorted, a PROD.cbl file name is not a stage, and an inventory run over an authored Endevor tree counts ORDPOST once (PROD) and lists DEV / QA as duplicates. The old DEV-stays assertions are updated.
  • tests/cobol_mainframe/test_feature_inventory.py: its synthetic estate gave all 11 snippets PROGRAM-ID. P.; each now gets its own (they are different programs).
  • Committed feature-inventory fixtures: unchanged. The nightly-gated fixture tests (GITGALAXY_NIGHTLY=1, all burned estates) pass, so no burned estate holds a duplicate PROGRAM-ID.
  • 457 passed / 7 skipped over the inventory, assess, census (8112 + 8412), gap-prevalence and det-macro tests; audit_check.py all clear; pinned ruff 0.17.4 format and check clean on the changed files.
  • Not run: pr_gates --ratchets / golden bless (no detector or language rule changed; code runs only in the readiness tools).

Class / Sibling gaps

Class: a COBOL source file in an estate that is not the estate's own program, because it is a stage copy or a compile listing. Members: banner listing (handled, #8112); listing path (handled); dense numbered listing 20+ lines (handled); short numbered listing (handled, #8574); same member in several stages, census (handled, #8574); same member in several stages, feature inventory (handled, this PR); which stage stays the program (handled, this PR: production stage first). Sibling gaps: (1) other readers of the estate's program list (gap_prevalence, era_distribution, assess) go through scan_estate, so they inherit the dedupe; no separate reader walks the tree itself, none found. (2) A stage tree whose production stage has a name outside PROD / PRD / PRODUCTION / LIVE (a site-specific code such as P01) falls back to first-sorted: not detectable by shape, out of scope. (3) A listing with no numbers, banner or path is not detectable by shape: out of scope.

Remaining slices

None for this line.

Lessons for agents

  • A COBOL PROGRAM-ID with an underscore (DATA_TYPES) is not valid for the det parser and silently drops that program's data types from an inventory: derive a test PROGRAM-ID with hyphens.
  • ruff check <files> alone misses the per-file rules (B905 here); audit_check.py reports it.

Doc-refs fixes: none.

🤖 Generated with Claude Code

…oduction stage stays (Part of #8412)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 21, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 21, 2026 18:20
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 21, 2026 18:33
@squid-shepherd
squid-shepherd Bot disabled auto-merge November 21, 2026 19:09
@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #8929 @ 1c1882c: 2 failed check(s)

== equivalence-e2e (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/44934962410/job/136949078936
repro: python tests/tools/pr_gates.py --fast
errors:
##[error]Process completed with exit code 1.
log tail:
##[endgroup]
Secret source: Actions
Cache mode: write
Prepare workflow directory
Prepare all required actions
Complete job name: equivalence-e2e
##[group]Run echo "plan: $PLAN, db2 $DB2_PLAN ($PLAN_RESULT), shards: $SHARDS, db2: $DB2"
echo "plan: $PLAN, db2 $DB2_PLAN ($PLAN_RESULT), shards: $SHARDS, db2: $DB2"
# runner-minutes of this run so far (every finished job but this one), for the PR body / the nightly trend
gh api --paginate "repos/$REPO/actions/runs/$RUN_ID/jobs?per_page=100" --jq '.jobs[] | select(.name != "equivalence-e2e" and .completed_at != null) | [.name, ((.completed_at | fromdateiso8601) - (.started_at | fromdateiso8601))] | @TSV' > j
python3 - <<'PY' >> "$GITHUB_STEP_SUMMARY"
rows = [ln.rstrip("\n").split("\t") for ln in open("jobs.tsv", encoding="utf-8") if ln.strip()]
total = sum(float(s) for _, s in rows)
print("## Equivalence E2E runner time")
print("| job | seconds |\n|---|---|")
print("".join(f"| {n} | {float(s):.0f} |\n" for n, s in rows), end="")
print(f"\n**{total / 60:.1f} runner-minutes** across {len(rows)} job(s)")
PY
# #4935: a tree the PR run of this workflow proved green: the gate skipped the plan and every job after it
if [ "$SKIP" = "true" ]; then test "$PLAN_RESULT" = "skipped" && test "$SHARDS" = "skipped" && test "$DB2" = "skipped"; exit; fi
test "$PLAN_RESULT" = "success"
if [ "$PLAN" = "none" ]; then test "$SHARDS" = "skipped" && test "$DB2" = "skipped"; exit; fi
test "$SHARDS" = "success"
# #6664: a skipped db2 is green only when the plan said none (no input of the Db2 files changed)
if [ "$DB2_PLAN" = "none" ]; then test "$DB2" = "skipped"; else test "$DB2" = "success"; fi
shell: /usr/bin/bash -e {0}
env:
PLAN: run
DB2_PLAN: none
PLAN_RESULT: success
SKIP:
SHARDS: failure
DB2: skipped
GH_TOKEN: ***
REPO: squid-protocol/gitgalaxy
RUN_ID: 44934962410
##[endgroup]
plan: run, db2 none (success), shards: failure, db2: skipped
##[error]Process completed with exit code 1.
Cleaning up orphan processes

== shard 1/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/44934962410/job/136941660137
repro: tests/tools/box/heavy-run.sh python tests/tools/proof_sweep.py --det-only --skip-db2 --cases --work /tmp/gitgalaxy-scratch/ci-digest/sweep
failing tests: tests/cobol_mainframe/test_address_areas_e2e_5079.py::test_the_sized_areas_are_proven_against_gnucobol tests/cobol_mainframe/test_bll_cells_5119.py::test_a_chained_storage_program_is_proven_against_gnucobol tests/cobol_mainframe/test_bll_cells_5119.py::test_a_cleared_cell_and_a_three_cell_record_are_proven_against_gnucobol tests/cobol_mainframe/test_bll_cells_5119.py::test_a_read_set_into_a_cell_is_proven_against_gnucobol tests/cobol_mainframe/test_bll_cells_5119.py::test_an_address_in_a_table_and_a_qualified_field_is_proven_against_gnucobol tests/cobol_mainframe/test_equivalence.py::test_carddemo_intcalc_is_equivalent_end_to_end tests/cobol_mainframe/test_equivalence.py::test_carddemo_posttran_is_equivalent_end_to_end tests/cobol_mainframe/test_equivalence_cics_dli.py::test_planned_dli_statuses_fire_the_same_on_both_runtimes_and_a_qualified_gnp_that_finds_nothing_is_ge tests/cobol_mainframe/test_equivalence_environments.py::test_intcalc_holds_in_every_environment tests/cobol_mainframe/test_equivalence_inputs.py::test_the_hand_written_ports_hold_on_generated_inputs[carddemo-readxref-generated-expect3] tests/cobol_mainframe/test_equivalence_inputs.py::test_the_intcalc_port_holds_on_generated_inputs tests/cobol_mainframe/test_link_commarea_untouched_sign_7485.py::test_the_untouched_signed_field_comes_back_as_sent[S9(10)V99_SIGN_LEADING] tests/cobol_mainframe/test_link_commarea_untouched_sign_7485.py::test_the_untouched_signed_field_comes_back_as_sent[S9(8)_SIGN_LEADING_SEPARATE] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-adminmenu] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-billpay] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-cardlist] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-cardview] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-dailyval] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-readcard] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-readcust] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-readxref] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-signon] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-tranlist] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-tranview] tests/cobol_mainframe/test_porting_loop_tooling.py::test_the_loops_committed_ports_are_proven[carddemo-userdel] tests/cobol_mainframe/test_post_wait_converse_e2e_5079.py::test_a_post_wait_converse_program_is_proven_against_gnucobol[post-wait-converse] tests/cobol_mainframe/test_td_openstatus_e2e_5168.py::test_a_set_and_inquire_tdqueue_program_is_proven_against_gnucobol tests/cobol_mainframe/test_td_queue_e2e_5079.py::test_a_td_queue_program_is_proven_against_gnucobol tests/cobol_mainframe/test_td_queue_e2e_5168.py::test_a_td_queue_program_is_proven_against_gnucobol tests/cobol_mainframe/test_web_converse_bare_method_7525.py::test_a_bare_keyword_program_is_proven_against_gnucobol
errors:
fail-on-cache-miss: false
E AssertionError:
tests/cobol_mainframe/test_address_areas_e2e_5079.py:132: AssertionError
tests/cobol_mainframe/test_bll_cells_5119.py:822: AssertionError
tests/cobol_mainframe/test_link_commarea_untouched_sign_7485.py:168: AssertionError
E AssertionError: otrtlicController.java
tests/cobol_mainframe/test_equivalence.py:214: AssertionError
tests/cobol_mainframe/test_equivalence.py:196: AssertionError
tests/cobol_mainframe/test_equivalence_cics_dli.py:172: AssertionError
tests/cobol_mainframe/test_porting_loop_tooling.py:241: AssertionError
tests/cobol_mainframe/test_equivalence_environments.py:84: AssertionError
tests/cobol_mainframe/test_equivalence_inputs.py:127: AssertionError
tests/cobol_mainframe/test_post_wait_converse_e2e_5079.py:239: AssertionError
tests/cobol_mainframe/test_equivalence_inputs.py:202: AssertionError
tests/cobol_mainframe/test_td_openstatus_e2e_5168.py:186: AssertionError
tests/cobol_mainframe/test_web_converse_bare_method_7525.py:131: AssertionError
tests/cobol_mainframe/test_td_queue_e2e_5079.py:152: AssertionError
tests/cobol_mainframe/test_td_queue_e2e_5168.py:184: AssertionError
FAILED tests/cobol_mainframe/test_address_areas_e2e_5079.py::test_the_sized_areas_are_proven_against_gnucobol - AssertionError:
FAILED tests/cobol_mainframe/test_bll_cells_5119.py::test_a_chained_storage_program_is_proven_against_gnucobol - AssertionError:
FAILED tests/cobol_mainframe/test_link_commarea_untouched_sign_7485.py::test_the_untouched_signed_field_comes_back_as_sent[S9(10)V99_SIGN_LEADING] - AssertionError:
FAILED tests/cobol_mainframe/test_equivalence.py::test_carddemo_posttran_is_equivalent_end_to_end - AssertionError: otrtlicController.java
FAILED tests/cobol_mainframe/test_equivalence.py::test_carddemo_intcalc_is_equivalent_end_to_end - AssertionError: otrtlicController.java
FAILED tests/cobol_mainframe/test_bll_cells_5119.py::test_a_cleared_cell_and_a_three_cell_record_are_proven_against_gnucobol - AssertionError:
FAILED tests/cobol_mainframe/test_link_commarea_untouched_sign_7485.py::test_the_untouched_signed_field_comes_back_as_sent[S9(8)_SIGN_LEADING_SEPARATE] - AssertionError:
... 24 more
log tail:
pythonLocation: /opt/hostedtoolcache/Python/3.12.16/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.16/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.16/x64/lib
JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.21-9/x64
JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.21-9/x64
MAVEN_ARGS: -ntp
GITGALAXY_ORACLE_PREBUILT: 1
##[endgroup]
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Uploading artifact: test-times-equivalence-e2e-shard-1.zip
Beginning upload of artifact content to blob storage
Uploaded bytes 64482
Finished uploading artifact content to blob storage!
SHA256 digest of uploaded artifact is 5bc47ce1390f7f62138de023e88da67d294cd7067155c14063033e2fcc7755ff
Finalizing artifact upload
Artifact test-times-equivalence-e2e-shard-1 successfully finalized. Artifact ID 14720975473
Artifact test-times-equivalence-e2e-shard-1 has been successfully uploaded! Final size is 64482 bytes. Artifact ID is 14720975473
Artifact download URL: https://github.com/squid-protocol/gitgalaxy/actions/runs/44934962410/artifacts/14720975473
Post job cleanup.
Post job cleanup.
[command]/usr/bin/git version
git version 2.56.1
Temporarily overriding HOME='/home/runner/work/_temp/04490aa8-63e0-445c-a9cd-1c30471de7df' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-shepherd squid-shepherd Bot added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 21, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Nov 21, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 21, 2026 20:50
@squid-shepherd squid-shepherd Bot removed the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Nov 21, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd

Copy link
Copy Markdown
Contributor

CI shepherd: the head of this PR (c4183c1) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then). Until then it is a draft and runs the cheap audits only; re-adding the label marks it ready, which starts the full set on that head.

@squid-shepherd squid-shepherd Bot removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 21, 2026
@squid-shepherd
squid-shepherd Bot marked this pull request as draft November 21, 2026 21:22
auto-merge was automatically disabled November 21, 2026 21:22

Pull request was converted to draft

@squid-shepherd squid-shepherd Bot added the shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md label Nov 21, 2026
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Nov 21, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 21, 2026 21:25
@squid-shepherd squid-shepherd Bot added the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 21, 2026
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 21, 2026 21:38
@squid-shepherd squid-shepherd Bot removed the shepherd:retrying Bot: an infra/flake rerun is pending on this head. Guide: docs/ci.md label Nov 21, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot merged commit 92e7fe1 into main Nov 21, 2026
106 of 130 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8412-20261121T1812Z branch November 21, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant