Skip to content

Scheme counts each case clause; Dart break/continue are boundaries, not branches (Part of #6097) - #6700

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6097-branch-arms
Oct 26, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/6097-branch-arms

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6097 (DOOM study: branch-count disagreements against the C original).

Checklist: done [c:125793a0]
Checklist: done [c:a3dcdd68]

What changed

  • Scheme (languages/scheme.py): each case clause head [(d ...) body] (a bracketed datum list: a lone symbol, or literals first) is one branch arm, as C counts each case X:. A cond test ([(null? x) ..], [(f a b) ..]) is not matched.
  • Dart (languages/dart.py): break/continue leave branch for structural_boundaries beside return, as docs/branch_rule_contract.md (branch still counts the break/continue family: the unconditional transfers #2822 deferred #2832) did for the 12 other languages and C has them.
  • docs/branch_rule_contract.md records both; tests/extraction/languages/test_branch_arms_6097.py pins them. Golden masters re-blessed (both legs, golden-lock.sh).

Class / Sibling gaps

Class: a language's branch count disagrees with C's for the same construct (clause arms uncounted, or unconditional transfers counted). Handled: scheme case bracket clauses, dart break/continue.
Sibling gaps (member, status, why not here):

  • apex, cpp, csharp (also yield break), perl (next/last/redo), php, powershell, rust, swift: still list break/continue-style transfers in branch (contract says boundaries). One language file each plus its own bless: over the 5-file limit; check each language's structural_boundaries first.
  • yacc lists break|continue in a different rule (not branch); out of scope.
  • Scheme paren-style ((1 2) ..) case clauses: measured on the Chez/Racket crucible corpus, 24 true / 12 false hits at line start, so not added; recall there needs a case-anchored mechanism.
  • Scheme cond clauses and else/multi-symbol datum lists [(a b) ..] are not counted (C counts else if, default); a separate decision.

Facts checked

  • DOOM doom-scheme clause heads: 281 of 351 true case clauses matched, 8 false (case-lambda heads); all 351 are bracket style. On the Chez/Racket corpus: 321 true, 269 false (mostly syntax-case/syntax-rules clauses, also arms).
  • scope_check.py --expect scheme,dart: dart 1386 and scheme 321 diffs per leg, plus 55 repo-wide rollup fields derived from them; nothing in another language.
  • pr_gates --fast 7/7 and --ratchets 9/9 pass (ruff local 0.16 vs CI 0.17.1 warning; the gate used the pinned 0.17.1). Tree-wide guard tests (278) pass.

Remaining slices

Checklist lines [c:26a6195d], [c:901b4871], [c:7aa491be], [c:b68f4dd4], [c:5b53dc02] untouched.

Lessons for agents

None.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 26, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review October 26, 2026 01:43
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 26, 2026 01:43
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd

Copy link
Copy Markdown
Contributor

PR #6700 @ 1a208ae: 1 failed check(s)

== shard 1 (1669449 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40255635351/job/121356881099
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[dartdoom]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[dartdoom] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
file test/boss_ai_test.dart: func_hash 'cf2e842db8c6aced' -> '78a21e610a7a6f23'
file test/music_smoke_test.dart: func_hash 'd71d076866ff66e6' -> '835e0df2e118ab60'
file test/render_masked_fuzz_test.dart: func_hash '2612a7d9716308b5' -> '35d68bbb83f9f33b'
file test/sound_smoke_test.dart: func_hash '9ecdb3f8671f1570' -> '74c21262c7282ff3'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "dartdoom: 37 difference(s) from the golden\n file lib/doom/am_map.dart: func_hash '8dec377071244a34' -> '9aa027533f8...716308b5' -> '35d68bbb83f9f33b'\n file test/sound_smoke_test.dart: func_hash '9ecdb3f8671f1570' -> '74c2126
1 failed, 9 passed, 26 deselected in 199.71s (0:03:19)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 1 (1669449 LOC): ${s}s" >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
DOOM_SPEEDRUN_WORK: /home/runner/work/gitgalaxy/gitgalaxy/../doom-work
DOOM_ROSETTA_PORTS: chocolate-doom,cssdoom,dartdoom,doomgeneric,doomsday,edge-classic,mood,room4doom,rust-doom,sdl-doom
T0: 1792979227
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
##[endgroup]
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/68778346-977e-4076-9105-6fdc14710bae' 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/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 Oct 26, 2026
@squid-shepherd
squid-shepherd Bot merged commit aa9960d into main Oct 26, 2026
122 of 124 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/6097-branch-arms branch October 26, 2026 01:56
squid-protocol added a commit that referenced this pull request Oct 26, 2026
…gine change (Part of #5781)

Drift came from main (#6700: Scheme case clauses, Dart break/continue), not this PR.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
squid-shepherd Bot pushed a commit that referenced this pull request Oct 26, 2026
…rt of #5781) (#6704)

* Backfill the crystal language cost record: engine and corpus rows (Part of #5781)

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

* Re-bless doom-rosetta goldens dartdoom and doom-scheme for #6700's engine change (Part of #5781)

Drift came from main (#6700: Scheme case clauses, Dart break/continue), not this PR.

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

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
squid-shepherd Bot pushed a commit that referenced this pull request Oct 26, 2026
squid-shepherd Bot pushed a commit that referenced this pull request Oct 30, 2026
…prose (follow-up to #6097) (#7147)

* DOOM study: rescan at 6c7c6c1, one scan for every table, refresh the prose (follow-up to #6097)

Rescanned all 44 licensed ports at main 6c7c6c1 (42/44 PERFECT; callgraph
passes everywhere after #7019) and regenerated the sfs subway table on the same
scans, so no table mixes scan dates any more.

Prose: drop the defect and "not done" text that #6700/#6703/#6705/#6749 fixed,
state the sqldoom/cssdoom #5876 ruling, explain the median-0 complexity of the
JVM/Rust ports (method size, measured), fix the dist range and date line.
study_report.py: the scorecard's last column was "functions now" but counts only
ctags-language files (doom-fx read 1, dartdoom 0); relabel it and say so.

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

* DOOM study: read wiring similarity against its floor; cross-subsystem wiring (follow-up to #6097)

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

* DOOM study: subway table reads cross wiring over a shuffled null; negative controls

study_report.py shows sfs's cross_wiring, its shuffled-placement null and the gap
when subway.csv has them (sfs PR #21), sorted by the gap; old CSVs keep the old table.
Prose: raw wiring flatters (doomf77 0.91 is +0.05 over null); doom-scheme and gore
keep cross wiring +0.51/+0.50 over null like chocolate-doom; JVM/C#/Fortran ports
and reimplementations show none. Negative controls (WinQuake, Quake II, Lua at the
same engine) give the null levels; graph-shape distance does not separate them.

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

* DOOM study: restructure as findings first, tables as appendices; twin cross-check, controls, blind placement

Findings lead (twins 93% precise vs source text at 6c7c6c1; textscreen shared sideways;
Scheme/Go wiring above chance and blind placement kappa 0.50/0.31/0.26; names kept,
bodies rewritten; extraction accuracy), then what this does not show, then Appendices
A-G (the generated tables, unchanged) and a new hand-quoted Appendix H (twin
cross-check, descent, unrelated programs).

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

---------

Co-authored-by: Joe Esquibel <[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

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant