Repository navigation
feat: close stage 10 with ProviderRetry and opossum's breaker - #91
Merged
Merged
Conversation
Stage 10's target from Tesota is one of its design models ported with its planted faults detected. ProviderRetry exercises time and cancellation. Its choice of the next time depends on the state, so it is two events, which the explorer can enumerate. Every obligation is proved with four helper invariants, the explorer reaches all 148 states, and each planted fault is refuted by the shortest run that breaks it. Refs #82
Stage 10's target from outside Tesota is opossum's breaker, proved. The port is faithful, so it claims only what opossum holds: a pending probe implies half-open or shut down, and a call runs neither once shut down nor while open and enabled. Every obligation is proved, and two planted faults are refuted by runs. opossum's own behaviours that its states don't suggest are listed in the file, and the exact error rate and the rejected inconsistent restore are its two deliberate divergences. Refs #82
adapter.patch makes opossum's lib/circuit.js keep its state in the module built from the port and ask it for each decision; the script runs opossum's lint and tests as released and with the module in place. Refs #82
Stage 10 is done when a Tesota design model is ported with its faults detected and opossum's breaker is proved with its tests passing on the generated module. Both hold, and the ProviderRetry port reaches the same 148 states and the same shortest fault traces as tla-ts on Tesota's model. The opossum port gains its license header; opossum names no copyright holder, so none is invented. Refs #82
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes stage 10. Its done criterion was "a Tesota design model ported, its faults detected; the circuit breaker of opossum, closed, open and half-open, proved, and opossum's tests pass with the generated module". Both halves hold. No compiler code changes in this PR.
ProviderRetry (Tesota)
conformance/cases/provider-retry.accordportsmodels/ProviderRetry.tlaat Tesota4ef9b191.Advance's choice of the next time depends on the state, so it becomes two events,advance_to_dueandadvance_to_end.IgnoreCancel,ReplayTool) are refuted by their shortest runs.opossum's breaker
conformance/programs/opossum/breaker.accordports the breaker's state and decisions from opossum 10.0.0 (decbedf), faithfully. It's verified: 32 obligations and 1 example.admits_call()lets nothing through once shut down, nor while open and enabled.shutdown()keepspendingClosewhile half-open. So the invariant includes shut down, and the behaviour is listed.close()oropen()aftershutdown();disable();shutdown()keepingpendingClose.tripkeepspending_close;admits_callignores shutdown.adapter.patchmakes opossum's ownlib/circuit.jskeep its state in the generated module (copied aslib/breaker.mts).scripts/check-opossum.shruns opossum's lint and tests as released and with the module. Both runs pass 546 of 550, with the same four failures, which are known on this machine: a 10 ms timing test and a health-check timer that fires after its test.Verification
cargo fmt --all --checkandcargo clippy --workspace --all-targets --locked -- -D warningsare clean.cargo test --workspace --lockedwith the pinned solvers: 97 passed, 1 ignored. That includes both ports and the four fault cases.score.py --self-test,materials.py) passes, without a bytecode cache.scripts/check-opossum.shrun end to end: exit 0, 53 s, both runs 546 of 550, with the same failing tests.Not established:
Risk note
Two-way door: conformance programs, a hand-written patch, a check script and docs. No compiler change. Blast radius: none for users; it sets stage 10 as done in the roadmap and stage 11 as next. Evidence: the conformance run, the opossum check and the tla-ts comparison above.
Closes #82