feat(stdlib): pub-mark documented string + collections fns (unblock megaport)#505
Open
hyperpolymath wants to merge 1 commit into
Open
feat(stdlib): pub-mark documented string + collections fns (unblock megaport)#505hyperpolymath wants to merge 1 commit into
hyperpolymath wants to merge 1 commit into
Conversation
…egaport)
string.affine and collections.affine had ~40 fns with `///` doc comments
but no `pub` keyword — making them effectively module-private despite
the documented intent. Idaptik's migration/shared/PortNames.affine
hit this with `string::starts_with` ("Symbol is not public") + `collections::any`
when porting from ReScript.
Adds `pub` to every documented fn in both modules. Module-private
helpers (binary_search_helper) stay private.
Estate impact: unblocks the standards#279 megaport (idaptik + panll
ReScript→AffineScript) where consumers need string/collections from
outside the modules. The same pub gap exists in io/math/option/result/
testing — those are tracked as a follow-up sweep.
Tests: 354/354 pass. AOT smoke covers both modules.
This was referenced May 31, 2026
🔍 Hypatia Security ScanFindings: 83 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": "Action ons/checkout@v6\n needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action land/setup-deno@v2\n needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in affine-vscode-publish.yml",
"type": "missing_timeout_minutes",
"file": "affine-vscode-publish.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "missing_timeout_minutes",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "missing_timeout_minutes",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "missing_timeout_minutes",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "missing_timeout_minutes",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "missing_timeout_minutes",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "missing_timeout_minutes",
"file": "ci.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
pubto every documented fn instdlib/string.affine(18 fns) +stdlib/collections.affine(22 fns) — both modules had///doc comments on intended-public APIs but lacked thepubkeyword introduced by ADR-011.use string::{starts_with, ...};anduse collections::{any, find, ...};now resolve from any consumer. Private helpers (binary_search_helper) remain private.Why
Hit during the standards#279 idaptik megaport: porting
migration/shared/PortNames.affineneededstring::starts_with+collections::anyto compile theisCoprocessorPorthelper. Both errored with `Symbol is not public` despite carrying///doc-comment public-API intent. Same gap exists in io/math/option/result/testing — those are a follow-up sweep, not in scope here.Estate impact
Unblocks the in-flight ReScript→AffineScript megaport (umbrella standards#252, megaport step standards#279). Without
pub, consumers had to either re-implement primitives locally or roll their own viafold— both anti-patterns.Test plan
dune buildcleandune runtest— 354/354 pass (AOT smoke covers both modules)/tmp/PortNames-v6b.affine) now type-checks where it previously failed with the resolution errorRefs standards#279