Skip to content

Praxis mode 1/8: Add the Rust workspace and port the inference parser #1718

Closed

Description

@huang195

Part of #1714 · phase A, delivery step 1 · Section 3 · design in #1717 (docs/superpowers/specs/2026-11-07-praxis-mode-design.md)

Goal

Start the Rust side of praxis mode: a workspace outside go.work, and the first parser port, with a gate that keeps Go and Rust in step.

Scope

  • A new Rust workspace praxis/ with the crate cortex-praxis-filters. It is outside go.work, so the 11 Go modules, go vet and go mod tidy -diff do not change.
  • The parser module cortex_parse for inference: a port of core/parse/inference. It is a module, not a filter: Praxis mode 2/8: Build cortex-gateway and the Cortex ingestion endpoint #1719 wires it into the one filter cortex_observe, because Praxis runs response hooks in reverse chain order.
  • It parses the request buffered, and SSE responses frame by frame, including the known mislabeled SSE on a 2xx only (a port of isKnownMislabeledSSE with its 2xx gate, server.go:926-933).
  • It decodes gzip and zstd for parsing only, and counts decoded bytes against the 10 MB buffered cap and the 10 MB per-frame cap, as direct mode does. The rows over a cap are in the design, Section 3.
  • The parity gate: a Go test writes the expected event JSON next to each Turn the MCP, A2A and inference parsers into libraries, with saved real-traffic test cases #1503 fixture, and a Rust test must give the same JSON. It blocks PRs under praxis/. On a Go-only parser PR it reports and does not block.
  • The schema drift test: a Go test writes the SessionEvent wire field list. A Rust test fails when a field is neither set nor listed as "not set in praxis mode".
  • A Rust CI job that runs only on praxis/**, with a size-capped cache. A Go-only PR does not pay for Rust.

Before work starts

Done when

Depends on

Nothing.

Assisted-By: Claude (Anthropic AI) noreply@anthropic.com

Metadata

Metadata

Assignees

Labels

laptopThe local (laptop) tool: install, abctl, the numbers

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions