Skip to content

consent-plane: enforce terminal surface envelope - #33

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

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

Conversation

@mdheller

@mdheller mdheller commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Makes the consent-plane terminal surface real and enforced in sourceos-shell.

  • 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:47

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

Adds a “consent-plane terminal surface” envelope to sourceos-shell and wires CI to enforce it by validating consent-plane/surface.yaml against hard containment invariants.

Changes:

  • Add consent-plane/surface.yaml defining the terminal surface envelope (deny purposes + denied spaces).
  • Add consent-plane/verify_surface.py to validate the envelope and fail CI if invariants are weakened.
  • Add 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 5 comments.

File Description
consent-plane/verify_surface.py Implements CI validation of the surface envelope invariants.
consent-plane/surface.yaml Declares the repo’s terminal surface envelope configuration.
.github/workflows/consent-plane-surface.yml Runs the verifier in CI for PRs and pushes.

💡 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 +5 to +7
surface_id, so CI FAILS if the surface's containment is weakened. Conforms to
socioprophet-agent-standards consent-plane/001 + sourceos-spec
isolation-spaces-and-taints. Proven both ways by consent-plane/self_test.py.
Comment on lines +17 to +27
# Minimum containment each surface MUST assert (subset checks).
EXPECTED = {
"terminal": {"deny_purposes": {"egress", "operate"},
"space_deny": {"kernel-space", "system-space"}},
"notes": {"deny_purposes": {"egress", "operate"},
"space_deny": {"kernel-space", "system-space", "data-namespace"},
"consent_required": "per-purpose"},
"browser": {"deny_purposes": {"implement", "operate"},
"space_deny": {"kernel-space", "system-space", "user-space", "data-namespace"},
"untrusted_input": True},
}
Comment thread consent-plane/verify_surface.py Outdated
Comment on lines +31 to +33
cp = yaml.safe_load(cfg.read_text()) or {}
sid = cp.get("surface_id")
errors: list[str] = []
Comment thread consent-plane/verify_surface.py Outdated
Comment on lines +39 to +43
got = cp.get(key)
if isinstance(want, set):
have = set(got or [])
if not want <= have:
errors.append(f"{key} must include {sorted(want)}; missing {sorted(want - have)}")
Comment on lines +13 to +14
- run: pip install pyyaml
- run: python3 consent-plane/verify_surface.py
…/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 a81bc8a into main Aug 2, 2026
1 check 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