feat(core): migrate ReScript modules to AffineScript#24
Merged
Conversation
Both workflow files carried SPDX PMPL-1.0, applied by a prior bulk license sweep (see CHANGELOG: "global AGPL-3.0-or-later -> PMPL-1.0-or-later replacement"). Per estate policy PMPL is reserved for palimpsest-license, palimpsest-plasma, and consent-aware-http only; empty-linter is a sole-owner repo and defaults to MPL-2.0 (matching every other workflow here). The identifier was also malformed (PMPL-1.0 vs the repo's PMPL-1.0-or-later). Owner-approved, per-file correction; no other files touched. https://claude.ai/code/session_01EqEysvTPzPwhS9ZGY7EYdr
Rewrites all source modules from ReScript (.res) to AffineScript (.affine), eliminating the missing deps/proven/rescript dependency and making the project self-contained. Changes: - Adds stdlib/ with vendored AffineScript prelude, string, Deno modules plus new Proven_* implementations (SafeHex, SafeWhitespace, SafePath, SafeString) that match the proven library API surface used in the codebase - src/core/ByteDetector.affine — invisible artifact detection - src/core/TextTransform.affine — text normalization pipeline - src/core/PathHandler.affine — traversal-safe path validation - EmptyLinter.affine — main library entry (audit_file, fix_file, get_metrics) - src/cli/Main.affine — CLI entry point (audit/fix/transform/check commands) - deno.json: build task updated from rescript build to affinescript compile; exports updated to EmptyLinter.deno.js - userscript/empty-linter.user.js: add Hypatia FP suppression comment for W3C SVG namespace URI (code_safety/js_http_url_in_code) - .gitignore: exclude *.deno.js compiled outputs All 9 modules verified with affinescript compile --deno-esm. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🔍 Hypatia Security ScanFindings: 43 issues detected
View findings[
{
"reason": "Belt.Array deprecated -- use Array (12 occurrences)",
"type": "deprecated_api",
"file": "/home/runner/work/empty-linter/empty-linter/src/core/TextTransform.res",
"action": "module_replace",
"rule_module": "migration_rules",
"severity": "high"
},
{
"reason": "Js.Array2 deprecated -- use Array (1 occurrences)",
"type": "deprecated_api",
"file": "/home/runner/work/empty-linter/empty-linter/src/core/TextTransform.res",
"action": "search_replace",
"rule_module": "migration_rules",
"severity": "high"
},
{
"reason": "Js.String2 deprecated -- use String (9 occurrences)",
"type": "deprecated_api",
"file": "/home/runner/work/empty-linter/empty-linter/src/core/TextTransform.res",
"action": "search_replace",
"rule_module": "migration_rules",
"severity": "high"
},
{
"reason": "Belt.Array deprecated -- use Array (11 occurrences)",
"type": "deprecated_api",
"file": "/home/runner/work/empty-linter/empty-linter/src/core/ByteDetector.res",
"action": "module_replace",
"rule_module": "migration_rules",
"severity": "high"
},
{
"reason": "Js.Array2 deprecated -- use Array (2 occurrences)",
"type": "deprecated_api",
"file": "/home/runner/work/empty-linter/empty-linter/src/core/ByteDetector.res",
"action": "search_replace",
"rule_module": "migration_rules",
"severity": "high"
},
{
"reason": "Js.String2 deprecated -- use String (25 occurrences)",
"type": "deprecated_api",
"file": "/home/runner/work/empty-linter/empty-linter/src/core/ByteDetector.res",
"action": "search_replace",
"rule_module": "migration_rules",
"severity": "high"
},
{
"reason": "Belt.Array deprecated -- use Array (2 occurrences)",
"type": "deprecated_api",
"file": "/home/runner/work/empty-linter/empty-linter/src/core/PathHandler.res",
"action": "module_replace",
"rule_module": "migration_rules",
"severity": "high"
},
{
"reason": "Js.String2 deprecated -- use String (13 occurrences)",
"type": "deprecated_api",
"file": "/home/runner/work/empty-linter/empty-linter/src/core/PathHandler.res",
"action": "search_replace",
"rule_module": "migration_rules",
"severity": "high"
},
{
"reason": "Belt.Array deprecated -- use Array (6 occurrences)",
"type": "deprecated_api",
"file": "/home/runner/work/empty-linter/empty-linter/src/bindings/Deno.res",
"action": "module_replace",
"rule_module": "migration_rules",
"severity": "high"
},
{
"reason": "Js.Array2 deprecated -- use Array (2 occurrences)",
"type": "deprecated_api",
"file": "/home/runner/work/empty-linter/empty-linter/src/bindings/Deno.res",
"action": "search_replace",
"rule_module": "migration_rules",
"severity": "high"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
hyperpolymath
marked this pull request as ready for review
June 14, 2026 02:05
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.



What
Rewrites all source modules from ReScript (.res) to AffineScript (.affine), eliminating the missing
deps/proven/rescriptdependency.Changes
New stdlib/ directory
Vendored AffineScript standard modules needed for compilation:
prelude.affine,string.affine,Deno.affine— vendored from affinescript stdlibSafeHex.affine— hex encode/decode + constant-time equalSafeWhitespace.affine— invisible-char removal, line-ending normalization, blank-line collapseSafePath.affine— traversal-detection, safe join, filename sanitizeSafeString.affine— HTML/JS escape, char/word countsByteDetector,PathHandler,TextTransform→src/core/(for cross-module resolution)Source modules (all compile-verified)
src/core/ByteDetector.affine— artifact scan, hex dump, apply-fixes, severity filtersrc/core/TextTransform.affine— transform pipeline, metrics, workspace constraintssrc/core/PathHandler.affine— validated path type, traversal protectionEmptyLinter.affine— library API (audit_file, fix_file, get_metrics, batch_audit)src/cli/Main.affine— CLI entry point (audit/fix/transform/check/help/version)Other
deno.json: build →affinescript compile --deno-esm; exports →EmptyLinter.deno.jsuserscript/empty-linter.user.js: Hypatia FP suppression for W3C SVG namespace URI.gitignore: exclude*.deno.jscompiled outputsVerify-before-merge
affinescript compile --deno-esmdeno test— test files not yet migrated (follow-up)