All notable changes to :wpl_validator.
The format follows Keep a Changelog. This project adheres to Semantic Versioning.
[Unreleased]
[1.6.5] — 2026-05-04
Added
- Pass-2 rule
:activity_block_mismatchrejects activities whosetypeis not allowed in the parent block'stype(e.g.exercisein acooldownblock).:activity_block_mismatchadded toWPL.Validator.Error.codetypespec. Seeconformance/error-codes.mdfor the full allowed-activity table.
[1.6.0] — 2026-05-04
Changed
- Sync vendored schema + conformance suite from
gymbile/wpl@v1.6.0(wasv1.5.0).
Added
Contraindication tightening. Optional
severity(low | moderate | high) andaction: "require_clearance".- Cardio interval consistency.
CardioPrescription.intervals.work.duration/.rest.durationaccept a fullDurationobject alongside bare seconds. - Cardio intensity slots.
intensity.targetgains typed slots (zone,min_bpm/max_bpm,min_watts/max_watts,value+unitfor pace). Resistance extras.
Reps.amrap: bool,ExercisePrescription.to_failure: bool,Weight.metricenum (1RM | e1RM | training_max | daily_max).- Typed progress measurements.
Checkpoint.measurements[]items accept a free string or a typedMeasurementSpecwithMeasurementMetricenum andQuestionnaireenum. - Recovery typing.
RecoveryExercisegainsmodality,intensity_rpe,pnfblock, andbody_part. - 5 new valid conformance fixtures:
contraindication-clearance,cardio-intervals-duration,amrap-to-failure,checkpoint-typed-measurements,recovery-pnf-smr. - 5 new invalid conformance fixtures:
contraindication-bad-severity,contraindication-bad-action,checkpoint-bad-metric,recovery-bad-modality,weight-bad-metric.
Notes
All schema changes are additive; every plan valid under 1.5.0 continues to validate under 1.6.0.
[1.4.0] — 2026-05-03
Added
- Pass-2 rule
:cyclic_subplan. Detects sub-plan reference self-cycles (aSubPlanActivitywhosesub_plan_refequals the containing plan'sid). Cross-plan cycles deferred pending asub_plansresolution map in the validate API. :cyclic_subplanadded toWPL.Validator.Error.codetypespec.
Changed
- Sync vendored schema + conformance suite from
gymbile/wpl@v1.5.0(wasv1.4.0).
Notes
99/99 tests pass.
[1.3.0] — 2026-05-03
Changed
- Sync vendored schema + conformance suite from
gymbile/wpl@v1.4.0(wasv1.3.0).
Notes
Schema v1.4.0 adds per-bodyweight scaling for macros/calories/load and documented controlled-vocabulary prefixes for telemetry sources and clinical contraindications. All additive. 41/41 conformance + full validator suite pass.
[1.2.0] — 2026-05-03
Fixed
- Pass 1 now drills into the best-matching branch for
oneOfschema failures, matching ajv's native behavior. Previously, an invalid inner field on (e.g.) anExerciseActivityproduced a genericoneOferror at the activity level instead of the specific (e.g.enum) error at the offending field. Surfaced by the round-3bad-muscle-groupconformance fixture; codified inerror-codes.md.
Changed
- Sync vendored schema + conformance suite from
gymbile/wpl@v1.3.0(wasv1.2.0).
Notes
Schema v1.3.0 adds optional primary_muscles/secondary_muscles/movement_pattern on ExerciseActivity, plan-level athlete_thresholds, and intensity.zone_model on cardio. 94/94 tests pass.
[1.1.0] — 2026-05-03
Changed
- Sync vendored schema + conformance suite from
gymbile/wpl@v1.2.0(wasv1.1.1).
Notes
Schema v1.2.0 is purely additive: Phase.type enum, Week.is_deload boolean, and a structured Tempo shape (alongside the existing string form). No new validator rules; Pass 1 (schema validation) covers all three additions. Plans authored against v1.1.x continue to validate unchanged.
[1.0.0] — 2026-05-02
Added
- Initial release of
:wpl_validator. Sister implementation of@gymbile/wpl-validator(TypeScript) — same conformance fixtures, identical(code, path)results. - Pass 1: JSON Schema validation (Draft 2020-12 schema, validated via
ex_json_schemawith a$schemaDraft-7 compatibility swap; the schema uses only Draft-7-compatible keywords). - Pass 2: semantic invariants — single tree-walk with rule behaviour. Rules:
:duplicate_id(5 scopes),:empty_phases_for_type,:invalid_prescription,:invalid_personalization_rule(with nested CompoundCondition recursion),:invalid_points_rule,:phase_duration_mismatch(warning),:unresolved_ref(catalog-optional). - Public API:
WPL.Validator.validate/2returns aWPL.Validator.Resultstruct with structuredWPL.Validator.Errorentries (path, code atom, severity, meta). - Conformance suite vendored from
gymbile/wpl@v1.1.1— all 3 valid + 9 invalid fixtures pass. - Drift-check CI (weekly) against
gymbile/wplupstream.