feat: tell the user podman's reason in the four refusals that kept it - #130
Merged
Merged
Conversation
ADR-0006 says the rule-two/limitation distinction is held apart in the refusal messages. Four messages stated a rule and kept its reason in the source, so a reader learned what compose2pod wants, not why podman cannot have it. The long-form `type` pair needed a split rather than a suffix. `volume 'type' must be one of [...]` fires both for `cluster`/`npipe`, which docker accepts (measured, docker compose config v5.1.2) and podman cannot express, and for a misspelling like `bnid`, which docker rejects too. The first is rule two and the second is rule one, so giving the whole message a podman clause would have attached a podman reason to a refusal podman has nothing to do with. Both verdicts are now pinned in the conformance corpus, since citing podman is only legitimate while docker itself takes the document. The list is held empty from the other side: a `REFUSALS` row exists because podman will not make the mount, so its refusal's reason is podman's, and a row that names no claim marks a message keeping that reason to itself. The claim-coverage gate could not see those four -- there was no claim to scan -- and now fails on the next one. Closes #121
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 #121.
ADR-0006 says the rule-two/limitation distinction is "held apart in the refusal messages as well as here". The issue's comment enumerated the four messages where it was not: each is measured by a
REFUSALSrow proving podman will not make the mount, so the reason exists and was simply never told to the user.anonymous volume 'a' must be an absolute path... (podman refuses a container path that is not absolute)volume 'target' must be an absolute path... (podman refuses a container path that is not absolute)volume 'type' must be one of ['bind', 'volume', 'tmpfs', 'image'](forcluster/npipe)volume 'type: cluster' is not supported (podman cannot express it)The two
drive-qualified-bindrows are untouched, as the issue's comment ruled: the limit there is the short form's, not podman's, and the message already says so.Why the
typepair is a split, not a suffixvolume 'type' must be one of [...]fires for two opposite reasons:cluster/npipeare rule two -- docker takes them, podman has no such mount.bnidis rule one -- docker refuses it and podman is not involved. A blanket podman clause would have claimed podman refuses a typo. So_DOCKER_ONLY_VOLUME_TYPESis checked first and the rule-one message keeps saying nothing about podman, which a test asserts directly ("podman" not in str(refusal.value)).Both verdicts are now standing measurements rather than a note in a PR body:
corpus/volume_long_form_cluster_type.yamlis pinned as a catalogued over-rejection andcorpus/volume_long_form_misspelled_type.yamlasboth-reject. Citing podman is only legitimate while docker itself accepts the document, and that is the oracle that says so.Keeping the list empty
The claim-coverage gate from #125 scans
compose2pod/podman.pyattribute access, so it was structurally blind to these four: a message that cites nothing has no claim to scan. The new invariant closes that from the table's side ---- because a
REFUSALSrow's own premise is that podman will not make the mount. A refusal with no podman reason belongs inLIMITATIONS, where the two drive-qualified binds sit. Run before the fix it named exactly the four rows the issue enumerated, which is the proof that it bites:Verified
just test-ci: 1436 passed, 100% line coverage.just lint: ruff format, ruff check, ty all clean.pytest -m conformanceagainst realdocker compose configv5.1.2: 871 passed, over-rejections now 8 (the new cluster file joins the catalogue), residuals unchanged at 2.REFUSALS/LIMITATIONS/ABSENT_FLAGS/STUB_FLAGSrow'srefusal_matchre-checked against the live message.integrationjob on ubuntu-24.04 (podman 4.9.3) reports. The probe argv for these rows is unchanged; only therefusal_matchstrings moved.