Skip to content

refact(test): switched the runner to penelope - #543

Merged
schronck merged 1 commit into
mainfrom
refact/test/extract-penelope
Oct 14, 2026
Merged

schronck merged 1 commit into
mainfrom
refact/test/extract-penelope

Conversation

@schronck

Copy link
Copy Markdown
Collaborator

Summary

This PR switches the integration suite to penelope, a new crate that holds our Given/When/Then runner. The runner used to live in crates/decman/tests/common/scenario.rs. Other repos could not use it without copying it, so it now has its own repo (penelope#1).

decman pins penelope's merge commit 8f36b2d as a git dev-dependency, the same way it pins canton-lib.

  • scenario.rs is now a type alias, Scenario<Ctx = ()> = penelope::Scenario<Fixture, Ctx>, plus a short impl of penelope's Fixture trait. Because of the alias, no phase needed an edit.
  • probe.rs keeps only decman's HTTP failure rules (Failure, snippet). The 404 rule depends on how decman's frontend answers, so it stays here. It re-exports ProbeDiag, Class and FATAL_STREAK from penelope, so existing imports still work.
  • run.sh adds penelope=info to both RUST_LOG presets. The step lines now log under the penelope target. Without this change, the quiet preset would hide every GIVEN/WHEN/THEN line.
  • README links to penelope and names the new log target. The documented quiet preset also gains the chaos target. run.sh already set that target, but the README had left it out.

Related issues

None.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build / CI / chore

Checklist

  • cargo fmt -- --check passes
  • cargo clippy --all-targets --all-features -- -D warnings is clean
  • cargo test passes
  • Added/updated tests where appropriate
  • Updated documentation where appropriate
  • Commits follow the <type>(<scope>): <subject> convention

Notes for reviewers

One behavior change. penelope fixed a bug that Copilot found during its review. Before, a Then step checked its deadline only after a probe returned. A probe that never returned blocked the run forever, and that can happen here, because decman's HTTP client sets no timeout. Now the deadline also cancels a probe call that is still running. A probe call that runs past its step deadline therefore fails, where before it could pass late.

Tests. The 11 runner tests and the 5 ProbeDiag tests moved to penelope with the code, where 22 tests now run. decman keeps the 4 tests for its own Failure and snippet code. The integration test binary compiles every phase against penelope, and its 50 unit tests pass. The Integration Tests job on this PR runs the full localnet suite.

Security tooling. penelope runs the same checks as decman: Dependabot, Cargo Audit, Cargo Deny, Cargo Machete and Socket.dev. The new dependency is our own public, Apache-2.0 crate, and it adds no new third-party crates to Cargo.lock.

The integration suite's Given/When/Then runner moved to its own repo,
DLC-link/penelope, so other repos can reuse it. decman now depends on
penelope instead of keeping its own copy.

scenario.rs keeps a type alias that names decman's Fixture, so no phase
changed. probe.rs keeps only decman's HTTP failure rules, because the
404 rule depends on how decman's frontend answers.

The runner now logs under the `penelope` target, so both RUST_LOG
presets in run.sh name it. Without that, the quiet preset would hide
every step line.

penelope also bounds each probe call by its step deadline. decman's
HTTP client sets no timeout, so a hung probe used to block a run
forever.
@schronck
schronck requested review from a team and sosaucily October 14, 2026 10:52
@schronck
schronck requested review from scolear and a balanced review from Copilot October 14, 2026 10:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The externally hosted runner changes deadline behavior across the complete integration suite and requires final human validation of its pinned implementation.

0 open findings

What changed in this PR

Moves the integration-test Given/When/Then runner into the shared penelope crate while preserving DecMan-specific fixtures and HTTP failure classification.

Changes:

  • Adds and pins penelope as a development dependency.
  • Replaces the local runner with a fixture-bound type alias and re-exports diagnostics.
  • Updates logging presets and documentation.
File Description
README.md Documents Penelope and updated logging behavior.
integration-tests/​run.sh Enables Penelope scenario logs.
crates/​decman/​tests/​common/​scenario.rs Adapts DecMan’s fixture to Penelope.
crates/​decman/​tests/​common/​probe.rs Retains HTTP classification and re-exports diagnostics.
crates/​decman/​Cargo.toml Adds the test dependency.
Cargo.toml Pins the Penelope Git revision.
Cargo.lock Records the resolved dependency.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@schronck schronck assigned schronck and unassigned scolear Oct 14, 2026
@schronck
schronck merged commit c545875 into main Oct 14, 2026
11 checks passed
@schronck
schronck deleted the refact/test/extract-penelope branch October 14, 2026 11:18
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.

3 participants