test(stdlib): AOT smoke gate (#136) + multi-module integration (#137)#194
Merged
Conversation
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>
This was referenced May 18, 2026
🔍 Hypatia Security ScanFindings: 44 issues detected
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final STAGE-A closers — both run under
dune runtest(CI).test_stdlib_aot.mldrives everystdlib/*.affinethrough resolve→typecheck→borrow→Deno-ESM codegen (one Alcotest case/file). 19/19. AOT path can't silently rot.uses prelude+string+option+collections together and exercises a symbol from each — proves cross-module resolution/typecheck/codegen as a coherent set, not file-by-file.Surfaced + fixed two real coherence gaps at source:
resolve_and_typecheck_moduletype-checked imported modules with a rawcheck_declfold (no forward-declaration) → a module with internal forward refs (binary_search→binary_search_helper) broke only on the import path. Now usesTypecheck.check_program(forward-pass) threading the module's own resolved imports as~import_types— imported modules check identically to standalone.option/collectionsexposed zeropubAPI (ADR-011 requirespubfor cross-module). Marked the exercised API (unwrap_or,reverse) public.Refs #128
Refs #136
Refs #137