Table of Contents generated with DocToc
Probe templates
Capability: substrate:sandbox
Harness: agnostic
Runnable cross-family probe scripts that the
issue-reproducer
skill copies from when its Step 9 (optional cross-family probe)
runs against an issue.
The probe pattern, contract, and recording schema are in the
skill’s probe-templates.md
companion. This directory holds runtime-specific reference
implementations.
Prerequisites
- Runtime: None of its own — this directory holds per-runtime probe template files (today
groovy/). Running a probe needs the matching language runtime (e.g. a Groovy interpreter for thegroovy/templates). - CLIs: Whatever runs the target runtime’s scripts; nothing else.
- Credentials / auth: None.
- Network: Runs fully offline/local.
Layout
tools/probe-templates/
├── README.md (this file)
└── <runtime>/ (one subdirectory per supported runtime)
└── *.template (probe template files with placeholders)
Adopters with JVM-language projects copy from <runtime>/ where
<runtime> matches their language. Adopters whose runtime is not
covered contribute their own per-runtime templates back via PR.
What a probe template looks like
A probe template is a small runnable script that exercises the same expression across every member of a type or operator family and emits a comparison table. The structure is universal across runtimes:
# Pseudocode (each runtime renders this in its own syntax):
probes = {
"Member A": () => { construct backend A, exercise the expression }
"Member B": () => { same expression on backend B }
# ... one entry per family member
}
for name, body in probes:
try:
outcome = body()
catch e:
outcome = "THREW: " + type(e) + ": " + message(e)
print(name + " | " + outcome)
The expression under test is a placeholder; users substitute it when running against a specific issue.
Contributing a runtime
The framework treats every per-runtime subdirectory as first-class.
Today the groovy/ subdirectory ships in the framework; python/,
kotlin/, java/, rust/, and other-language subdirectories are
welcome and awaiting contribution. None of them require framework-side
support beyond adding the subdirectory — the per-runtime probe scripts
are runnable standalone.
Adopters with a new runtime should:
- Add a subdirectory
tools/probe-templates/<runtime>/matching the runtime’s conventional short name (lowercase, hyphenated). - Add at least one template file per supported family type:
range-index-cross-type.<ext>.templategpath-cross-backend.<ext>.templateoperator-variants-safe-nav.<ext>.template
- Each template file has a header comment naming the family being probed, the placeholders the user substitutes, and an example invocation.
- Open a PR against
apache/magpie.
Note: not every language has every family. A typed compiled language
without an operator-overloading subsystem may have no
operator-variants-* templates; that’s fine — the framework only
loads templates that exist.
Cross-references
issue-reproducer/probe-templates.md— the skill-side procedural detail.issue-reproducer/verdict-composition.md— schema for thecross_type_probeandoperator_variants_probesub-objects.<project-config>/reproducer-conventions.md— where probe artefacts live in the per-issue evidence package.