Skip to content

feat(migration/app/proven): port ProvenError.affine (megaport STEP 8 follow-up to #110)#111

Open
hyperpolymath wants to merge 1 commit into
mainfrom
feat/megaport-step8-proven-error
Open

feat(migration/app/proven): port ProvenError.affine (megaport STEP 8 follow-up to #110)#111
hyperpolymath wants to merge 1 commit into
mainfrom
feat/megaport-step8-proven-error

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

  • Ports src/app/proven/ProvenError.res (32 LoC) to Mode-A AffineScript at migration/app/proven/ProvenError.affine.
  • Self-contained: pure record type + 5 constructor helpers + toString. No FFI, no cross-module deps, no Tea_/Pixi/Gossamer surface.
  • affinescript check passes.

Adjacent to #110

This is a small single-file follow-up to PR #110 (migration/shared/PortNames.affine). Same megaport STEP 8 context, different subdirectory (migration/app/proven/ vs migration/shared/), and self-contained so it can land independently.

Translation choices

  • record-field punning {operation} → explicit #{operation: operation} (AS records require it)
  • labelled args (~name: T) → positional (name: T) (AS has no labels)
  • template literal `[${a}] ${b}`"[" ++ a ++ "] " ++ b (no JS templates)

What this PR is NOT

Does not replace src/app/proven/ProvenError.res. Consumers (SafeFloat, SafeJson, SafeAngle) still reference the .res. Those ports need cross-module use resolution (affinescript#228 family) before they can swap to the .affine.

Refs

  • standards#279 — STEP 8 megaport
  • standards#252 — campaign UMBRELLA
  • idaptik#110 — sibling PR (PortNames.affine + migration/shared/STATUS.md)

Test plan

  • affinescript check migration/app/proven/ProvenError.affine → "Type checking passed"
  • No source-file changes — only migration/app/proven/ addition

…— single-file follow-up)

Ports src/app/proven/ProvenError.res (32 LoC) to Mode-A
AffineScript. Self-contained error-types module — pure data record
+ 5 constructor helpers + toString. No FFI, no cross-module deps,
no Tea_/Pixi/Gossamer surface.

Type checks against AffineScript stdlib.

Translation choices:
- record-field punning `{operation}` → explicit `#{operation: operation}`
- labelled args `(~name: T)` → positional `(name: T)` (AS has no labels)
- template literal `` `[${a}] ${b}` `` → `"[" ++ a ++ "] " ++ b` (no JS templates)

What this PR is NOT
  Does NOT replace src/app/proven/ProvenError.res. Consumers
  (SafeFloat, SafeJson, SafeAngle) still reference the .res — those
  ports need cross-module `use` resolution (#228 family) before they
  can swap to the .affine.

Refs standards#279 (megaport STEP 8). Adjacent to idaptik#110 which
landed the first migration/shared/ Mode-A file.
@hyperpolymath hyperpolymath enabled auto-merge (squash) May 31, 2026 11:15
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 94 issues detected

Severity Count
🔴 Critical 11
🟠 High 24
🟡 Medium 59

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "Action perpolymath/standards/.github/workflows/governance-reusable.yml@main\n needs attention",
    "type": "unpinned_action",
    "file": "governance.yml",
    "action": "pin_sha",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in boj-build.yml",
    "type": "missing_timeout_minutes",
    "file": "boj-build.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in cflite-pr.yml",
    "type": "missing_timeout_minutes",
    "file": "cflite-pr.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in codeql.yml",
    "type": "missing_timeout_minutes",
    "file": "codeql.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in containers.yml",
    "type": "missing_timeout_minutes",
    "file": "containers.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in containers.yml",
    "type": "missing_timeout_minutes",
    "file": "containers.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dco.yml",
    "type": "missing_timeout_minutes",
    "file": "dco.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  },
  {
    "reason": "Issue in dogfood-gate.yml",
    "type": "missing_timeout_minutes",
    "file": "dogfood-gate.yml",
    "action": "flag",
    "rule_module": "workflow_audit",
    "severity": "medium"
  }
]

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