Skip to content

Det ports declare themselves; the aperture admits declared ports past the generated-noise gates - #4164

Merged
squid-protocol merged 1 commit into
mainfrom
feat/det-port-intent-header
Oct 2, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
feat/det-port-intent-header

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Why

A default GitGalaxy scan excluded 45 of the 49 det ports as machine-generated noise: 4 via the saturation gate (lines over 500 characters) and the rest via the lexical-monotony gate. A migrated estate would look almost empty.

What

  • Emitter (det/program.py): each emitted service now has a first-line comment, // gitgalaxy-det-port: COBOL <PROGRAM> (<source>), translated by rule, statement for statement. It also writes storage-image Base64 literals as one 400-character piece per line instead of 30,000-character runs. Both are formatting only.
  • Aperture (core/aperture.py): declared_port() reads that line, only from the first line of a .java file. A declared port passes three gates:
    • Gate 4.1, saturation, up to the new DECLARED_PORT_MAX_LINE_LENGTH (5000);
    • Gate 4.3, the generator signature;
    • Gate 5.1, lexical monotony.
  • Trust: the line is a self-declaration, so it lifts only noise filters. The binary, embedded-payload, amalgamation, size and secrets gates still apply. A forged header can only admit code to the scan, where every sensor reads it; it cannot hide anything. Performance is bounded by the 5000-character cap and the per-file timeout. This is documented in wiki 02-03 under "Declared ports".
  • Tests: header present (monotony, long line, generator words) admitted; same file without header still blocked; header plus a line over 5000 characters, binary, hex payload, or more than 30K lines still blocked; a secrets file still shunted.
  • Docs: wiki 02-03, and a det-port SKILL.md lesson.

Validation

  • tests/core_engine/test_aperture.py: 24 passed.
  • det_port.py run carddemo-report cbsa-inqacc genapp-lgicdb01 all PROVED with the header and wrapped images. Corpt00c had a 106K-character image line.
  • Plain galaxyscope (no wrapper) on all 49 freshly emitted det ports: CardDemo 28/28, CBSA 8/8, GenApp 13/13 scanned, 0 excluded.
  • Full det sweep (proof_sweep.py --det-only): result posted below.
  • tests/ruff_audit.py --ci: no new findings.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

…t the generated-noise gates

The det emitter writes a first-line comment on each service it emits
(// gitgalaxy-det-port: COBOL <PROGRAM> (<source>), ...) and puts storage-image
literals one 400-character piece per line. GitGalaxy's aperture reads that line
(declared_port: .java, first line only) and lifts Gates 4.1 (to
DECLARED_PORT_MAX_LINE_LENGTH, 5000), 4.3 and 5.1 for it. Binary, payload,
amalgamation, size and secrets gates are untouched: a forged header can only admit
code to the scan, never hide it. Before: a default scan excluded 45 of 49 det
ports; after: 49 of 49 scanned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

squid-protocol added a commit that referenced this pull request Oct 2, 2026
…4163/#4164

Spearman now gives tied values their average rank (I/O rho 0.24, not -0.03);
records the I/O and IPC agreement after #4163 (0.87 / 0.84).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
squid-protocol added a commit that referenced this pull request Oct 2, 2026
* docs(wiki): COBOL <-> Java scan parity -- what GitGalaxy sees before and after a port

49 programs from CardDemo, CBSA and GenApp scanned as COBOL, as the proven
deterministic Java port and (23 CardDemo programs) as the model-written port:
structure keeps its rank (functions rho 0.94, branches 0.83, mutations 0.76),
size and token mass do not, I/O moves into the cobolrt runtime, risk scores
rank within one language only. Method, tables, scanner and translation lessons,
and the follow-ups in progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

* docs(wiki): scan parity -- tie-corrected Spearman, follow-ups #4162/#4163/#4164

Spearman now gives tied values their average rank (I/O rho 0.24, not -0.03);
records the I/O and IPC agreement after #4163 (0.87 / 0.84).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

* docs(wiki): scan parity -- COTRTLIC keeps one hole (dynamic CALL); 48 of 50 cases prove

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@squid-protocol
squid-protocol merged commit 582caf5 into main Oct 2, 2026
40 checks passed
@squid-protocol
squid-protocol deleted the feat/det-port-intent-header branch October 2, 2026 19:33
@squid-protocol

Copy link
Copy Markdown
Owner Author

Full det sweep with the header and wrapped images (proof_sweep.py --det-only): det: 48/50 proven, sweep: as expected. The two not proven are the KNOWN_UNPROVEN cases (carddemo-cardupdate #4085, carddemo-intcalc-generated D1).

🤖 Generated with Claude Code

https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

squid-protocol added a commit that referenced this pull request Oct 2, 2026
…Db2, oracle register, 05-19) (#4166)

* docs: COBOL-to-Java capability docs brought up to date (48 det ports proven, Db2, oracle register)

- README, det_port_design, porting loop, cobol_to_java README: 48 programs proven as det ports (27
  CardDemo, 8 CBSA, 13 GenApp; 17 cases on Db2), the two cases not proven on purpose, TRUNC(STD),
  the Db2 unit of work and its limits, proof_sweep.py, the oracle register's C9 / D1 / M2 / Q3.
- statement_inventory.md regenerated (2026-10-02): ASSIGN PROGRAM / INVOKINGPROG, GET COUNTER, DELAY,
  ENQ / DEQ left the holes; EXEC SQL is counted H by definition though det-port translates it.
- oracle_assumptions.md: Q3 (one Db2 unit of work per CICS task, batch autocommits) and Q4 (positioned
  UPDATE / DELETE no longer refused) corrected.
- New wiki page 05-19 (proven ports, harness, register, limits); cookbooks and 05-02 / 05-04 / 05-05 /
  05-06 / 01-04 / map-cobol-monoliths say how logic is ported and proven, and drop stale claims
  (PostgreSQL-only, LLM-only logic, TODO stub text).
- cobol-modernization skill: closed ownership table replaced; points to the det-port skill.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

* docs(wiki): scan parity -- #4164 merged: a plain scan admits all 49 det ports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

* docs(wiki): 05-19 links scan parity and the declared-port header (#4164)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

* docs: det_survey.md regenerated (2026-10-02): 97.8% of 17,224 statements, no EXEC SQL holes

Re-run of tests/tools/det_survey.py over the six corpora (sequential; javac plugin jars from another
project's ~/.m2 left off the classpath). 21 programs proven outside CardDemo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ

---------

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.

1 participant