Skip to content

Tests: the base-image consent declaration is tested from constructed locks - #337

Merged
ccozianu merged 2 commits into
mainfrom
ws-maintenance/base-consent-test
Nov 4, 2026
Merged

ccozianu merged 2 commits into
mainfrom
ws-maintenance/base-consent-test

Conversation

@ccozianu

@ccozianu ccozianu commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Owner request of 2026-11-04: the test marked expected-to-fail with the note "rewrite or eliminate" is the first legacy test moved under Unit Tests.

What changes

  • test_consent_names_the_contract_and_the_recipe_source leaves tests/test_base_contract.py. It read this repository's own lock and asserted the string "built by v0.3.0-rc6", so it failed on every lock regeneration and tested no contract.
  • devcapsule/configuration/authorization.py declares __all__, the public surface rule 4 requires before a unit is testable: the catalog and review operations, the validated lock readers, the curated vocabularies.
  • tests/unit/devcapsule/configuration/test_authorization.py, four triples over locks the tests build: the full declaration with contract, builder and recipe permalink at the builder's tag; a lock without a builder; a lock predating recorded contracts, described by its builder with the legacy recipe path; a lock without a base. Every expected value is derived from the test's own inputs, including the recommendation digest.

Evidence

  • Checker: 110 legacy files holding 1523 tests, 4 files follow the convention, 0 breaches.
  • mypy clean over the unit, the mirror and the legacy file; 14 tests pass across the new file and test_base_contract.py.

🤖 Generated with Claude Code

Test coverage, from CI run

Changed lines covered 100% (1 of 1 measured changed lines; 0 uncovered)
Overall devcapsule 88.1% (17,585 of 19,489 statements)

ccozianu and others added 2 commits November 4, 2026 00:42
…locks

The rc6 string pin in tests/test_base_contract.py read this repository's
own lock and asserted the release candidate that built the base; it failed
on every lock regeneration and the owner marked it expected-to-fail. Under
Unit Tests rule 5 it leaves the legacy file. Its unit,
devcapsule.configuration.authorization, declares __all__ (rule 4) and gains
tests/unit/devcapsule/configuration/test_authorization.py: four triples
over locks the tests build, with every expected description, display value
and digest derived from those inputs. Checker 0 breaches, 1523 legacy
tests; mypy clean; 14 tests pass across the new file and the legacy one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ccozianu
ccozianu merged commit 7ab3adc into main Nov 4, 2026
5 checks passed
@ccozianu
ccozianu deleted the ws-maintenance/base-consent-test branch November 4, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant