Skip to content

refactor(mock-provider): name simulate failure modes - #88

Merged
Teakowa merged 2 commits into
mainfrom
chore/no-comments-cleanup
Oct 16, 2026
Merged

Teakowa merged 2 commits into
mainfrom
chore/no-comments-cleanup

Conversation

@e54-bot

@e54-bot e54-bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up cleanup to #86 from a comment audit of the audit-findings diff:

  • Puzzle::simulate returns Result<i64, SimError> (UnknownOp / Arithmetic) instead of Option, so the parse-time failure arm names itself instead of needing a prose justification.
  • OpKind::Div now uses checked_div: i64::MIN / -1 produces the declared x-demo/simulation-failed diagnostic instead of panicking the provider.
  • Dropped comments that restated test names, duplicated the expect_* recovery contract already documented on those functions, or section banners. Kept spec-section references, platform/filesystem semantics notes, and contract doc comments.

Test plan

  • cargo fmt --all --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test --workspace
  • lpp-conformance-runner --validate-only --fixtures conformance/fixtures/v1 — 67/67
  • lpp-conformance-runner --provider lpp-mock-provider --fixtures conformance/fixtures/v1 — 67/67

simulate() now returns Result<i64, SimError> instead of Option, so the
parse-time failure arm names itself without a prose justification.
OpKind::Div uses checked_div, so i64::MIN / -1 surfaces as the declared
x-demo/simulation-failed diagnostic instead of panicking.

Also drop comments that restated test names, duplicated the expect_*
recovery contract already documented on those functions, or decorated
the test module with a section banner.
@Teakowa
Teakowa merged commit 77ad118 into main Oct 16, 2026
2 checks passed
@Teakowa
Teakowa deleted the chore/no-comments-cleanup branch October 16, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants