Skip to content

PPE 4/5: Document PPE in praxis mode and deprecate the laptop CPEX build #1800

Closed

Description

@huang195

Parent: #1785. Part 4 of 5. Depends on #1797, #1798 and #1799. Run it with /sdd-fast <this issue>.

Goal

Document PPE policy in praxis mode, and deprecate the laptop CPEX build. Kubernetes is not affected. The Go plugin, the authbridge-cpex image and go-ci-cpex stay.

Facts (spikes, 2026-11-11)

  • Policy files are plain PPE. The constructs in core/plugins/cpex/testdata/hr-cpex/cpex-policy.yaml and in the examples in docs/cpex-plugin.md exist in PPE 0.6.0. In a load check against 0.6.0, the hr-cpex file failed only with missing field store. CHANGELOG 0.6.0 says "Breaking: CIBA config requires store". With store: { kind: memory } added, the file loads. Both doc examples load as written.
  • Other policy-file changes from 0.5 to 0.6: ConversationContext.history is now Vec<Message>, in CMF shape. & and | behave differently when an operand cannot be ordered. New llm.input.*, llm.model.* and llm.output.* facts. The old llm.model_id keys stay as aliases.
  • The gateway builds only policy-jwt and policy-cel (PPE 1/5: Build PPE into cortex-gateway and add praxis.policy.config_path #1797). Cedar, OPA, OAuth delegation, CIBA, Vault and Valkey are not built. The hr-cpex policy needs Cedar, OAuth and CIBA.
  • Identity: an identity/jwt plugin reads the header that its header: names. On a laptop, Authorization carries the agent's provider key, so a user JWT must use another header, for example X-Agent-Token. PPE does not remove that header, so the origin receives it. A loopback JWKS needs allow_private_idp: true, which PPE 1/5: Build PPE into cortex-gateway and add praxis.policy.config_path #1797 does not expose. The JWT plugin needs capabilities: [perform_http] for a JWKS URL.
  • cel: steps need global: { pdp: [{ kind: cel }] }.
  • A conditional taint that does not block is possible with when: "<attribute predicate>" and do: ["taint(<label>, session)"]. It needs a resolved subject and an X-Session-Id header. on_allow on a CEL step is not a replacement, because a false CEL step denies.
  • Known gaps:
    • no A2A policy;
    • a streamed (SSE) inference response skips the response-phase policy (policy/filter.rs:1703-1714). A request-phase "custom.llm.stream == true: deny(...)" is the workaround;
    • taints are held in memory, and they are lost at each gateway restart and each policy reload;
    • WebSocket upgrades do not go through the gateway (cmd/cortex/praxis.go:21-36), so no policy runs on them;
    • the Cortex-only CPEX options are not available: observe_codes, principal.token_file, workload, bypass_hosts, bypass_paths, strict_hosts, synthetic_egress, delegated_credential_hosts, session_source, fallback_identification, hooks, fail_open.
  • The laptop CPEX build is installed with install.sh --cpex (scripts/install.sh:181, 219-229, 415-433). agentop update and doctor keep it (cmd/agentop/cmd_update.go:122, cmd_doctor_checks.go:88, setup_step_binaries.go:172). A cpex build prints cortex (cpex) <ver> (cmd/cortex/variant_cpex.go).

Requirements

  1. A new page docs/praxis-policy.md, linked from docs/README.md, docs/laptop-service.md and the praxis section of praxis/README.md. It has these sections:
    • how to turn it on: agentop setup --praxis, then praxis.policy.config_path in config.yaml, then a restart;
    • the built PPE features, and the features that are not built;
    • where policy runs in the chain;
    • how to record decisions: the cortex/recorder plugins: line from PPE 3/5: Record PPE policy decisions in the gateway's rows #1799;
    • examples that a test loads (requirement 4): a model allow list, an MCP tool deny, a JWT identity in X-Agent-Token, a when/do taint, a stream deny;
    • the deny responses: 401, 403, MCP HTTP 200 with JSON-RPC -32001, 500 for missing MCP metadata, and X-Policy-Violation;
    • the known gaps listed above;
    • policy-file edits reload without a restart.
  2. A migration section, from the Go cpex plugin to praxis.policy:
    • move the CPEX policy YAML to a file;
    • apply the 0.5 → 0.6 changes (CIBA store, and the others above);
    • remove the cpex plugin entry from pipeline.outbound;
    • a table of the CPEX plugin options with no equivalent.
  3. Deprecation:
    • docs/cpex-plugin.md: a banner at the top. The laptop use is deprecated, with a link to the new page. Kubernetes use is not deprecated.
    • scripts/install.sh --cpex: print one deprecation line to stderr that names --praxis and the new page. Install as before.
    • cmd/cortex: when the cpex plugin is in pipeline.outbound and the config is a local install, log one Warn line at start with the same text. Use the existing local-install check in core/config/session_archive.go (ArchiveRunsOnLocalInstall), or the check that it uses. Do not log the line in a sidecar.
    • cmd/README.md and README.md: mark the laptop cpex build as deprecated.
  4. Add a test that loads each YAML example in docs/praxis-policy.md into the PPE 0.6.0 engine with the gateway's features, so that the docs cannot drift. Use the pattern of core/plugins/cpex/doc_examples_test.go, but in Rust under praxis/.

Plan

Task 1: the docs page and the migration section (no dependency).

  • Files: docs/praxis-policy.md, docs/README.md, docs/laptop-service.md, praxis/README.md.

Task 2: the doc examples test (needs Task 1).

  • Files: a new test in praxis/filters or praxis/server that extracts the fenced yaml blocks marked as policy examples from docs/praxis-policy.md and loads each one. Fail when there are no blocks.

Task 3: the deprecation lines (no dependency).

  • Files: docs/cpex-plugin.md, scripts/install.sh, cmd/cortex (the start-up path that builds the outbound plugins), cmd/README.md, README.md.
  • Tests:
    • a Go test that the Warn line is logged for a local-install config with cpex, and is not logged for a sidecar config;
    • a case in scripts/install_test.sh that --cpex prints the line.

Order: Task 1 and Task 3 in parallel, then Task 2. One PR, stacked on #1799.

Done when

  • The requirements hold and the tests above pass.
  • pre-commit run --all-files passes.
  • The docs have no broken links.

Not in scope

For a human after review

Metadata

Metadata

Assignees

Labels

laptop

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions