2026-08-11 00:41:11 +08:00
|
|
|
# ADR 0176: Persona-Native Code Channel Runtime Kernel
|
|
|
|
|
|
|
|
|
|
## Status
|
|
|
|
|
|
|
|
|
|
Accepted on 2026-08-11.
|
|
|
|
|
|
|
|
|
|
## Context
|
|
|
|
|
|
|
|
|
|
HoloLake already has a mature native Git execution layer and an append-only local HLDP event/checkpoint
|
|
|
|
|
mechanism. Neither one is a persona lifecycle controller. A Git repository can preserve history without
|
|
|
|
|
proving that the correct persona brain, node, model binding, organ, attribution, or single-primary lease is
|
|
|
|
|
active. The existing generic Agent streams also cannot become the persona subject.
|
|
|
|
|
|
|
|
|
|
## Decision
|
|
|
|
|
|
2026-08-11 00:58:01 +08:00
|
|
|
Introduce `src-tauri/src/persona_code_channel.rs` as the first GH-PNCC runtime kernel. Its wake command,
|
2026-08-11 00:41:11 +08:00
|
|
|
`prepare_persona_code_channel_wake`, performs a fail-closed preparation stage:
|
|
|
|
|
|
|
|
|
|
1. resolve an exact Git root and full expected `HEAD`;
|
|
|
|
|
2. require a clean work tree;
|
|
|
|
|
3. load `.hololake/persona/manifest.json` with schema `hololake.persona/v1`;
|
2026-08-11 00:58:01 +08:00
|
|
|
4. validate the persona id, human responsibility subject, persona Git identity, pinned model binding, brain
|
|
|
|
|
entry, current checkpoint, and one declared read-only organ without allowing path escape;
|
2026-08-11 00:41:11 +08:00
|
|
|
5. atomically acquire a per-persona primary lease outside the persona Git;
|
|
|
|
|
6. emit `WAKING → BRAIN_BOUND → ORGAN_ACTIVE` as a SHA-256-linked local event journal;
|
|
|
|
|
7. return both human responsibility and persona cognitive authorship in the receipt.
|
|
|
|
|
|
|
|
|
|
`BRAIN_BOUND` deliberately returns `runtimeState=BOUND_NOT_INFERENCING` and
|
|
|
|
|
`modelInferenceStarted=false`. Binding a model identifier is not proof that model inference or persona
|
2026-08-11 00:58:01 +08:00
|
|
|
reasoning has run.
|
|
|
|
|
|
|
|
|
|
The paired `run_persona_code_channel_fact_task` command performs the first complete, bounded cycle. It
|
|
|
|
|
revalidates the session, event chain, Git state, lease, provider id, model id, endpoint, and organ path
|
|
|
|
|
allowlist, requiring that allowlist to include the brain entry and current checkpoint; invokes the existing
|
|
|
|
|
model adapter without vault tools; accepts only structured facts with
|
|
|
|
|
allowlisted evidence; promotes a checkpoint; updates the manifest pointer; makes a two-path Git commit using
|
|
|
|
|
the manifest-owned persona identity; then releases the organ and lease and returns to `DORMANT`. The model's
|
|
|
|
|
thinking stream is ignored and hidden reasoning is never checkpointed.
|
2026-08-11 00:41:11 +08:00
|
|
|
|
|
|
|
|
## Boundaries
|
|
|
|
|
|
|
|
|
|
- Git remains the durable engine; the kernel does not reimplement Git objects, commits, remotes, or merges.
|
|
|
|
|
- Forgejo is not required and remains an optional compatibility collaboration adapter.
|
|
|
|
|
- The primary lease is installation/runtime state, not persona history, and therefore stays outside Git.
|
|
|
|
|
- Runtime events are machine facts for the future HoloLake projection; they do not expose hidden model
|
|
|
|
|
reasoning and do not form a second authority store.
|
2026-08-11 00:58:01 +08:00
|
|
|
- This implements one read-only fact cycle, not arbitrary execution organs, multi-node handoff, packaged
|
|
|
|
|
desktop acceptance, publication, deployment, or online health.
|
2026-08-11 00:41:11 +08:00
|
|
|
|
|
|
|
|
## Consequences
|
|
|
|
|
|
2026-08-11 00:58:01 +08:00
|
|
|
HoloLake now has a native, testable boundary between “a persona Git exists,” “a verified wake has begun,”
|
|
|
|
|
“model inference actually started,” and “a checkpoint was committed before dormancy.” Future organs and the
|
|
|
|
|
human projection can consume the same receipts instead of trusting a UI, Forgejo account, branch name, or
|
|
|
|
|
generic Agent session.
|