Skip to content

func_start & class_start have no stated contract: 5 open cells are all collective-entry cross-product mis-marks, not rule defects #2856

Closed

Description

@squid-protocol

Roadmap Phase 3 pair (docs/contract_roadmap.md, epic #2812), next by the mechanical audit after test (#2852): the structure-declaration pair func_start and class_start. Between them they carry 5 of the report's open-defect cells — func_start: dockerfile, html; class_start: dockerfile, jcl, kotlin — and both sheet rows are draft:

_c("func_start", "structure", "declaration", "Exact syntax anchoring the start of an executable block of logic", planted=True)
_c("class_start", "structure", "declaration", "The syntax that defines an object-oriented class, struct, or record", planted=True)

The measurement (verdicts computed against corpus main)

Every one of the 5 open cells is extraction only because a collective ledger entry's signal×language cross-product falsely claims it — the same A.4 mis-mark batch4 was corrected for twice before. None is a rule matching the wrong construct:

  • func_start/dockerfile (17 vs median 13) → batch4-dual-keyword-overlaps (HEALTHCHECK = func_start+safety). A Dockerfile is a sequence of build instructions; RUN/CMD/ENTRYPOINT/HEALTHCHECK are its executable-block-start form, so 17 is morphology, not a defect. HEALTHCHECK genuinely opens an executable block and is a health probe — a deliberate dual, the fortran-COMMON shape.
  • func_start/html (9 vs 13) → batch5-tier2-morphology-shapes (which itemizes only css func_start, not html) + html-func-start-counts-script-elements (intended-morphology). The batch5 mark is the cross-product artifact; the true cause is the intended-morphology entry (markup declares no functions; <script>/<style> tags are the analogue).
  • class_start/dockerfile (4) → batch4 (FROM = import+class_start). FROM … AS stage opens a named build stage — the file's compilation-unit container, exactly the container-construct-reads-as-class morphology one layer down. FROM genuinely names a base-image dependency and opens a stage — deliberate dual.
  • class_start/jcl (1) → batch4 + container-construct-reads-as-class-start. The job card //ROSETTA JOB is the container; container-construct already explains it (scoring). batch4's mark is redundant.
  • class_start/kotlin (2) → kotlin-object-dual-globals-classstart (keyword-overlap). object Region {}/object Home {} are the two planted globals — Kotlin has no module-level mutable state, so a singleton object is how the plant must be written, and an object is a class declaration. Plant-forced intended-morphology (classes_found: five red cells on a 0 median are language morphology, not extraction — the row needs a declaration-requirement stratum #2796's reading), not an overlap defect.

The container cells class_start/{cobol,css,yaml} and every classes_found container cell are already correctly categorized scoring (container-construct, engine-semantic) and belong to the open structure-stratum work (#2795/#2796/#2798) — out of scope here.

What the contract must state

  1. func_start = the syntax that opens an executable block of logic under its own name — a function/method/procedure/subroutine declaration, or, in a language with no named-callable form, the instruction that begins an executable step (dockerfile RUN/CMD/…, makefile recipe, yaml step). A reference/call is not a declaration.
  2. class_start = the declaration of a named type — class, struct, record, interface, enum, object — or the file's compilation-unit container where that container is the language's only named-entity declaration (cobol PROGRAM-ID, jcl JOB, dockerfile FROM stage). A container that the file cannot exist without reads against a zero median by morphology, not defect — the declaration-requirement stratum question is classes_found: five red cells on a 0 median are language morphology, not extraction — the row needs a declaration-requirement stratum #2796, a scoring-layer answer, not this rule's.
  3. Deliberate duals (one token, two genuine constructs — the fortran-COMMON shape, kept, not retired): dockerfile HEALTHCHECK (func_start+safety), dockerfile FROM (class_start+import), kotlin object (class_start+globals).
  4. Contract-level absence: agc_assembly/m4/makefile/markdown/shell class_start = None (no type-declaration morphology, ledgered); markdown func_start = None.

Done in the #2765/#2841/#2852 shape

One sentence + corollaries per row in docs/func_start_rule_contract.md and docs/class_start_rule_contract.md, both sheet rows → stated, the collective ledger entries scope-corrected so the 5 cells fall through to their true cause (func_start/class_start open defects 5 → 0), the three deliberate duals recorded. No rule regex changes are expected (the rules already conform to the stated sentences under the minimal reading); the container/structure-count residue stays with #2795/#2796/#2798.

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-enginemetrics

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions