Add typed repository Body observations
This commit is contained in:
parent
cd1a16669b
commit
917d20e2cc
8 changed files with 1535 additions and 0 deletions
|
|
@ -1822,3 +1822,25 @@ RepoModel revision/hash plus matching Mind admission, joined to a separate
|
|||
continuity-bearing Body observation and retrieval coverage for the same source
|
||||
generation. Modeling cannot certify its own freshness; Mind derives readiness
|
||||
from the joined authorities.
|
||||
|
||||
### Repository Body observation boundary
|
||||
|
||||
The bounded repository Body observer supplies only raw `git_worktree` tree state
|
||||
from two equal temporary-index scans. A separate bind step consumes the real
|
||||
runtime swarm binding and pins workspace, source hash, canonical root, object
|
||||
format, scope, and policy; observe has no identity-authoring arguments. It explicitly
|
||||
says continuity unproven and has no Ready field, preventing another freshness
|
||||
oracle before continuity and same-generation retrieval coverage exist. Sparse
|
||||
worktrees fail closed; submodules contribute gitlinks only; integration is
|
||||
deliberately absent.
|
||||
Global excludes are neutralized. Corrupt HEAD and path/runtime/repository
|
||||
substitution fail closed. Only accepted stable observations persist; errors
|
||||
advance no head.
|
||||
One shared Git-command sanitizer removes ambient repository, worktree, object,
|
||||
ref, index, namespace, replacement/graft/shallow, and config-injection variables
|
||||
from every probe and scan.
|
||||
The clean-filtered Git tree OID is explicitly auxiliary. Authoritative Body
|
||||
identity is a domain-separated raw-content manifest root over workspace/scope/
|
||||
policy plus ordered UTF-8 paths, modes/kinds, byte lengths, raw SHA-256 hashes,
|
||||
non-followed symlink-target hashes, and nonrecursive gitlink OIDs. Manifest and
|
||||
manifest-root head share the observation CAS.
|
||||
|
|
|
|||
|
|
@ -767,5 +767,30 @@ revision. Generic thread patches, watcher silence, snapshot source metadata,
|
|||
and unrelated thread revisions are forbidden readiness writers. Until every
|
||||
authority is present and current, Unknown is the truthful result.
|
||||
|
||||
## Repository Body observation substrate (2026-07-15)
|
||||
|
||||
`repository_body_observer.rs` owns bounded `git_worktree` observation. A
|
||||
separate bind command consumes the existing validated runtime swarm binding and
|
||||
pins a caller-supplied workspace ID, exact runtime/swarm/source-identity hash,
|
||||
canonical Git root, object format, scope, and ignore policy; observe cannot mint
|
||||
identity. Two disposable-index `read-tree`/`git add --all -- .`/
|
||||
`write-tree` scans must agree. CultCache MessagePack persists immutable
|
||||
generations and an exact-CAS current head; unchanged raw manifest preserves the
|
||||
generation. `continuity_status` is always `unproven`; there is no Ready field.
|
||||
Sparse checkout fails closed, submodules are gitlink-only, and RepoModel/
|
||||
retrieval/scheduler/Mind integration is absent. The CultCache store must remain
|
||||
outside the observed worktree so observer writes cannot become observed input.
|
||||
Machine-global excludes are disabled during observation. Only accepted stable
|
||||
observations persist; failed/unstable attempts return errors and advance no
|
||||
head. HEAD absence counts as unborn only when a symbolic ref is proven absent.
|
||||
Every Git subprocess strips ambient repository, worktree, object, ref,
|
||||
namespace, index, shallow/graft, and injected-config environment authority.
|
||||
The index owns ignore-aware UTF-8 path, Git mode, and gitlink enumeration; its
|
||||
clean-filtered tree OID is auxiliary. Raw regular-file bytes and lengths, or
|
||||
non-followed symlink-target bytes, feed ordered typed entries. A domain-separated
|
||||
SHA-256 root over workspace, scope policy, and those entries is authoritative
|
||||
Body identity. Manifest, observation, and manifest-root head land in one CAS.
|
||||
Gitlinks remain nonrecursive. Unsafe or unrepresentable paths fail closed.
|
||||
|
||||
This map must change when ownership changes. Historical scars belong in git,
|
||||
evidence, or an explicitly archived note—not in the machine's Modeling state.
|
||||
|
|
|
|||
|
|
@ -1630,6 +1630,29 @@ retrieval coverage bound to the same source generation; Mind derives the joined
|
|||
readiness projection. No current artifact proves that Body head. Do not build a
|
||||
bridge from snapshot metadata, watcher silence, or timestamps.
|
||||
|
||||
## Repository Body substrate landed (2026-07-15)
|
||||
|
||||
Native `repository_body_observer.rs` and `epiphany-repository-body` expose an
|
||||
explicit runtime-bound bind step, observe, pure status, and smoke for
|
||||
`git_worktree` state. Bind pins caller workspace ID to the existing validated
|
||||
runtime/swarm/source identity plus canonical Git root and policy. Two equal
|
||||
isolated Git-index scans feed immutable CultCache observations/current-head CAS.
|
||||
Unchanged raw manifest does not advance generation; missing status creates no
|
||||
store. Continuity remains unproven with no Ready field. Sparse checkout is
|
||||
rejected, submodules are gitlink-only, and downstream joins remain absent.
|
||||
The CultCache store is required to live outside the observed worktree.
|
||||
Canonical path checks run before any bind/store write, global excludes are
|
||||
disabled, and corrupt/non-commit HEAD fails closed. This slice persists accepted
|
||||
stable observations only; failed attempts advance no head.
|
||||
All Git calls share one sanitizer that removes ambient Git repository/object/
|
||||
ref/index/namespace and injected-config authority before applying explicit
|
||||
observation policy.
|
||||
The isolated index enumerates ignore-aware UTF-8 paths/modes/gitlinks, but its
|
||||
clean-filtered tree OID is auxiliary. Raw file bytes (or non-followed symlink
|
||||
target bytes) feed an ordered manifest whose domain-separated SHA-256 root is
|
||||
the authoritative Body identity. Manifest, observation, and manifest-root head
|
||||
commit atomically. Gitlinks are nonrecursive; unrepresentable paths fail closed.
|
||||
|
||||
The deployment next action is unchanged and permission-bound. Do not reboot
|
||||
without exact live operator approval. With that approval, run the real
|
||||
reboot/logon recovery proof already specified above.
|
||||
|
|
|
|||
Reference in a new issue