This repository hosts:
The templates/ directory contains reusable Rice script templates organized per folder.
templates/
├── bundle.json # Generated bundle of all templates
├── schema.json # Manifest JSON schema
└── {template-name}/
├── manifest.yml # Template metadata + variant list
└── scripts/
└── {variant}.rice # Rice script per variant
Each template folder contains a manifest.yml (YAML) defining the template name, description, and variants. Each variant references a scriptFile — the relative path to its Rice script.
Bundle all templates into a single self-contained bundle.json, embedding each script's content directly:
go run ./tools/bundle_templates.go
The test-samples/ directory contains mock check results used to validate check scripts.
test-samples/
├── bundle.json # Auto-generated bundle of all samples (inlined metadata + payload)
├── index.json # Auto-generated index of all samples
└── src/{protocol}/ # Sample files organized by protocol (http, https, tcp, tls, minecraft)
├── {sample}.json # Metadata (check result payload)
└── {sample}.txt # Payload (request debug dump)
Scan all sample files and regenerate index.json:
go run ./tools/index_test_samples.go
Bundle all samples into a single self-contained bundle.json, embedding each sample's metadata and payload inline as Base64:
go run ./tools/bundle_test_samples.go
The template-testing/ directory contains the test runner that validates every template variant against all test samples.
template-testing/
├── eat.rice # Test script template — uses `#{{__script__}}` placeholder injected at runtime
├── main.go # Minimal entry point
└── main_test.go # Test runner — executes eat.rice + each variant script against all indexed samples
main_test.go loads templates/bundle.json and test-samples/index.json, then for each template variant injects its script into the eat.rice template (replacing the #{{__script__}} placeholder) and executes the combined script against every test sample.
Execute the Rice test script against every sample:
go test ./template-testing/... -v

