$ fssg build --deterministic --validate |

Why FACET Makes the Host Profile Part of the Contract

FACET

A contract is not reproducible if the machine interpreting it can silently change the meaning.

That sounds obvious in conventional software. We pin compiler versions, target triples, dependency locks, database schemas, and feature flags because source code alone does not define a build. Yet AI systems often hash a prompt or workflow and call the result reproducible while leaving the host environment implicit.

FACET does not allow that shortcut. Its canonical metadata includes host_profile_id, and the same identity participates in bounded-lens cache keys and execution provenance. I treat this field as part of the semantic address of a run: it names the host-side contract under which a .facet document was interpreted.

This is a narrower idea than “capture the whole environment.” It is also more useful. A host profile should not be a dump of machine state. It should identify only the host behavior capable of changing FACET semantics.

The hidden half of a deterministic document

A FACET document can fix types, variable dependencies, context rules, interfaces, policy, and output shape. The compiler can normalize source, resolve imports, reject invalid states, and render Canonical JSON as an AI intermediate representation. None of this makes an undeclared host extension deterministic.

Consider a bounded lens named retrieve_customer_context. Its public signature may be stable:

string -> list<record>

But the host still controls material behavior:

  • which lens implementation and version the name resolves to;
  • how input is canonicalized before a cache lookup;
  • which registry is available in Pure or Exec Mode;
  • which provider adapter and schema mapping are selected;
  • which deterministic budget the host supplies when the document omits one.

If any of these change while document_hash stays the same, the document identity is not enough. Two runs can claim the same source and policy while executing under different semantics.

The correction is not another free-form environment log. It is a versioned host profile with an explicit identity.

A semantic address, not a hostname

host_profile_id must not mean “server-03” or “Emil’s laptop.” Those labels describe location, not behavior. Moving the same profile to another machine should preserve identity. Changing a semantic rule on the same machine should change identity.

I use this model:

{
  "profile_name": "facet-prod-openai",
  "profile_version": "7",
  "lens_registry": "sha256:…",
  "adapter_set": "sha256:…",
  "default_budget_units": 32000,
  "canonicalization_contract": "host-canon-v2",
  "policy_runtime": "guard-v1"
}

The exact representation belongs to the host implementation, not to the public FACET document. What matters is that the identifier resolves to a stable semantic manifest and changes whenever a field capable of affecting compilation, layout, guarded execution, or rendering changes.

This gives the runtime a clean invariant:

Same resolved document, runtime inputs, mode, policy semantics, and host profile identity must reach the same deterministic boundary artifact.

The model does not promise identical model text. FACET’s deterministic boundary ends before probabilistic generation and external API behavior. The host profile closes ambiguity inside that boundary; it does not pretend the world outside it is deterministic.

Why the profile belongs in three places

FACET v2.1.3 places host_profile_id in canonical metadata. The reference compiler also includes it in the cache-key envelope for Level-1 bounded lenses and in the seed of the execution artifact hash chain. These are not redundant copies. Each closes a different failure path.

Surface What the identity prevents
Canonical metadata Comparing artifacts produced under different host semantics as if they were equivalent
Bounded-lens cache key Reusing a cached result after the lens registry or host canonicalization contract changed
Execution provenance Replaying or auditing guard decisions without knowing which host semantics produced them

The cache case is especially important. A cache hit is only correct when its identity includes every semantic dependency. I made the broader argument in A Cache Hit Is Not Correctness in AI Systems. FACET turns that principle into a concrete key component: a result generated under profile v6 cannot silently satisfy a request under profile v7.

The provenance case is different. An execution artifact records guarded operations and chains their decisions cryptographically. If the chain omits host identity, it can prove that events were not reordered while still failing to prove which registry, defaults, and adapters gave those events meaning. Integrity without semantic context is an incomplete audit.

The invalidation rule

The hard part is deciding what forces a new profile identity. I would rotate it when any host-side change can alter one of these outcomes:

  1. Resolution — a registered lens or adapter name resolves to different code or semantics.
  2. Validation — accepted types, constraints, or extension rules change.
  3. Computation — lens version, trust level, gas behavior, or cache canonicalization changes.
  4. Layout — default budget or deterministic sizing behavior changes.
  5. Rendering — provider mapping or canonical asset conversion changes.
  6. Authorization — guard semantics or effect-class interpretation changes.

Operational changes that cannot affect these outcomes do not require rotation. A kernel patch, machine replacement, logging destination, or CPU upgrade should not create a new semantic identity unless it changes observable contract behavior.

This distinction keeps the profile governable. Hashing every installed package would create noise, not confidence. Ignoring host semantics would create false equivalence. The useful boundary sits between them: include what can change the contract outcome, exclude what cannot.

A practical replay gate

Before accepting an old artifact as replay-compatible, the runtime can apply a small gate:

resolved document hash matches
AND policy hash + policy_version match
AND execution mode matches
AND runtime inputs match
AND host_profile_id matches

A mismatch does not mean the old artifact is corrupt. It means replay equivalence has not been established. The runtime can recompile under the current profile, load the historical profile if available, or refuse an equivalence claim.

That refusal matters. Deterministic systems should fail on unknown semantic identity instead of smoothing it over with a warning. FACET already applies this logic elsewhere: Pure Mode treats a missing bounded-lens cache entry as a correctness signal, and runtime inputs are materialized before dependency evaluation. Host identity is the same engineering move at a larger boundary: make a dependency explicit before execution relies on it.

The remaining boundary

The current FACET specification and compiler establish the role of host_profile_id, propagate it through canonical output, cache identity, and provenance, and test that propagation. They do not eliminate the governance problem for every host implementation. A host still needs a documented rule for deriving, storing, rotating, and resolving profile identities.

That limitation is important. A constant string called prod satisfies a field shape but not the engineering intent. The value becomes trustworthy only when operators can answer: which semantic manifest did it name, when did that manifest change, and can an old run recover it?

I see the host profile as the ABI of the FACET runtime boundary. The .facet file describes the program. The profile describes the interpreter contract. Reproducibility requires both.

Sources

FACET AI CLI Terminal
facet@ai:~$