You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Prefer expanding safe static auto-resolution over making `fieldWith` implicit through runtime metadata.
24
24
- Keep `fieldWith` for true schema boundaries such as validated wrappers, imported contracts, and explicit child schemas.
25
25
26
-
-[ ]**Task 32: Improve decode diagnostics**
27
-
- Make decode failures consistently report path, expected shape, actual token/value, and validation/wrapper context.
28
-
- Align JSON, XML, KeyValue, YAML, and imported JSON Schema errors around the same mental model.
29
-
- Treat debuggability as a core ergonomics feature for the explicit schema approach.
26
+
-[x]**Task 32:** Added path-aware decode diagnostics across `Json`, `Xml`, `KeyValue`, and `Yaml`, including missing-field paths, collection indices/items, and `Schema.tryMap` validation context, with matching regression coverage in the unit test suite.
30
27
31
28
-[ ]**Task 33: Ship canonical pattern docs**
32
29
- Add copy-pasteable reference patterns for basic records, nested records, validated wrappers, versioned contracts, config contracts, JSON Schema import, and the C# bridge.
- Add a verification step so docs generation catches broken asset references before publishing.
45
42
46
43
-[x]**Task 30:** Fixed the docs-site asset root by aligning `PackageProjectUrl` with the GitHub Pages URL instead of the repo URL, and hardened `scripts/generate-api-docs.sh` to clear stale `fsdocs` cache, build the doc assemblies first, and fail if generated output points theme/search assets at `github.com/adz/CodecMapper/...`.
44
+
45
+
-[ ]**Task 35: Add property-based test coverage for codec laws**
46
+
- Add property-based tests for the real F# implementation rather than a sidecar model, since the main risks here are semantic drift, parser edge cases, and encode/decode symmetry across many inputs.
47
+
- Start with fixed representative schemas that already exist in the repo, then generate values for them: primitives, nested records, options, validated wrappers, collections, and numeric boundary cases.
48
+
- Make round-trip laws the first goal: `deserialize (serialize x) = x` for JSON and XML wherever the format supports the same shape.
49
+
- Add parser robustness properties for malformed inputs so failures stay deterministic and do not hang, over-consume input, or silently accept trailing content.
50
+
- Add format-symmetry properties where appropriate so one authored schema preserves the same semantic value across JSON and XML.
51
+
- Prefer `FsCheck.Xunit` in `tests/CodecMapper.Tests` so the property layer stays close to the existing xUnit and `Swensen.Unquote` test style.
52
+
- Keep the current example-based parser tests for exact regressions and expected error text; property tests should expand coverage, not replace those focused cases.
53
+
- Avoid starting with arbitrary recursive schema generation. The first iteration should optimize for debuggable failures and useful shrinking, not maximal generator cleverness.
54
+
- Treat generator design as part of the contract: keep generated values inside the supported deterministic surface instead of exploring JSON/XML features that the library intentionally leaves out.
0 commit comments