Skip to content

consent-plane: enforce terminal surface envelope - #40

Merged
mdheller merged 2 commits into
mainfrom
feat/consent-plane-terminal-surface
Aug 2, 2026
Merged

consent-plane: enforce terminal surface envelope#40
mdheller merged 2 commits into
mainfrom
feat/consent-plane-terminal-surface

Conversation

@mdheller

@mdheller mdheller commented Aug 2, 2026

Copy link
Copy Markdown

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.pyfails CI if containment is weakened (verified both ways).
  • .github/workflows/consent-plane-surface.yml — runs the verifier on PR/push.

Conforms to socioprophet-agent-standards consent-plane/001 (agent-standards#28) + sourceos-spec isolation-spaces contract (sourceos-spec#254).

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.
Copilot AI review requested due to automatic review settings August 2, 2026 21:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml defining the terminal surface envelope (purposes, deny_purposes, and space_deny).
  • Adds consent-plane/verify_surface.py to 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 thread consent-plane/verify_surface.py Outdated
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 thread consent-plane/verify_surface.py Outdated
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.
@mdheller
mdheller merged commit 7b6f4b2 into main Aug 2, 2026
2 checks passed
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.

2 participants