Skip to content

feat(grammar)!: return/resume as diverging prefix exprs + ADR-012 + conflict disclosure (#215) - #224

Merged
hyperpolymath merged 1 commit into
mainfrom
stage-c/pc-family-b-return
May 18, 2026
Merged

feat(grammar)!: return/resume as diverging prefix exprs + ADR-012 + conflict disclosure (#215)#224
hyperpolymath merged 1 commit into
mainfrom
stage-c/pc-family-b-return

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Not a conflict-count fix (proven net-neutral). A correctness change + settled design decision + honest noise disclosure.

  • return/resume hoisted out of expr_primary → diverging prefix expressions (: Never, never an operand). BREAKING: (return a) + b needs explicit parens (a feature). 257 green.
  • ADR-012 (SETTLED-DECISIONS.adoc + META.a2ml): grammar changes assert semantic truth, never chase cosmetic metrics; residual LALR conflicts are inherent/correctly-resolved/intentionally-left won't-fix (Eliminate all Menhir parser conflicts (75 S/R + 10 R/R) — dedicated grammar-conflict workstream #215).
  • just buildmasks the benign Menhir notices but discloses the count + correctness proof + ADR + just build-loud reveal; dune build unchanged & transparent. Masking ≠ hiding.

Breaking: review-gated. Refs #215#218

…onflict disclosure
NOT a conflict-count fix (proven net-neutral: 21->21 S/R states). This
is a *correctness* change + a settled design decision + honest noise
disclosure (#215).
- lib/parser.mly: hoist return/resume out of expr_primary to the
statement-expression top level. Semantic justification: `return e`
has type Never — it never yields a value to an enclosing operator, so
it is a diverging *prefix* that greedily owns the rest of the
computation, not an operand. BREAKING: `(return a) + b` now needs
explicit parens — a feature (post-divergence dead code made visible),
in the spirit of affine typing / explicit effect rows. 257 gate green.
- ADR-012 (docs/specs/SETTLED-DECISIONS.adoc + .machine_readable/6a2/
META.a2ml): grammar changes are correctness assertions, never
cosmetic-metric chasing; residual ~68 S/R + R/R (incl. state 401) are
inherent, Menhir-correctly-resolved, intentionally-left won't-fix.
- justfile: `just build` masks the benign LALR notices but prints the
masked count + correctness proof + ADR pointer + reveal command
(`just build-loud`); plain `dune build` unchanged & fully
transparent. Masking is disclosure, not concealment.
Refs #215#218
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 44 issues detected

SeverityCount
🔴 Critical12
🟠 High21
🟡 Medium11

⚠️Action Required: Critical security issues found!

View findings
[
{
"reason": "Stray AI.a2ml in root -- use 0-AI-MANIFEST.a2ml only",
"type": "banned",
"file": "AI.a2ml",
"action": "delete",
"rule_module": "root_hygiene",
"severity": "high"
},
{
"reason": "Superseded by 0-AI-MANIFEST.a2ml",
"type": "banned",
"file": "AI.djot",
"action": "delete",
"rule_module": "root_hygiene",
"severity": "high"
},
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in security-policy.yml",
"type": "missing_workflow",
"file": "security-policy.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/example/smoke_driver.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/cli.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/mod.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/lib/compile.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/affinescript/affinescript/affinescript-deno-test/lib/runner.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
}
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@hyperpolymath