Skip to content

feat(standards): func_start and class_start contracts -- 5 open cells are collective-entry cross-product mis-marks, not rule defects (#2856, roadmap Phase 3) - #2857

Merged
squid-protocol merged 1 commit into
mainfrom
fix/2856-structure-contract
Sep 7, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/2856-structure-contract

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Phase 3 of the contract roadmap (docs/contract_roadmap.md, epic #2812): the structure-declaration pair func_start and class_start. Closes #2856.

The contracts

func_start — One hit is the syntax that opens an executable block of logic under its own name: a function, method, procedure or subroutine declaration, or the instruction that begins an executable step in a language with no named-callable form.

class_start — One hit is the declaration of a named type (class, struct, record, interface, enum or object) or the file's compilation-unit container where that container is the language's only named-entity declaration.

Full sentences, corollaries, the audit tables and the ledger dispositions: docs/func_start_rule_contract.md, docs/class_start_rule_contract.md. Both sheet rows → stated (8/68); signal_contract_audit.py --ci green with a smaller baseline (61 findings); cross-language pins in tests/extraction/languages/test_structure_contract_2856.py.

No rule regex changed — and that is the finding

The pair carried 5 of the report's open-defect cells: func_start dockerfile/html, class_start dockerfile/jcl/kotlin. Computing each cell's verdict against corpus main showed every one is extraction only because a collective ledger entry's signal×language cross-product claims it — the exact A.4 mis-mark batch4 was corrected for twice before. None is a rule matching the wrong construct; under the stated sentences the existing rules already conform.

cell why it read red true cause
func_start/dockerfile (17 vs 13) batch4 names func_start (for dockerfile HEALTHCHECK) intended-morphology — a Dockerfile is a sequence of build instructions (RUN/CMD/ENTRYPOINT/HEALTHCHECK), its executable-block form (C2)
func_start/html (9) batch5 names func_start (for css) + html (for an unrelated doc+ownership dual) — the cross-product intended-morphology — script/style tags, html-func-start-counts-script-elements (C5)
class_start/dockerfile (4) batch4 names class_start (for FROM) scoring — FROM opens a named build stage, the file's container (C2); added to container-construct-reads-as-class-start
class_start/jcl (1) batch4's redundant mark over the container entry scoring — the JOB card container, already in container-construct-reads-as-class-start
class_start/kotlin (2) kotlin-object-dual-globals-classstart (keyword-overlap) inherency — object is a singleton class and the globals plant; plant-forced (#2796), re-dispositioned intended-morphology (C3)

Three deliberate duals are stated and kept (one token, two genuine constructs — the fortran-COMMON shape, not the io/branch one-owner case): dockerfile FROM (class_start+import), dockerfile HEALTHCHECK (func_start+safety), kotlin object (class_start+globals). The pin module asserts both rules of each still fire.

The container cells class_start/{cobol,css,yaml} and every classes_found container cell were already correctly categorized scoring and stay with the open structure-stratum work (#2795/#2796/#2798) — banding a per-language container constant against a zero median is a scoring-layer answer, out of scope for a rule contract.

Proof

  • rule_probe reads identically before and after — no regex edited, so the golden masters are untouched (0 diff) and there is nothing to re-bless.
  • rosetta_audit.py against the companion corpus branch: 46/46.
  • Full extraction suite: 6,933 passed (new pin module test_structure_contract_2856.py). ruff/mypy/dead-key audits and audit_check.py: no new findings.

Cross-repo

Companion corpus PR: squid-protocol/keyword-rosetta#95 (rebless/gitgalaxy-2856-structure) — ledger scope-corrections only (no manifest cell moves, the counts are all correct): func_start/class_start drop from batch4's signal union (dockerfile stays in languages_seen for FROM's import half and HEALTHCHECK's safety half); func_start drops from batch5's union; dockerfile added to container-construct-reads-as-class-start; kotlin-object-dual-globals-classstart re-dispositioned to intended-morphology; new func-start-dockerfile-instruction-blocks entry. After it, func_start and class_start each carry 0 open-defect cells. This PR merges first; the corpus PR's bias regen republishes the report.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VnsC1A6TUhGS5QcmM7fg8L

… are collective-entry cross-product mis-marks, not rule defects (#2856, roadmap Phase 3)

Both structure-declaration rows stated (docs/func_start_rule_contract.md,
docs/class_start_rule_contract.md, sheet 8/68):

- func_start: the syntax that opens an executable block of logic under its own
  name -- a function/method/procedure/subroutine declaration, or the
  instruction that begins an executable step where the language has no
  named-callable form (dockerfile RUN/CMD/..., a makefile recipe, a yaml step).
- 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.

No rule regex changed: under the stated sentences the 43/39 existing rules
already conform. The five open-defect cells (func_start dockerfile/html,
class_start dockerfile/jcl/kotlin) each read extraction only because a
collective ledger entry (batch4, batch5, kotlin-object) claims the cell through
a signal x language cross-product -- the A.4 mis-mark corrected twice before.
Their true causes are container morphology (scoring, #2795/#2796/#2798) and
intended morphology (dockerfile instruction-blocks, html script tags, kotlin's
plant-forced object). Three deliberate duals stated and kept (FROM
class_start+import, HEALTHCHECK func_start+safety, object class_start+globals),
pinned in tests/extraction/languages/test_structure_contract_2856.py.

Golden masters untouched (0 diff, no rule change); rosetta_audit 46/46 against
the companion corpus branch; extraction suite 6933 passed.

Closes #2856

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VnsC1A6TUhGS5QcmM7fg8L
@squid-protocol squid-protocol added the rosetta:rebless-owed Intentionally moves keyword-rosetta counts; audit warns, corpus re-blesses after merge label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 201b1ab into main Sep 7, 2026
43 checks passed
@squid-protocol
squid-protocol deleted the fix/2856-structure-contract branch September 7, 2026 18:30
squid-protocol added a commit to squid-protocol/keyword-rosetta that referenced this pull request Sep 7, 2026
…ope-correction, no cell moved (#95)

Companion to squid-protocol/gitgalaxy#2857 (roadmap Phase 3, epic
gitgalaxy#2812). The pair's 5 open-defect cells were correct readings that
collective ledger entries mis-categorised as extraction via a signal x language
cross-product. No manifest value changes (the engine changed no rule regex):

- batch4-dual-keyword-overlaps: func_start/class_start leave the signal union
  (dockerfile stays in languages_seen for FROM's import half and HEALTHCHECK's
  safety half).
- batch5-tier2-morphology-shapes: func_start leaves the signal union.
- container-construct-reads-as-class-start: dockerfile added (FROM stage
  container, class_start contract C2).
- kotlin-object-dual-globals-classstart: keyword-overlap -> intended-morphology
  (plant-forced object, C3).
- new func-start-dockerfile-instruction-blocks (intended-morphology).

Regenerated at full precision: open-defect share 32 -> 27 of 2645; func_start
and class_start each carry 0 open-defect cells; unexplained unchanged (no cell
orphaned); na/decoy/ledger-orphan checks green.


Claude-Session: https://claude.ai/code/session_01VnsC1A6TUhGS5QcmM7fg8L

Co-authored-by: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rosetta:rebless-owed Intentionally moves keyword-rosetta counts; audit warns, corpus re-blesses after merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant