Skip to content

test(stdlib): AOT smoke gate (#136) + multi-module integration (#137)#194

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/136-137-aot-gate-integration
May 18, 2026
Merged

test(stdlib): AOT smoke gate (#136) + multi-module integration (#137)#194
hyperpolymath merged 1 commit into
mainfrom
feat/136-137-aot-gate-integration

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Final STAGE-A closers — both run under dune runtest (CI).

Surfaced + fixed two real coherence gaps at source:

  1. resolve_and_typecheck_module type-checked imported modules with a raw check_decl fold (no forward-declaration) → a module with internal forward refs (binary_searchbinary_search_helper) broke only on the import path. Now uses Typecheck.check_program (forward-pass) threading the module's own resolved imports as ~import_types — imported modules check identically to standalone.
  2. option/collections exposed zero pub API (ADR-011 requires pub for cross-module). Marked the exercised API (unwrap_or, reverse) public.
  • suite 233 → 253, all green; stdlib 19/19 standalone unchanged

Refs #128
Refs #136
Refs #137

STAGE-A closers, both wired into `dune runtest` (CI runs it).

- test_stdlib_aot.ml #136: every stdlib/*.affine driven through
  resolve -> typecheck -> borrow -> Deno-ESM codegen (one Alcotest
  case per file) so the AOT path can't silently rot. 19/19.
- test_stdlib_aot.ml #137: one program that `use`s prelude+string+
  option+collections together and uses a symbol from each — proves
  cross-module resolution/typecheck/codegen as a coherent set.

Two real coherence gaps surfaced + fixed at source:
- resolve.ml: resolve_and_typecheck_module type-checked imported
  modules with a raw check_decl fold (no forward-declaration), so a
  module with internal forward refs (collections binary_search ->
  binary_search_helper) broke ONLY on the import path. Now uses
  Typecheck.check_program (forward-pass) threading the module's own
  resolved imports as ~import_types — imported modules now check
  exactly as standalone programs do.
- option/collections: defined zero `pub` API (ADR-011 needs `pub`
  for cross-module use). Marked the API the integration exercises
  (unwrap_or, reverse) public.

Full suite 233 -> 253 (all green); stdlib 19/19 standalone unchanged.

Refs #128
Refs #136
Refs #137

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

Severity Count
🔴 Critical 12
🟠 High 21
🟡 Medium 11

⚠️ 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 free to 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