registrystack / registrystack/registry-stack
test(oid4vci): remove the one-second expiry boundary flake
- Dominant language
- Rust
- Stars
- 2
- Forks
- 0
- Avg merge
- 2h 55m
- Merged PRs (30d)
- 130
Description
## Problem
The Evidence CI job on PR #1063 failed in expiry_cleanup_preserves_live_state_and_releases_expired_state at state_machine_recovery.rs:1293. The supposedly live offer redemption returned 400 instead of 200.
Failure evidence: https://github.com/registrystack/registry-stack/actions/runs/34844749622/job/103979857120
The test configures offer_lifetime_seconds to 1, waits for an earlier offer to expire, then creates two live offers and redeems the first. Because store deadlines and now are whole Unix seconds, a newly created one-second offer can have almost no effective lifetime when creation lands near a second boundary. The exact test passed on an immediate local rerun, and PR #1063 does not change the OID4VCI store or this test.
## Acceptance criteria
- Preserve the assertion that expired offers and their prepared requests are pruned while newer live offers survive cleanup.
- Remove dependence on landing away from a wall-clock second boundary, preferably through a controlled clock or another deterministic boundary.
- Do not weaken runtime expiry or cleanup behavior.
- Demonstrate stability with repeated focused runs of the exact recovery test under the CI profile.
Contributor guide
Research direction
Start with expiry_cleanup_preserves_live_state_and_releases_expired_state in state_machine_recovery.rs:1293, then inspect its one-second offer_lifetime_seconds setup and the Evidence CI profile. Preserve the expired-offer and prepared-request pruning assertions while making the boundary deterministic without changing runtime expiry or cleanup. Run repeated focused executions of this exact recovery test under the CI profile and confirm newer live offers still redeem successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100