consent-plane: enforce terminal surface envelope - #40
Merged
Conversation
Adds consent-plane/surface.yaml (surface_id=terminal) + a verifier that FAILS CI if the envelope's containment is weakened (proven both ways), + the consent-plane-surface workflow. Conforms to socioprophet-agent-standards consent-plane/001 + sourceos-spec isolation-spaces-and-taints.
There was a problem hiding this comment.
Pull request overview
This PR introduces a “consent-plane terminal surface” envelope to TurtleTerm and enforces it in CI so that future changes cannot weaken containment rules without failing builds.
Changes:
- Adds
consent-plane/surface.yamldefining theterminalsurface envelope (purposes, deny_purposes, and space_deny). - Adds
consent-plane/verify_surface.pyto validate the YAML against hard minimum invariants (fail-closed). - Adds a GitHub Actions workflow to run the verifier on PRs and pushes to
main.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
consent-plane/verify_surface.py |
Adds a CI-enforced verifier for minimum surface containment invariants. |
consent-plane/surface.yaml |
Defines the terminal consent-plane surface envelope to be validated. |
.github/workflows/consent-plane-surface.yml |
Runs the verifier in CI on PR/push to prevent containment regressions. |
Suppressed comments (1)
consent-plane/verify_surface.py:43
- For set-valued expectations, the verifier currently does
set(got or []). If the YAML accidentally provides a scalar (e.g.deny_purposes: egress), this will turn the string into a set of characters and can yield confusing results. Prefer an explicit sequence-type check and a clearer error message.
if isinstance(want, set):
have = set(got or [])
if not want <= have:
errors.append(f"{key} must include {sorted(want)}; missing {sorted(want - have)}")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+6
to
+7
| socioprophet-agent-standards consent-plane/001 + sourceos-spec | ||
| isolation-spaces-and-taints. Proven both ways by consent-plane/self_test.py. |
Comment on lines
+31
to
+32
| cp = yaml.safe_load(cfg.read_text()) or {} | ||
| sid = cp.get("surface_id") |
…/non-list, add self_test Copilot: (1) pin EXPECTED_SURFACE so surface.yaml can't be switched to a weaker surface; (2) fail cleanly (not a traceback) on a non-mapping surface.yaml and non-list set-fields; (3) add consent-plane/self_test.py so the 'proven both ways' claim is real (passes on the envelope; fires on weakening + surface switch); (4) workflow uses 'python -m pip' + runs the self_test + least-privilege perms.
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.
Makes the consent-plane terminal surface real and enforced in
TurtleTerm.consent-plane/surface.yaml— the envelope (surface_id=terminal, deny_purposes, space_deny).consent-plane/verify_surface.py— fails CI if containment is weakened (verified both ways)..github/workflows/consent-plane-surface.yml— runs the verifier on PR/push.Conforms to
socioprophet-agent-standardsconsent-plane/001 (agent-standards#28) +sourceos-specisolation-spaces contract (sourceos-spec#254).