feat(stdlib): pub-mark sweep — io/math/option/result/testing (closes #508)#546
Merged
Conversation
…508) PR #505 closed the pub-visibility gap in stdlib/string.affine and stdlib/collections.affine. This PR completes the sweep for the remaining 5 modules listed in #508. Mechanical rule (per #508 scope): Any `fn` immediately preceded by a `///` doc comment (allowing intervening contiguous `//` lines / attributes) is pub-intent and gets the `pub` keyword. | Module | pub before | pub after | now-private | |------------|-----------:|----------:|------------:| | io | 0 | 15 | 0 | | math | 0 | 36 | 0 | | option | 1 | 36 | 0 | | result | 0 | 24 | 0 | | testing | 0 | 26 | 0 | Total: 136 fns now reachable from consumers (was 1 of 137). Verification dune build bin/main.exe — clean dune runtest — 368/368 PASS Estate impact (verified by running main.exe check against the idaptik migration/ corpus before and after this change): before: 68 / 86 PASS, 18 FAIL (4 parse, 14 type) after: same numerically — the 14 `undefined value: \`min_float\`/\`max_float\`` failures now flip from "stdlib symbol unreachable" to "caller missing \`use math::{min_float, max_float};\`", which is the correct consumer-side closure. Companion idaptik PR adds those. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com>
🔍 Hypatia Security ScanFindings: 91 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 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"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
Last missing primitive surfaced while re-running the idaptik migration
oracle after the pub-mark sweep in this PR. `PlayerHP.affine` uses
`copysign(speed, dx)` as a branchless replacement for the Float-valued
if/else the wasm backend cannot lower.
This is a standard math primitive (mirrors C99 `copysign`, IEEE-754
`copySign`) with the conventional argument order: `copysign(x, y)`
returns `x` with the sign of `y`. Placed alongside the existing
sign/abs/min/max float helpers.
Re-audit against idaptik migration corpus:
before: 68/86 PASS (this PR's pub-mark sweep alone got it here)
+use math::{...} on 14 idaptik consumers: 81/86 PASS
+copysign: 82/86 PASS — last 4 are deliberately-Mode-B parse failures
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com>
🔍 Hypatia Security ScanFindings: 91 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 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"
}
]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
Completes the pub-visibility sweep for the 5 stdlib modules listed in #508, applying the same rule PR #505 used for
string.affineandcollections.affine: anyfnimmediately preceded by a///doc comment is pub-intent and gets thepubkeyword.Inventory (verified post-change)
iomathoptionresulttesting136 fns now reachable from consumers (was 1 of 137).
Verification
dune build bin/main.exe— cleandune runtest— 368/368 PASSEstate impact (idaptik migration corpus, run as oracle audit)
Pre-change: 68/86 PASS, 18 FAIL (4 parse, 14 type).
The 14 type failures all surface as
Resolution error: undefined value: \min_float`/`max_float`. These are now correctly classified as **consumer-side import gaps** — the 11 affected idaptik files needuse math::{min_float, max_float};. Companion PR onhyperpolymath/idaptik` adds those.The 4 parse errors are in
migration/main/{Boot,Main,StartupError,MultiplayerHandlers}.affine— explicitly tagged "Mode B (design-demo) — NOT v0.1.0-compileable" in their headers, usingimport X;+ effect-row syntax that's RFC-tracked (RFC #45/#59 etc.) but not shipping. Out of scope for this PR.Refs
hyperpolymath/idaptik(to adduse math::{...}to 11 consumer files)