Skip to content

Conformance kit: add a broken-adapter fixture for a mistake you actually made #115

Description

@arpanghoshal

The conformance kit runs the v0.1 and v0.3 acceptance suites against an adapter and answers one
question: does an action driven through this adapter get the same refusals as one driven
through @protect?

A kit that only ever passes is a kit nothing exercises. So the kit ships broken adapters
src/ctrlrun/conformance/fixtures.py, collected in the
BROKEN dict — each of which must fail the suite named for it. They were written before the
reference adapters existed. SwallowsDenial, ReplaysApproval, SelfAssertsPrincipal,
GrantsForItself, EchoesThePayload, CachesTheDecision and the rest: each is a specific way
an adapter can be wrong, and each proves one suite can see it.

If you have written an adapter and got something wrong, that mistake is a missing fixture.
This issue is for adding it.

Done means

  • A Reference subclass in fixtures.py that is wrong in exactly one way, with a docstring
    saying which way.
  • A row in BROKEN naming the suite it must fail.
  • The test asserting it fails that suite and not merely that it fails something. A fixture
    that fails for an incidental reason is a false green wearing a fixture's clothes.
  • It fails for the reason you named — check it against
    CONTRIBUTING.md's four shapes of a false green before you open the PR,
    particularly negative tests against behaviour the library refuses anyway.

Two of the existing fixtures exist because a review found the contract's second rule and its
mutation check were the claims with no fixture behind them. That is the shape of a good
addition: a rule the documentation states and nothing in the kit would catch.

docs/SPEC-v0.5.md §5 is the contract for the kit. Note the naming rule it opens with: the kit
is a suite of this repository's own acceptance tests, it is not a certification, and no
adapter describes itself as "conformant".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions