Skip to content

fix(stdlib): Iterator collect uses list not nonexistent Vec (#135 slice 4-traits)#169

Merged
hyperpolymath merged 1 commit into
mainfrom
fix/135m-while-let
May 17, 2026
Merged

fix(stdlib): Iterator collect uses list not nonexistent Vec (#135 slice 4-traits)#169
hyperpolymath merged 1 commit into
mainfrom
fix/135m-while-let

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

traits.affine:124 was the last parse blocker. Not a compiler gap — while let already parses. Broken stdlib code: Iterator::collect returned Vec[Item] / used Vec::new()/.push() but Vec is not defined anywhere in the stdlib (it uses []+++ everywhere else). Rewrote collect in the stdlib's own list idiom instead of adding speculative Vec + associated-fn grammar. traits.affine PARSE 124 -> TYPECHECK (remaining ref-vs-Int is a distinct deeper defect). Pure stdlib, suite unaffected. Refs #128, #135.

🤖 Generated with Claude Code

…e 4-traits)

traits.affine:124 was the last parse blocker. Root cause is NOT a
compiler grammar gap: `while let` already parses. It is broken stdlib
code — `Iterator::collect` returned `Vec[Item]` and used `Vec::new()` /
`.push()`, but **`Vec` is not defined anywhere in the stdlib** (the
whole stdlib builds lists with `[]` + `++`, never `Vec`; `Vec::new()`
also exercised an unsupported `Type::lower_fn()` associated-call form).

Resolve-at-source: rewrite `collect` in the stdlib's own list idiom
(`let mut result = []; while let Some(item) = self.next() { result =
result ++ [item]; } return result`) rather than add speculative `Vec`
+ associated-function grammar to prop up code that never had a `Vec`.

Effect: traits.affine clears its last parse wall (PARSE 124 ->
TYPECHECK; the remaining `ref 't ~ Int` is a distinct deeper defect in
the `impl Eq for Int` blocks). Pure stdlib change — suite unaffected.

Advances #135. Refs #128, #135.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath merged commit 651cc12 into main May 17, 2026
@hyperpolymath hyperpolymath deleted the fix/135m-while-let branch May 17, 2026 23:51
@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