feat(v2-grammar): re-port phases E/F-H/I/J onto upstream extern API (refs #80)#83
Conversation
…loses #80) Re-implements the genuinely-net-new v2-grammar phases on top of the upstream `Extern { abi, items, span }` + cross-module-registry API (Phase D already landed in #78): - Phase E: function-decl annotations + tuple/let-pair destructuring - Phase F: implicit `in` (let-lin chains), legacy explicit `in` kept - Phase G/H: abstract extern types, `Unit` alias, `Bytes` -> i32 handle - Phase I: cross-module imports via new `import_resolver` - Phase J: bridge.eph + hypatia-port end-to-end compile Tests (all green): phase_e 4, phase_f 4, phase_gh 3, phase_i 1, phase_j 1; no regressions across parser (61), typing (73), desugar (18), surface (9), and ephapax-cli integration suites. Recovered from uncommitted working-tree state after local .git object corruption; history repaired from origin, CI/Cargo.lock kept at the canonical #82 baseline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Action required at merge: the underlying commit headline still reads |
🔍 Hypatia Security ScanFindings: 27 issues detected
View findings[
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Admitted leaves proof hole (1 occurrences, CWE-704)",
"type": "admitted",
"file": "/home/runner/work/ephapax/ephapax/formal/Semantics.v",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "Coq admit tactic leaves goal unproven (2 occurrences, CWE-704)",
"type": "coq_admit_tactic",
"file": "/home/runner/work/ephapax/ephapax/formal/Semantics.v",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "believe_me undermines formal verification (1 occurrences, CWE-704)",
"type": "believe_me",
"file": "/home/runner/work/ephapax/ephapax/src/formal/Ephapax/Formal/RegionLinear.idr",
"action": "flag",
"rule_module": "code_safety",
"severity": "critical"
},
{
"reason": "assert_total bypasses totality checker (1 occurrences, CWE-704)",
"type": "assert_total",
"file": "/home/runner/work/ephapax/ephapax/src/formal/Ephapax/Formal/RegionLinear.idr",
"action": "flag",
"rule_module": "code_safety",
"severity": "high"
},
{
"reason": "expect() in hot path (1 occurrences, CWE-754)",
"type": "expect_in_hot_path",
"file": "/home/runner/work/ephapax/ephapax/src/ephapax-repl/src/lib.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "from_raw constructs types from raw pointers without safety checks (1 occurrences, CWE-676)",
"type": "from_raw",
"file": "/home/runner/work/ephapax/ephapax/src/ephapax-vram-cache/src/lib.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "high"
},
{
"reason": "unwrap() without prior check -- DoS via panic (8 occurrences, CWE-754)",
"type": "unwrap_without_check",
"file": "/home/runner/work/ephapax/ephapax/src/ephapax-vram-cache/benches/cache_bench.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "high"
},
{
"reason": "expect() in hot path (5 occurrences, CWE-754)",
"type": "expect_in_hot_path",
"file": "/home/runner/work/ephapax/ephapax/src/ephapax-typing/src/lib.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
},
{
"reason": "unsafe block -- requires SAFETY comment (3 occurrences, CWE-676)",
"type": "unsafe_block",
"file": "/home/runner/work/ephapax/ephapax/src/ephapax-interp/src/lib.rs",
"action": "flag",
"rule_module": "code_safety",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
Refs #80.
Re-implements the genuinely-net-new v2-grammar phases on the upstream
Extern { abi, items, span }+ cross-module-registry API (Phase D already landed in #78;hello.ephis v2-only and dropped per the issue).Phases
in(let-lin chains); legacy explicitinstill compilesUnitalias,Bytes→ i32 handlesrc/ephapax-cli/src/import_resolver.rsbridge.eph+ hypatia-port end-to-end compileTests
All green, no regressions:
Recovery note
This work existed only as uncommitted working-tree state when the local
.gitobject store corrupted (19 zero-byte loose objects + corrupt index, likely a WSL crash mid-write). History was repaired fromorigin(all branches were pushed), the index rebuilt from disk, andhypatia-scan.yml/Cargo.lockkept at the canonical #82 baseline rather than the pre-sync working-tree version. A backup of the corrupt.gitis archived under.claude/.Ref branch
wip/v2-grammar-2026-05-16preserved on origin. Companion to hyperpolymath/standards#66.🤖 Generated with Claude Code