Skip to content

feat(tests): port TS tests to Idris2 (estate port 7/11)#60

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/port-ts-tests-to-idris2
May 20, 2026
Merged

feat(tests): port TS tests to Idris2 (estate port 7/11)#60
hyperpolymath merged 1 commit into
mainfrom
feat/port-ts-tests-to-idris2

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

  • Mirrors tests/unit/config_structure_test.ts (9 tests) and tests/contract/config_contracts_test.ts (10 INVARIANTs) into Idris2.
  • All 19 assertions are file-read + substring checks against configs/*.ncl and scripts/*.sh — structurally identical to the Deno originals.
  • INVARIANT 4 (no public IPs) is ported with an explicit allow/deny substring list rather than a line-walking regex (Idris2 base lacks regex); rationale inlined in ConfigContractsTest.idr. Same plausible-regression coverage.
  • Re-classifies ipfs-overlay from the bimodal-rollout "unit-logic — needs strategy" bucket into the "content-validation — quick port" bucket; the existing TS file was misclassified as unit-logic when its assertions are pure file content validation.

Files

  • tests/idris2/Test/Spec.idr — harness (verbatim copy from prior ports)
  • tests/idris2/ConfigStructureTest.idr — 9 unit tests
  • tests/idris2/ConfigContractsTest.idr — 10 INVARIANTs
  • tests/idris2/Main.idr — aggregator
  • ipfs-overlay-tests.ipkg — package manifest

Local result (Idris2 0.8.0)

=== ConfigStructureTest ===
9 passed, 0 failed
=== ConfigContractsTest ===
10 passed, 0 failed
=== Total: 19 passed, 0 failed ===

TS removal

Deferred to a follow-up sweep once all 11 estate ports land, consistent with the prior 6 ports (a2ml-showcase, awesome-nickel, format-registrations, julia-professional-registry, ubicity, plus tooling).

Test plan

  • Local build clean (4/4 modules)
  • Local run 19/19 PASS
  • CI green

🤖 Generated with Claude Code

Mirrors tests/unit/config_structure_test.ts (9 tests) +
tests/contract/config_contracts_test.ts (10 INVARIANTs) into Idris2.
All 19 assertions are file-read + substring checks, structurally
identical to the Deno originals.

INVARIANT 4 (no public IPs) is ported with an explicit allowlist
(0.0.0.0, 10.147.x) + denylist (8.8.8.8, 1.1.1.1, 9.9.9.9, OpenDNS)
substring check rather than a line-walking regex (Idris2 base lacks
regex); same intent, same plausible-regression coverage. Rationale
documented inline in ConfigContractsTest.idr.

Local Idris2 0.8.0 run: 19 passed, 0 failed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath hyperpolymath merged commit f1650b5 into main May 20, 2026
15 checks passed
@hyperpolymath hyperpolymath deleted the feat/port-ts-tests-to-idris2 branch May 20, 2026 12:29
@github-actions
Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 13 issues detected

Severity Count
🔴 Critical 7
🟠 High 3
🟡 Medium 3

⚠️ Action Required: Critical security issues found!

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/ipfs-overlay/ipfs-overlay/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/ipfs-overlay/ipfs-overlay/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/ipfs-overlay/ipfs-overlay/tests/e2e/pipeline_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/ipfs-overlay/ipfs-overlay/tests/contract/config_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/ipfs-overlay/ipfs-overlay/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/ipfs-overlay/ipfs-overlay/tests/property/config_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/ipfs-overlay/ipfs-overlay/tests/smoke/scripts_smoke_test.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant