Repository navigation
language lens: a .h is objective-c only with ObjC syntax of its own (Part of #5876) - #5957
Conversation
…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]>
|
No description provided. |
|
No description provided. |
|
PR #5957 @ eaabe57: 1 failed check(s) == shard 2 (1666363 LOC) (failure) -- real |
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.his objective-c only when its own text has ObjC syntax (@interface,@implementation,@protocol,@class,@end,#import; same set as the scorer'sOBJC_SYNTAX, line-leading). Two name/neighbour routes decided it without that:.min the extension tally), now gated on the syntax check;.hinextensions_needing_discriminator, so a folder of proven ObjC headers relabelled a plain header; the Plain C headers (SDL GL, Vulkan) classified as Objective-C #4546 guard did not cover this path), now cannot confer objective-c on a.hwithout the syntax.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
.hwhose language is decided by names or neighbours. Covered:.msame-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/.cppsame-stem anchors (see report).Evidence
tests/extraction/languages/test_objc_header_syntax_5876.py(our own code, intmp_path): plain-C andextern "C"headers beside same-stem.mand beside a folder of proven ObjC headers are not objective-c; ObjC headers (@interface, forward@class) beside.mstay objective-c. 3 of 5 fail without the fix.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 --fast7/7,--ratchets9/9.Golden drift (doom-ios, doomsday only; re-blessed)
IBGlue.h,iphone_doom.h,iphone_email.h,iphone_qgl_enumerants.h,iphone_wolf.hobjective-c -> c (none has ObjC syntax);wrong_language5 -> 0; objective-c 32 -> 27 files, c 199 -> 204.summary.classes360 -> 384:iphone_doom.h+16 andiphone_wolf.h+8 (the files are now parsed under the C rules: Cclass_startcounts every line-leadingstruct/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.fonts_macx.hobjective-c -> cpp (extern "C"guard, no ObjC);wrong_language1 -> 0. Verdict6 5/6 -> PERFECT. Itscallgraphexpected-fail entry stays (separate check, not this slice). The +14.8% function delta vs ctags is untouched.expected_fails:languageremoved for both;tests/tools/doom_rosetta_check.pydocstring updated.Remaining slices (#5876)
Shard 2 red: Tier 4 wall-clock flake (found after the first push)
doom-fx
convert/ConvSound1flipped its exclusion reason between runs, on main as well (LanguageDetector.inspectgaveplaintext~1/300, elseundeterminable). Cause:_tier_4_heuristic_discoverycompared 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.pypatchestime.timeto random values and asserts one verdict.Drift: crucible both legs clean (zero golden change). doom-ios
code/libtess/alg-outlinereasonUnsupported 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