Skip to content

[experiment A] fix(crosscheck): read replaced records of section COPY REPLACING; update drops stale entries (#4472) - #4481

Merged
squid-protocol merged 11 commits into
mainfrom
fix/4472-crosscheck-copy-replacing
Oct 5, 2026
Merged

squid-protocol merged 11 commits into
mainfrom
fix/4472-crosscheck-copy-replacing

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #4472. Stacked on #4471 (base: train/train-4457-4458; retarget to main once #4471 merges).

  • Engine adapter: for a record the translator laid out, prefer the replaced root GalaxyIR built (ef.records / copied_items, matched by replaced name + level) over the copybook's own data_items entry.
  • update: the --corpus filter was inverted, so a full run kept every stale entry; now a full run re-judges all, --corpus only its corpora.
  • Ledger: -364 entries (328 engine-section-copy-replacing gone; the cause remains for 0 ids but INQACC/DELACC DFHCOMMAREA ids that were really POINTER width are re-keyed to pointer-width). 1 engine-section-copy-replacing ledger entry reassigned.
  • Tests: test_update_without_corpus_drops_stale_entries, test_engine_extras_lays_out_the_replaced_records_of_a_section_copy. fact_crosscheck check passes; lint/audits gates pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz

squid-protocol and others added 10 commits October 5, 2026 10:44
…the 01 before the COPY (#4458)

A COPY after the last entry of a nested group whose member opens its own 01 was moved to
section_copies (#4330), which the leaf-closing check in _expanded_children did not read, so the
continuation was counted under the preceding 01 as well as the copied record.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
…01 records (#4457)

The extractor now records the COPY ... REPLACING statements no entry carries (copy_statement_data);
GalaxyIR materializes the replaced records of those, and of the ones an entry carried that open their
own 01 (#4330), as program records (EngineFile.records, with copied_items), and hides the unreplaced
copybook records from that program.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
…InqaccDfhcommarea); record re-proven

#4457 materializes INQACC's section-level COPY ... REPLACING, so the record is
DFHCOMMAREA and the generated DTO is InqaccDfhcommarea. Pure rename in the
model-written port (5 occurrences, no logic change), approved by the owner as
the precedent cb9408f did for lgapvs01: the sanctioned regeneration path is
blocked by #4476 (porting_loop --reuse). Re-proven with evidence.py prove:
runTask passes; java-facade 13/14 is the failure baselined in #4455 for #4465
(ABNDPROC is a det stub). All 45 committed ports compile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
…rds; update drops stale entries (#4472)

The engine adapter read the copybook's own item from data_items; GalaxyIR (#4457) builds the replaced
records into ef.records / copied_items, so use those. update kept every ledger entry on a full run
(inverted --corpus condition); now a full run re-judges all. Ledger lowered by 364 entries.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 5, 2026 17:12
@squid-protocol
squid-protocol merged commit 4d4a237 into main Oct 5, 2026
31 of 58 checks passed
@squid-protocol
squid-protocol deleted the fix/4472-crosscheck-copy-replacing branch October 5, 2026 17:13
squid-protocol added a commit that referenced this pull request Oct 5, 2026
* det: take COPY resolution from the engine (#4468)

The engine owns COPY resolution (#4273, fact_ownership.md). The det translator
no longer searches directories for an estate member. Every COPY in an estate
file (the program's own and its copybooks') takes the file the engine
resolved: GalaxyIR.copy_resolution (copy_deps + library-names per importer,
SYSLIB order, COPY ... IN), read from the port ticket (the skeleton's new
copy_edges / copy_gaps / copy_collisions) or GalaxyIR. The two resolutions
can no longer diverge, so #4467's CopyDisagrees is gone. Refused by name
(CopyUnresolved): engine collisions and gaps, several files, an estate file
the engine resolved nothing for (#4460), an engine member never expanded
(#4459). Text expansion and layout arithmetic are unchanged.

The cross-check's translator side takes the engine's resolution too. Ledger
816 -> 702: 131 entries gone (all 18 copy_resolution, all 78 translator
offsets), 17 new estate-crucible status refusals with causes (#4486
collisions, #4459, #4460, #4462). A full `update` now drops stale entries
(#4472 part 2).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VrujbRefDqQ8ptAwTBQTaz

* crosscheck: regenerate the ledger on main (455 -> 341, #4468)

fact_crosscheck.py update (full run) on top of #4481's ledger: the same 131
entries drop and the same 17 estate-crucible refusals enter as in the #4468
commit (816 -> 702 on the old base); the 17 re-assigned to their causes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test: det COPY-resolution helper is separator-independent (Windows, #4468)

_from split the member path on "/estate/"; on Windows ln.file uses
backslashes. Split its posix form instead. Production det/source.py and
galaxy_ir.py already compare posix paths (as_posix / relative_to).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

fact cross-check: engine adapter misses section-COPY-REPLACING records (329 stale ledger entries); update needs --corpus to drop entries

1 participant