Skip to content

cobol: doc rule's AUTHOR-vs-ownership collision needs a corpus-side doc line planted before the engine fix (#2659 follow-up) #2661

Closed

Description

@squid-protocol

Follow-up from #2659 (livecode + agc_assembly + fortran + html fixed there; cobol deliberately excluded).

What's different about cobol

cobol's doc rule shares the identical bare-colon-tag collision with AUTHOR/ownership that #2659 fixed in four other languages: ^(?:...)?[ \t]*(?:AUTHOR|DATE-WRITTEN|DATE-COMPILED|REMARKS|INSTALLATION)\.|\*>\s*@(?:param|return|author). AUTHOR overlaps cobol's ownership rule (^(?:...)?[ \t]*AUTHOR\.\s+([^\n]+)) exactly the same way.

But cobol's rosetta corpus shell (data/cobol/main.cbl) has no other doc-idiom content — its only doc-matching line is AUTHOR. KEYWORD-ROSETTA GENERATOR.. Removing AUTHOR from doc (the same fix applied elsewhere) would drop cobol's doc signal from 2 to 0, not 1 — breaking the corpus's planted intent (SPEC.md wants exactly 1 doc-comment per language) rather than deduping a double-count. That's a materially different consequence than the four already-fixed languages, which all had a separate genuine doc-idiom line already present.

Fix shape

Two-sided, needs sequencing:

  1. Corpus-side first: plant a genuine cobol doc-idiom line in main.cbl independent of AUTHOR — cobol's own rule already supports the structured form (*> @param/*> @return/*> @author via COBOL 2002+ free-format inline comments), so add one, e.g. *> @return the probe result.
  2. Then engine-side: remove AUTHOR from cobol's doc rule's bare alternative (same one-line change as livecode (+~14 siblings): doc rule claims 'Author:' which ownership already owns — every header author line double-counts (ada has the correct pattern) #2659), leaving DATE-WRITTEN/DATE-COMPILED/REMARKS/INSTALLATION plus the *> structured form.
  3. Corpus manifest doc stays at 1 throughout (2→1 pre-corpus-fix isn't needed since step 1 keeps it at the planted intent — verify the exact sequencing empirically before merging either side).

Found via the #2659 dispatch's cross-language Author/doc audit; excluded from that fix to avoid landing an engine change with an unverified corpus-breaking side effect.

Activity

  1. added
    core-engine
    on Sep 2, 2026
  2. squid-protocol commented on Sep 2, 2026

    @squid-protocol
    OwnerAuthor

    Step 1 (corpus-side *> @return plant) landed in Batch A (keyword-rosetta#32). Step 2 — dropping AUTHOR from cobol's doc alternation, since ownership owns it exclusively — is now filed as part of #2672 (Batch B.1 of #2669), alongside the same-shaped marker/tag double-count in 17 other languages. Prototype there takes cobol doc 2 → 1 with ownership unchanged; #2672 should close this one with it.

  3. squid-protocol commented on Sep 3, 2026

    @squid-protocol
    OwnerAuthor

    Both sides landed and verified end-to-end today; closing.

    Step 1 (corpus-side plant) — keyword-rosetta 4bb042f "plant(cobol): a real doc line, so #2661's engine fix can land (#2669 A.3)", in Batch A (keyword-rosetta#32). data/cobol/main.cbl now carries *> @return the probe result alongside the AUTHOR. paragraph, so cobol has a genuine doc idiom independent of AUTHOR.

    Step 2 (engine-side) — deca2bfe (#2681, Batch B.3 wave 2). AUTHOR dropped from cobol's doc bare alternative; DATE-WRITTEN|DATE-COMPILED|REMARKS|INSTALLATION plus the *>\s*@(?:param|return|author) structured form remain. ownership unchanged and now owns AUTHOR. exclusively.

    Step 3 (sequencing / manifest) — verified empirically rather than assumed:

    $ GALAXYSCOPE_BIN=.../full_precision/bin/galaxyscope python tools/verify_language.py cobol
    PASS cobol: 75 assertions across 4 files
    
    $ ... verify_language.py cobol --report   # main.cbl
      doc                              1
      ownership                        1
    

    The planted intent held at 1 throughout — no interim 2→1 manifest edit was needed, exactly as the issue anticipated.

    Guard tests in tests/extraction/languages/test_cobol_strict.py (85 passed): doc must not match AUTHOR. Jane Doe. while ownership must; the other header fields and the inline *> @author tag (distinct from the AUTHOR paragraph) still match; plus a corpus-shaped regression asserting the two distinct constructs count once each, with a ReDoS-immunity check.

    rosetta-audit on main is green (run 33708141484). Note for anyone reading this later: KEYWORD_ROSETTA_REF is currently pinned at corpus 3d94ca176c8df260fc883d89325bfe420af897b1, 12 commits behind corpus main 383148aae53f474f7cf40d8c1e2013daecab3cef — git diff 3d94ca17..origin/main -- data/ is empty, so that staleness does not affect this verification, but the pin bump is still owed under #2669.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engine

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions