Skip to main content

Module input

Module input 

Source
Expand description

The strict calculate/explain input DTO + fail-closed tier enforcement (WBSV-06, WR-02/WR-05/V4).

The wire input is { "inputs": { <json_key>: <value>, … }, "overrides": { <param_key>: <value>, … } }. The DTO is #[serde(deny_unknown_fields)] (additionalProperties:false): an unknown TOP-LEVEL key is rejected as invalid_input.

Every gate fails CLOSED — a ?-or-reject arm, NEVER an if let Some(...) skip that fails open:

  • WR-05 — a supplied input whose cell_map entry’s seed_coord has no matching manifest role is rejected (the manifest and cell_map are separate embedded artifacts and can skew across a partial regeneration; a roleless seed would bypass the dtype + enum gates).
  • WR-02 — the enum-membership test is STRING-ONLY: a non-string value tested against a string allowed_values set can never be a member and is rejected (a SKEWED Dtype::Number + allowed_values manifest fails closed here rather than silently seeding).
  • V4 — a per-call override of a strict-constant (BA-governed) cell is rejected via pmcp_workbook_runtime::is_strict_constant.

Every rejection populates a self-repair field (allowed/range/required) so the isError envelope carries it.

Structs§

CalculateInput
The strict wire input DTO: inputs (the per-call values keyed by their neutral json_key) and optional overrides (variable-tier param tweaks). deny_unknown_fields rejects any other top-level key.
ValidatedInput
A validated, tier-checked input ready to seed the pmcp_workbook_runtime executor. seeds is cell_key -> value (the inputs mapped through the embedded cell_map, plus any accepted variable-tier overrides).

Functions§

validate_input
Validate + tier-check the raw tool args against the manifest + cell_map, fail-closed.