Repository navigation
Tests: the base-image consent declaration is tested from constructed locks - #337
Merged
Merged
Conversation
…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>
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.
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_sourceleavestests/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.pydeclares__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
test_base_contract.py.🤖 Generated with Claude Code
Test coverage, from CI run
devcapsule