fix(lease-broker): no lease held is a no-op success, not a denied transition #1339
Merged
fred
merged 2 commits from 2026-08-20 23:40:10 +00:00
fix/d29-lease-revoke-noop into next
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
dc6b593c1e |
test(#1338): amend runtime_tools pins that encoded the D29 defect semantics
ci/woodpecker/pr/ci Pipeline was successful
Two assertions in packages/mosaic/src/mutator-gate/runtime_tools_unittest.py pinned the behaviour D29 identifies as the defect: an envless revoke-lease.py returning rc=2. They are changed here under the test-is-the-defect exemption, stated on the record rather than made quietly. One new assertion is added to cover what the relaxation must NOT reach. Why the reclassification is justified. Not because the old pin was careless: it was deliberate entrypoint doctrine, born in |
||
|
|
9fed383884 |
fix(lease-broker): no lease held is a no-op success, not a denied transition
ci/woodpecker/pr/ci Pipeline failed
revoke-lease.py read MOSAIC_LEASE_BROKER_SOCKET and MOSAIC_LEASE_SESSION_ID with direct dict access inside the try block. A session that never held a lease raised KeyError, fell into the fail-closed handler, and returned rc=2 on every lifecycle transition -- including compaction. Denying compaction to a session that holds no lease protects nothing; it converts a recoverable context limit into a lost session. That is D29. Absence must be TOTAL to qualify for the no-op. If exactly one variable is present the session is half-provisioned, which is real misconfiguration, and it still takes the fail-closed path. An exported-but-empty variable counts as absent. Five unit tests cover the contract: no-op success, vacuous no-op (the broker must not be contacted), both half-provisioned mirrors still rc=2, and empty string as absent. Red control: 2 of the 5 fail without the guard. The test is enumerated in test:framework-shell. Every other src/lease-broker/*_unittest.py is enumerated there, and the #1017 membership guard's population is *test*.sh under framework/tools/, so it does not see python suites -- an unenumerated python test is silently never run. Still open, not fixed here: why seat panes carry no MOSAIC_LEASE_* variables at all. |