test(idris2): port DSL + playground test suites from Racket/TS#22
Merged
Conversation
Estate ports 5a/11 + 5b/11 — converts the betlang test surface to Idris2
under the same cladistic Test.Spec harness used by ipfs-overlay,
format-registrations, awesome-nickel, etc.
tests/idris2/ (DSL, content-validation):
- DslStructureTest 16 unit tests: file existence, #lang racket,
SPDX coverage, primitive provides, structural
substring checks across 8 .rkt source files
- DslContractsTest 12 INVARIANT tests pinning the documented
contracts (ternary shape, weighted-3 enforcement,
seed reproducibility, entropy bounds, 25-test
basics coverage, parallel list-comprehension form)
- Total 28 tests; all PASS
playground/tests/idris2/ (hybrid: pure-logic + content-validation):
- PlaygroundTernaryTest 13 tests; inline Idris2 reimpl of the
Kleene 3-value logic (Tri/notT/andT/orT/
impliesT/betT). De Morgan + truth-table
property checks over all 9 pairs.
- PlaygroundProbabilityTest 12 tests; pure-logic port of Branch/
betWeighted/betConditional/analyticEV.
mulberry32 PRNG falls back to content-
validation (no clean Idris2 port for the
bitwise-uint32 arithmetic).
- PlaygroundStructureTest 14 tests; SPDX + structural checks across
the 4 .ts files and deno.json.
- Total 39 tests; all PASS
Local build verified on idris2 0.8.0 with the standard estate
incantation (IDRIS2_PREFIX/IDRIS2_DATA/IDRIS2_PACKAGE_PATH/
LD_LIBRARY_PATH). 67/67 PASS total across both suites.
SPDX coverage note: only the 2 conformance/*.rkt files carry SPDX
headers. The DSL structure test pins current truth (asserts those
two specifically) rather than failing on absent headers across the
other 6 .rkt source files. Backfilling SPDX across core/ + lib/ +
tests/basics.rkt is filed separately as part of the licence-debt
ledger (estate-wide scaffold-placeholder sweep).
Closes the 2026-05-20 bimodal-rollout DEFERRED tags on betlang in
the estate test rollout campaign.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 56 issues detected
View findings[
{
"reason": "Merge artifact in root",
"type": "stale",
"file": "SPEC.core.scm.orig",
"action": "delete",
"rule_module": "root_hygiene",
"severity": "medium"
},
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in security-policy.yml",
"type": "missing_workflow",
"file": "security-policy.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "No permissions declaration -- add permissions: read-all",
"type": "missing_permissions",
"file": "comprehensive-quality.yml",
"action": "add_permissions",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/betlang/betlang/playground/src/main.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/betlang/betlang/playground/src/probability.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/betlang/betlang/playground/src/ternary.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/betlang/betlang/playground/test/probability_test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/betlang/betlang/playground/test/ternary_test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
}
]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
Estate ports 5a/11 (DSL) + 5b/11 (playground) — converts the betlang test surface to Idris2 under the cladistic `Test.Spec` harness used by ipfs-overlay, format-registrations, awesome-nickel, etc.
Originally tagged DEFERRED ("multi-week language reimpl") in the estate bimodal-rollout — pragmatic re-scoping landed it as the same content-validation + pure-logic shape that the other estate ports use, no Racket runtime required.
What ported
`tests/idris2/` (DSL — content-validation)
`playground/tests/idris2/` (hybrid: pure-logic + content-validation)
Totals
67 / 67 tests PASS on idris2 0.8.0:
SPDX coverage note
Only the 2 `conformance/*.rkt` files carry SPDX headers. `DslStructureTest` pins current truth (asserts those two specifically) rather than failing on absent headers across the other 6 files. Backfilling SPDX across `core/` + `lib/` + `tests/basics.rkt` is tracked separately in the estate licence-debt ledger.
Test plan
🤖 Generated with Claude Code