Skip to content

language lens: a .h is objective-c only with ObjC syntax of its own (Part of #5876) - #5957

Merged
squid-protocol merged 2 commits into
mainfrom
churn/5876-20261022T0158Z
Oct 22, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/5876-20261022T0158Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Part of #5876 (does not close it). Slice 1: the .h -> objective-c language rule (doomsday, doom-ios).

Change

gitgalaxy/standards/language_lens.py: a .h is objective-c only when its own text has ObjC syntax (@interface, @implementation, @protocol, @class, @end, #import; same set as the scorer's OBJC_SYNTAX, line-leading). Two name/neighbour routes decided it without that:

A header that fails the check falls through to the normal content tiers (C / C++). Real ObjC headers keep their anchor and proof label.

Class

Class: a .h whose language is decided by names or neighbours. Covered: .m same-stem anchor, sibling vote (the two routes seen on the ports). The ecosystem-gravity route was already blocked by #4546 for objective-c. Not here: the .c/.cpp same-stem anchors (see report).

Evidence

  • tests/extraction/languages/test_objc_header_syntax_5876.py (our own code, in tmp_path): plain-C and extern "C" headers beside same-stem .m and beside a folder of proven ObjC headers are not objective-c; ObjC headers (@interface, forward @class) beside .m stay objective-c. 3 of 5 fail without the fix.
  • Real scans of doom-ios and doomsday (doom_rosetta_check.py), then the whole 44-port manifest: no other port drifts.
  • crucible_check.py (both legs): PASS, no golden-master drift. pr_gates --fast 7/7, --ratchets 9/9.

Golden drift (doom-ios, doomsday only; re-blessed)

  • doom-ios: IBGlue.h, iphone_doom.h, iphone_email.h, iphone_qgl_enumerants.h, iphone_wolf.h objective-c -> c (none has ObjC syntax); wrong_language 5 -> 0; objective-c 32 -> 27 files, c 199 -> 204. summary.classes 360 -> 384: iphone_doom.h +16 and iphone_wolf.h +8 (the files are now parsed under the C rules: C class_start counts every line-leading struct/union/enum, 18 and 9 such lines in the two headers (16 and 8 after the comment shield); the ObjC rule counted none of them, as they are plain C declarations. 16 + 8 = 24 = 384 - 360). Verdict 6/7 -> PERFECT.
  • doomsday: fonts_macx.h objective-c -> cpp (extern "C" guard, no ObjC); wrong_language 1 -> 0. Verdict6 5/6 -> PERFECT. Its callgraph expected-fail entry stays (separate check, not this slice). The +14.8% function delta vs ctags is untouched.
  • expected_fails: language removed for both; tests/tools/doom_rosetta_check.py docstring updated.

Remaining slices (#5876)

  1. cssdoom functions: 225 vs 215 ctags (+4.7%), 5 files; classify each delta, engine fix or recorded convention.
  2. sqldoom functions: 419 vs 376 (+11.4%), 6 files; same.

Shard 2 red: Tier 4 wall-clock flake (found after the first push)

doom-fx convert/ConvSound1 flipped its exclusion reason between runs, on main as well (LanguageDetector.inspect gave plaintext ~1/300, else undeterminable). Cause: _tier_4_heuristic_discovery compared wall-clock regex timings (friction_ratio) to decide a verdict: >5x rejected a clear density winner, <=0.5x let a tight margin through. On sub-millisecond scans that is noise. Fix (language_lens.py): drop the timing term; a margin >= 1.5x wins, a margin in [1.10, 1.5) is a collision (undeterminable). Test: test_tier4_no_wallclock_5876.py patches time.time to random values and asserts one verdict.
Drift: crucible both legs clean (zero golden change). doom-ios code/libtess/alg-outline reason Unsupported Format (.undeterminable) -> Unresolved Ambiguity (No Retainable Structure) is the now-deterministic value (the old golden had captured the timing outcome); only doom-ios re-blessed. Full doom manifest ok; doom-fx 6/6 stable.

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 21, 2026 22:05
…Part of #5876)

The same-stem .m sibling anchor and the same-folder sibling vote both labelled a
header objective-c from names/neighbours alone. Both now need @interface /
@implementation / @protocol / @Class / @EnD / #import in the file's text.
doom-ios and doomsday drop `language` from expected_fails; goldens re-blessed.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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 Oct 22, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 22, 2026 02:30
@squid-protocol
squid-protocol enabled auto-merge (squash) October 22, 2026 02:31
@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 Oct 22, 2026
@github-actions

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

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5957 @ eaabe57: 1 failed check(s)

== shard 2 (1666363 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/39711787821/job/119604758451
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[doom-fx]
errors:
fail-on-cache-miss: false
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:42: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[doom-fx] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
=========================== short test summary info ============================
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[doom-fx] - AssertionError:
doom-fx: 1 difference(s) from the golden
exclusion convert/ConvSound1: reason 'Unsupported Format (.undeterminable)' -> 'Unresolved Ambiguity (No Retainable Structure)'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "doom-fx: 1 difference(s) from the golden\n exclusion convert/ConvSound1: reason 'Unsupported Format (.undeterminable)' -> 'Unresolved Ambiguity (No Retainable Structure)'"
1 failed, 10 passed, 9 deselected in 136.83s (0:02:16)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 2 (1666363 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: agentic-cobol-doom-codex,doom-ascii,doom-fx,doom-scheme,doom3do,doomretro,fps-cob,gzdoom,mochadoom,nugget-doom,odamex
T0: 1792636315
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/e54b055c-5b97-432b-a269-3b888595f972' 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-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 22, 2026
@squid-protocol
squid-protocol merged commit 157ad69 into main Oct 22, 2026
92 of 93 checks passed
@squid-protocol
squid-protocol deleted the churn/5876-20261022T0158Z branch October 22, 2026 02:39
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