test(idris2): port 6 TS test files to Idris2 (estate port 9/11)#53
Merged
Conversation
Converts the panic-free-tests-and-benches suite to Idris2 under the
same cladistic Test.Spec harness used by ipfs-overlay, betlang,
stapeln, etc.
Modules (8 total, 79 tests):
- UnitConfigStructureTest 13 tests
- ContractNetworkContractsTest 18 tests
- AspectSecurityTest 14 tests
- PropertyNetworkPropertyTest 12 tests (with inline pure-logic ports
of isLowercaseHyphen, isZTNetworkId,
parseIPv4, ipv4ToNat, isCidr,
stripSuffix)
- SmokeInfraTest 10 tests
- E2ENetworkTest 12 tests
Local build verified on idris2 0.8.0 with the standard estate
incantation (IDRIS2_PREFIX/IDRIS2_DATA/IDRIS2_PACKAGE_PATH/
LD_LIBRARY_PATH). 79/79 PASS.
Build gotchas pinned during the port:
- `let foo s = ...` inside do-blocks doesn't parse; use
`let foo : T -> U; foo = \s => ...` instead.
- Tuple patterns with nested cons (e.g. `(addr, '/' :: prefix)`) at
top-level definition heads don't parse; lift to separate predicate.
- Local `isLower` collides with Prelude's `Data.Char.isLower` —
rename to `isLowerC` to disambiguate.
- ASCII-only string literals throughout; no regex (substring +
hand-rolled walk over Char lists).
Source bugs found: none. All 31 referenced file paths resolve on disk.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 Hypatia Security ScanFindings: 14 issues detected
View findings[
{
"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": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/zerotier-k8s-link/zerotier-k8s-link/tests/unit/config_structure_test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/zerotier-k8s-link/zerotier-k8s-link/tests/aspect/security_aspect_test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/zerotier-k8s-link/zerotier-k8s-link/tests/e2e/network_e2e_test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/zerotier-k8s-link/zerotier-k8s-link/tests/contract/network_contracts_test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/zerotier-k8s-link/zerotier-k8s-link/tests/bench/config_bench.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/zerotier-k8s-link/zerotier-k8s-link/tests/property/network_property_test.ts",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "TypeScript file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/zerotier-k8s-link/zerotier-k8s-link/tests/smoke/infra_smoke_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 port 9/11 — converts the 6 TS test files in `tests/{unit,contract,aspect,property,smoke,e2e}/` to Idris2 under the cladistic `Test.Spec` harness used by ipfs-overlay, betlang, stapeln, etc.
Originally tagged for bucket-2 (per-repo strategy review) in the estate bimodal rollout — collapsed to bucket-1 (content-validation + pure-logic) after a single inspection pass. Tests are pure file-read + substring/regex assertions; nothing touches ZeroTier API or kubectl at runtime.
What ported
The PropertyNetworkPropertyTest module includes inline pure-Idris2 ports of the regex-driven predicates from `tests/property/network_property_test.ts`: `isLowercaseHyphen`, `isZTNetworkId`, `parseIPv4`, `ipv4ToNat`, `isCidr`, `stripSuffix`. Each predicate is exposed and unit-tested so a regression in the predicate itself is caught alongside a regression in the file contents.
Test plan
Build gotchas pinned during the port
Source bugs found
None. All 31 file paths referenced across the 6 TS test files resolve on disk.
🤖 Generated with Claude Code