Repository navigation
Fortran tri-comparison sweep: fix prism.py column-7 bug + ctags kind gaps - #2078
Merged
Merged
Conversation
tri-comparison-ledger-sweep pass against fortran's WRF corpus, all 5 open ledger shapes validated: - prism.py's _strip_positional_comments applied COBOL's column-7 indicator check to Fortran too. Real fixed-form Fortran 77 has no column-7 comment convention (only column 1), so a 3-space-indented ` FUNCTION foo(...)` had its whole declaration line erased as a bogus comment (the 'C' in FUNCTION lands on column 7). Silently dropped in_use_for_config (module_configure.F:353) and first_loc_integer (module_domain.F:1693). Gated the check to cobol_mode only. - ctags_reader.py's CTAGS_CLASS_KINDS['fortran'] was missing 'm'/'i'/'S'/'b' (module/interface/submodule/blockData), same bug shape as the already- documented cpp/csharp gaps -- ctags class recall on this corpus jumped from 3/11 to 11/11. - ctags_reader.py's CTAGS_FUNC_KINDS['fortran'] was missing 'p'/'e' (program/entry), matching GitGalaxy's own func_start scope. Filed #2077 for a separate, still-open args-counting defect (the args regex undercounts a parameter list when an embedded CPP #if guard's own ')' appears before the real signature close) -- needs a depth-aware paren scanner, left for its own follow-up. Both golden masters re-blessed after a full crucible_check.py pass against the ~80-repo corpus (134 diffs, all traced to fortran/wrf's recovered functions plus expected downstream ripple). Added docs/language_status/ fortran.md and a new Claim 7 citation in why_gitgalaxy_beats_ast_here.md. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tri-comparison-ledger-sweeppass against fortran's WRF corpus (docs/self_scan/tri_comparison_ledger.json) — all 5 open discrepancy shapes investigated and validated.prism.py's_strip_positional_commentsapplied COBOL's column-7 comment-indicator convention to Fortran too. Real fixed-form Fortran 77 has no column-7 comment marker (only column 1) — a 3-space-indentedFUNCTION foo(...)puts theCofFUNCTIONon column 7, silently erasing the whole declaration line as a bogus comment beforefunc_startever ran. Droppedin_use_for_config(module_configure.F:353) andfirst_loc_integer(module_domain.F:1693). Fixed by gating the column-7 check tocobol_modeonly.tests/tools/ctags_reader.py's fortranCTAGS_CLASS_KINDSwas missingm/i/S/b(module/interface/submodule/blockData — ctags class recall on this corpus was 3/11, now 11/11) andCTAGS_FUNC_KINDSwas missingp/e(program/entry) — both the same bug shape as the already-documented cpp/csharp kind-map gaps in that file.argsregex has no paren-depth awareness and undercounts a parameter list when an embedded CPP#if (...)guard's own closing paren appears before the real signature close (confirmed on a genuine 677-parameter WRF subroutine). Needs a depth-aware paren scanner, out of scope for a same-pass fix.docs/language_status/fortran.md(sections 1-8 via thelanguage-statusskill, §9 tri-comparison written by hand) and a new evidence citation on Claim 7 indocs/why_gitgalaxy_beats_ast_here.md.update_golden_master.py --yes, both modes) after a fullcrucible_check.pypass against the ~80-repo corpus — 134 diffs, 100% traced tofortran/wrf's recovered functions and their expected downstream ripple (global aggregates, topological coordinates, onecobolfile's relative-risk percentage shifting 0.01pp from a corpus-wide denominator).Test plan
tests/extraction/languages/test_fortran.py+test_fortran_strict.py+test_cobol.py+test_cobol_strict.py— 280 passedtests/core_engine/test_prism.py+test_detector.py— 182 passedpython tests/ruff_audit.py --ci— no new findingspython tests/mypy_audit.py --ci— no new findingspython tests/tools/crucible_check.py— clean (0 diffs) after re-blessing both golden masterspython tests/tools/tri_comparison_chart.py --all --write— diff scoped to fortran's row + expected global-summary ripple only🤖 Generated with Claude Code