Repository navigation
WO55: extension-point registries (gates, stage types, volume providers, license policy) - #312
Merged
Merged
Conversation
The spine's extension points were closed lists; adding a gate, stage type, corpus source kind, or license policy meant editing core modules. Each is now a registry — closed for modification, open for extension: - gates: BaseGate + register_gate; evaluate() runs every registered gate with a GateContext (metrics/parity/corpora/conformance/registry as one encapsulated object). The proven three (quality, parity, license) are adapters over the unchanged check functions. - two new gates land as the proof the registry is real: ConformanceGate (frozen fixtures or no pass — previously only the publish guard checked this) and RegressionGate (flag-only compare against registry best-known; flags never block silently). - stage types: register_stage_type(); KNOWN_STAGES stays as a live alias, contracts.py never edits. - corpus source kinds: the Literal is gone (schema data); the planner's register_volume_provider decides what is mountable, and unknown kinds fail at plan time with the registered set. - license policy: LicensePolicy objects (allow_waivers) instead of a hardcoded predicate — policies vary by construction. 7 new tests written first and watched failing; suite 249 green, ruff clean.
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.
OCP round on the spine: the four hardcoded extension points become registries (tests-first, 7 new tests watched failing). Two new gates land as the proof: ConformanceGate (frozen fixtures or no pass) and RegressionGate (flag-only vs registry best-known). GateContext encapsulates gate inputs. Suite 249 green, ruff clean.