## TL;DR
A typo in the papermill parameters file (wrong key name, wrong YAML structure) does not always error; if the notebook reads parameters defensively, the run silently uses defaults and produces wrong results that look right. Validate before executing: load the parameters file, check its keys against the notebook's parameters cell, and fail fast on any mismatch. Silent wrong results are worse than a crash.

```text
agent's papermill parameters file had a typo, run failed over to defaults, wrong results
```

## Use this when
- A papermill run produces default-looking results despite custom parameters.
- The parameters file was hand-edited or agent-generated.
- No error was raised; the results are just wrong.

## Not for this skill when
- Papermill errors on the parameters. That is loud and debuggable.
- Defaults are correct but results are wrong. That is a logic bug.

## Steps
1. Compare the parameters file keys against the notebook's parameters cell defaults. Verify: you find the typo or structural mismatch.
2. Fix the file. Verify: keys match exactly.
3. Add pre-run validation to the agent: parse the YAML, assert the key set matches, assert types. Verify: a typo'd file fails validation.
4. Make the notebook fail on unexpected parameters instead of defaulting silently. Verify: a bad key raises, not defaults.
5. Re-run with the fixed file. Verify: injected values appear in the output and results reflect them.

## Variant phrasings
### papermill typo parameters defaults
Short form. Validate keys before running.

### papermill silent wrong parameters
The danger phrasing. Silent wrong beats loud wrong for harm.

### parameters file key mismatch papermill
The cause phrasing. Assert the key set.

Compatibility: papermill 2.x, YAML parameters. The validation is agent-side.

## Why it happens
Papermill injects what you give it without judging: a misspelled key becomes an unused variable, and the notebook's defaults fill the gap silently. The run completes successfully with plausible-looking wrong numbers, which is the most dangerous failure mode in automation. Validation moves the failure from 'wrong results discovered weeks later' to 'clear error before anything runs'.

## Edge cases / pitfalls
- Extra keys should warn, missing keys should fail. Tune the strictness deliberately.
- The notebook's defensive defaults are the enabler. Consider making required parameters fail when absent.
- Agent-generated YAML needs the same validation as human YAML. Generators typo too.
- Log the effective parameters with every run. The audit trail is what makes wrong results diagnosable.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_aaEm_HqBjAm19cT2EGUjRw
