Feat/semantic guard coverage - #3
Conversation
…onstraint Add constraint_continuity_over_one_off_activation (soft, principle_living_community, escalate_to_community_guardian) to the community-space constitution, and link guard_living_community to it via constraint_ids. Completes the principle -> constraint -> guard -> transition chain for all three previously under-covered principles/constraints. Still 0 errors / 0 warnings (strict); pytest 5/5.
gestuale declared red: 0.10, violating the hard constraint that guard_activation_color_ratio now enforces (red must never exceed 5%). Lower red 0.10 -> 0.05 and shift the freed weight to green (0.15 -> 0.20), keeping the color_weight sum at 1.0. Add a test asserting every space state respects the <=5% red rule, closing the guard->data loop end to end.
Generalize the color-ratio test from a single hardcoded example to every real (non-fictional) example, with the threshold as a named constant (MAX_RED_ACTIVATION_RATIO = 0.05). Any future space_state over 5% red in any real example now fails CI, keeping the repo internally consistent with the hard constraint declared in the constitution.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8645ab5142
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| MAX_RED_ACTIVATION_RATIO = 0.05 | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("example_dir", REAL_EXAMPLES, ids=lambda p: p.name) |
There was a problem hiding this comment.
Scope the red-ratio check to examples declaring the constraint
When a future non-fictional example defines space_states but does not declare constraint_activation_color_ratio—or intentionally uses a different palette policy—this parametrization still applies the community-space project's 5% threshold and fails CI. REAL_EXAMPLES is selected solely from metadata, so filter based on the paired constitution's constraints or keep this project-specific test scoped to community-space-brand.
Useful? React with 👍 / 👎.
No description provided.