ccf-core 1.0.1

Canonical CCF core v1 trust-update and runtime-certificate primitives for filed-Prov6 contract enforcement
Documentation
# ccf-core

`ccf-core` is the canonical CCF v1 Rust library for filed-Prov6 trust-update
and runtime-certificate primitives.

Install:

```toml
[dependencies]
ccf-core = "1.0.1"
```

## What It Provides

- QAC log-geodesic trust updates over strict-positive 3x3 matrices.
- Hard min-gate coupling: `C_eff = min(C_inst, C_ctx)`, then `alpha_t = rho(C_eff)`.
- Runtime certificate computation from update matrices:
  `kappa_hat_t`, `E_t`, dynamic floor, threshold, and fail-closed status.
- Endpoint, precheck, forbidden-policy, context-isolation, envelope, partition,
  Sinkhorn-presentation, and no_std core surfaces used by the public v1
  SpecFlow contracts.
- `#![no_std]` and `#![forbid(unsafe_code)]` for the core crate.

## Example

```rust
use ccf_core::kappa::{certify_update, CertificateInputs, KappaCertificateStatus};
use ccf_core::qac::{qac_update_3x3, Matrix3, PositiveDiagonal3, QacInputs3};

let prior_a_t = Matrix3::new([
    [0.90, 1.10, 0.80],
    [1.05, 0.95, 1.20],
    [0.85, 1.15, 1.00],
]);
let reference_r_t = Matrix3::new([
    [1.02, 1.04, 0.98],
    [1.01, 1.03, 1.00],
    [0.99, 1.05, 1.02],
]);
let alpha_t = 0.32;

let realized_a_next = qac_update_3x3(&QacInputs3 {
    prior_a_t,
    reference_r_t,
    left_l_t: PositiveDiagonal3::try_new([1.0, 1.0, 1.0]).expect("positive left gauge"),
    right_c_t: PositiveDiagonal3::try_new([1.0, 1.0, 1.0]).expect("positive right gauge"),
    alpha_t,
    epsilon_floor: 1.0e-12,
})
.expect("canonical QAC update");

let certificate = certify_update(&CertificateInputs {
    tick_id: 1,
    prior_a_t,
    reference_r_t,
    realized_a_next,
    alpha_t,
    delta_alpha_t: 0.01,
    epsilon_q: 1.0e-4,
    policy_margin: 5.0e-4,
})
.expect("runtime certificate");

assert_eq!(
    certificate.certificate_status,
    KappaCertificateStatus::WithinDynamicFloor
);
assert!(!certificate.fail_closed);
```

## Evidence And Limits

The v1 implementation was merged through branch-protected CI. The computed
runtime path was exercised on real Seed-class `armv7l` hardware by CI run
`28032713872`, Gate C job `82980476112`, with the assertion
`on_device_computed_certificate=PASS kappa_hat<1e-6 C_eff+E_t_evolve cross_consistent=PASS`.

That evidence means the computed certificate runtime executed on real ARM
hardware with driver-fed runtime input. It does not claim real sensor ingestion,
direct device-store validation, universal safety, universal convergence, or
production appliance readiness.

Public contract evidence lives under
`docs2/contracts/ccf-core-v1/` in the repository.

## License

BUSL-1.1. See the repository for the current license text and contract
evidence.