← all posts

Hardpoint Guardian: The Dual-Runtime Policy Engine Philosophy

A source-first policy engine where neither Python nor Rust is the reference — conformance fixtures are the arbiter of correct behavior.

The Core Principle: No Reference Implementation

Hardpoint Guardian's most foundational decision is that neither the Python nor Rust runtime is the reference implementation. Both implement the same normative contract defined in spec documents.

Why This Matters

  • Portability: Teams choose the runtime matching their stack without fear of divergent behavior
  • Accountability: Conformance fixtures in conformance/cases/ are the arbiter, not one runtime's implementation
  • Future-proofing: New language bindings can be added without rewriting policy logic

The spec explicitly states: "Never: make one runtime the implicit reference implementation or accept an unsupported enforcement field."

The Contract Path

Four normative contracts exist:

  • Policy Language v1 (spec/policy-language-v1.md)
  • v2 Fixed-Window Rate Limits (spec/2026-08-11-v2-fixed-window-rate-limits.md)
  • Inline Enforcement Adapter (spec/2026-08-11-inline-enforcement-adapter.md)
  • Durable Audit and Explicit Policy Lifecycle (spec/2026-08-11-durable-audit-and-policy-lifecycle.md)

Both runtimes must pass shared conformance cases. If behavior changes in one, you must update the spec and add a conformance case first.

Source-First, No Packages (Yet)

The project is v0.1 and "ready to integrate from source." It does not publish Python packages or Rust crates. This is a conscious early-stage decision:

  1. Get the contract right across both runtimes first
  2. Let adopters integrate at their own pace
  3. Avoid premature optimization

Public behavior changes follow this order:

  1. Update the normative specification
  2. Add a shared conformance case
  3. Implement and test both runtimes
  4. Run make check

Conformance as the Release Gate

Every public behavior change follows a strict four-step order:

  1. Update the normative specification
  2. Add a shared conformance case
  3. Implement and test both runtimes
  4. Run make check

This ensures Python and Rust always agree. The make check target runs the full gate: Python and Rust test suites, shared conformance runners, Rust formatting, Clippy with warnings denied, and Rust build.


GitHub: https://github.com/argakiig/hp-guardian