Skip to content

fix(typecheck): reconcile register_builtins with resolver seed list (#135)#173

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/135-register-builtins-iofamily
May 18, 2026
Merged

fix(typecheck): reconcile register_builtins with resolver seed list (#135)#173
hyperpolymath merged 1 commit into
mainfrom
fix/135-register-builtins-iofamily

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

register_builtins had drifted from resolve.ml seed_builtins. File-I/O / env / time / float-math builtins were seeded for resolution but never typed → stdlib files hit 'Unbound variable' at typecheck. Adds correct schemes per io/math headers; retypes read_line to Result (effects.affine unaffected — own extern decl).

io's file-I/O builtins now type-check; its last blocker is cross-module imported-type threading (separate, documented on #128). Full suite 233/233, zero regression, stdlib 12/19.

Refs #128

…135)

register_builtins had drifted from resolve.ml's seed_builtins: file-I/O
(read_file/write_file/append_file/file_exists/is_directory), env/time
(getenv/getcwd/time_now), and float-math (floor/ceil/round/trunc/sin/
cos/tan/atan/atan2/exp/log/log10/log2/cbrt) were seeded for resolution
but never typed, so stdlib files using them failed typecheck with
'Unbound variable'. Add correct schemes (signatures per io.affine /
math.affine headers). Also retype read_line as
Unit -> Result<String,String> (io.affine pattern-matches it Ok/Err;
effects.affine has its own extern decl so is unaffected).

io.affine's file-I/O builtins now type; its remaining failure is the
cross-module imported-type threading layer (split's scheme not seeded
into the importer's typecheck) — separate, documented on #128.
Full suite 233/233, zero regression; stdlib 12/19.

Refs #128
@hyperpolymath hyperpolymath merged commit 6a233b4 into main May 18, 2026
11 of 12 checks passed
@hyperpolymath hyperpolymath deleted the fix/135-register-builtins-iofamily branch May 18, 2026 00:50
@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