feat(migration/shared): complete PortNames.affine — first compilable Mode-A file (megaport STEP 8)#110
Open
hyperpolymath wants to merge 1 commit into
Open
feat(migration/shared): complete PortNames.affine — first compilable Mode-A file (megaport STEP 8)#110hyperpolymath wants to merge 1 commit into
hyperpolymath wants to merge 1 commit into
Conversation
Closes the PortNames Wave 3 follow-up — the .affine now compiles to "Type checking passed" against AffineScript stdlib (was previously missing the `isCoprocessorPort` body the .res original carries). - `isCoprocessorPort` body uses `collections::any` + `string::starts_with` for the any-prefix match; matches `.res` original semantics (the .res computed an unused `_prefix` via `String.split + Array.get`, then ran `Array.some(d => startsWith(port, d))` — the second line is the meaningful body, and that's what this port preserves). - Depends on affinescript#505 (newly-pub stdlib fns) — pre-#505 both `any` and `starts_with` were module-private despite their public-API doc comments, so the port failed at resolution. Also adds `migration/shared/STATUS.md` — parity table tracking which .affine files compile (1/10) vs which remain Mode-B aspirational design demos waiting on affinescript#228 / #262 (in-tree imports + qualified paths) and other AS features. Replacement of `src/shared/PortNames.res` itself is gated on .affine→ .mjs codegen + consumer migration (see STATUS.md "Replacement" section); this PR ships the verified-correct future shape, not the swap. Refs standards#279 (STEP 8 — MEGAPORT)
🔍 Hypatia Security ScanFindings: 94 issues detected
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 |
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.
Summary
migration/shared/PortNames.affinefrom Wave-3 pilot (was missingisCoprocessorPort) to first fully-compilable Mode-A file in this directory.affinescript checknow passes againstmigration/shared/PortNames.affine.migration/shared/STATUS.md— parity table for all 10 Wave-3 .affine files (1/10 compile today; the other 9 are Mode-B aspirational design demos blocked on AS features).How
isCoprocessorPortbody usescollections::any+string::starts_with— preserves the .res original semantics (the_prefixin the .res was computed-but-unused;Array.some(d => startsWith(port, d))is the meaningful body).Depends on
affinescript#505 —
string::starts_with+collections::anyonly becamepubin that PR. Before #505 lands, this file fails resolution with `Symbol is not public`. After it lands,affinescript checkpasses locally and CI's equivalent will.What this PR is NOT
This does not replace
src/shared/PortNames.resin the build. The .res still owns the runtime contract (it compiles tosrc/shared/PortNames.res.mjs, which 12 test cases + 2 consumer modulesimport). Replacement requires AS-to-ESM codegen + consumer-port work — both tracked in STATUS.md's "Replacement" section. This PR ships the verified-correct future shape; the swap is a separate slice.Campaign tracking
Refs:
Test plan
affinescript check migration/shared/PortNames.affine→ "Type checking passed" (locally verified againstfeat/stdlib-pub-visibility-megaport-unblockof affinescript)mainAffineScriptaffinescript check migration/shared/*.affine(separate PR — adds AS toolchain dep)