Commit graph

2,314 commits

Author SHA1 Message Date
Meta Vens
80db5db6c0 Give the derivation test a directory of its own
Soul F4. The derivation test wrote its stale copies into one shared temp
directory and cleared it first with `remove_dir_all(...).ok()`. The clear was
best-effort and unverified: a held handle refuses the delete on Windows, `.ok()`
swallows the refusal, and a previous run's file survives in a directory whose
path the failure message invites the reader to copy from. The mutation suite
runs M8 and M11 against this test and never cleans up after them, so the
leftovers it would hide are mutated schemas no committed type produces.

The directory is now per-run, named by process id and nanosecond, so there is
no sharing to defend and the clear and its `.ok()` are gone rather than
hardened. It is still created only when something is stale, so a passing run
leaves nothing behind.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 12:17:42 +02:00
Meta Vens
b6f6e8023c Read an instance key back as an instance id
Soul F3. `pipeline_key` made the instance a root and `pipeline_id` was left
behind: it special-cased `campaign` alone and demanded three `:` segments of
everything else, so `PipelineRef { kind: Instance, id: "yggdrasil" }` was
refused as `InvalidFormat` and no resolution could ever take an instance as its
subject. The reader now knows both roots.

Nothing caught it because the key tests assert strings and never read one back.
`keys_read_back_as_ids_of_their_kind` walks every sample, keys it, and parses
the key back as an id of its kind; a resolution is the one kind whose key is
not an id of itself, so its subject is what reads back.

That test also carries Soul F2, which was Soul's surviving mutation: the
instance root's slug was validated nowhere the key could see, so an instance
named `thought cage` keyed to `thought cage` -- a store key holding a byte no
`Label` may carry. Stewardship and hand-off validate every slug they key by;
the instance now does too, and M14 is Soul's survivor turned into an entry.
M15 puts the shipped reader back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 12:16:50 +02:00
Meta Vens
eb55efe9c9 Make the repo key escape injective
Soul F1. `/` -> `_` is not injective: `GameCult_Epiphany/thing` and
`GameCult/Epiphany_thing` both key to
`yggdrasil:stewardship:GameCult_Epiphany_thing`, so an instance stewarding both
silently loses one document. Keys are identity, not convenience.

`_` is now escaped too, and both codes are two bytes starting with `_`: `_`
becomes `__` and `/` becomes `_-`. Every other byte passes through and is never
`_`, so a reader going left to right takes each `_` with the byte after it and
never has a choice to make. The encoding is reversible, therefore injective.
That is the smallest change that buys the property: nothing else moves, and the
segment stays inside the `Label` byte class.

The test claimed the property and checked one half of the colliding pair, which
asserts nothing about collision. It now keys both halves and asserts they
differ. M12 is re-anchored on the new spelling, and M13 is new: it puts the
shipped `/` -> `_` back, which the pair kills.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 12:14:46 +02:00
Meta Vens
08c1c9d907 Carry the mutation suite across the package boundary
Every rule the moved code carries keeps a test that fails under its own
mutation, so the suite moves with the code rather than being left pointing at a
file that no longer exists. M1-M9 are Cut 4's entries re-anchored into
`epiphany-pipeline/src/lib.rs`; each entry now names its own package as well as
its own file, because M10 still mutates the spine in epiphany-core. All twelve
were run and all twelve were killed by their own test.

M10's mutation changed shape. It used to register the pipeline documents into
the spine's schema cache, and epiphany-core no longer has them; it now declares
its own type carrying `epiphany.pipeline.campaign.v1` inline, exactly as the
test it attacks now does.

Two entries are new. M12 keeps the repo escaping honest: drop the `/`-to-`_`
substitution and `stewardship_key_escapes_the_repo_slash` fails. M11 is the
cut's "change a value type and leave its schema alone" mutation, expressed as a
new enum variant rather than a new field: a field cannot be added without
breaking every struct literal that builds the value, which fails the whole
target and would prove nothing about the derivation test in particular. M11
changes exactly one derived schema, and the test names exactly that one.

`tools/eureka-cut4-mutations.ps1` is deleted rather than left to throw. Every
one of its ten entries is above, and its first act was to read a file this
branch moved, so it could not run again. It still runs at `a9f06c2a`, where its
receipt is.

The derivation test now empties its derived-schema directory before writing to
it. It did not, and this pass nearly published a schema from an earlier
mutation run's leftovers: the directory is shared, `Short` had `maxLength: 201`
in it from Cut 4's M8, and a copy of everything in there landed in the working
tree before the diff caught it. The gate that exists to stop a hand-written
schema should not be the thing that hands one over.

The stale-anchor guard is unchanged and still hard: an anchor that matches
anything but exactly once throws before a single test runs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 11:46:30 +02:00
Meta Vens
d17cc4415f Stop telling readers pipeline state lives in a repo
The Main Families entry still said pipeline state is "stored per repo at
`.epiphany/pipeline/pipeline.cc`", which Cut 4 deleted, and the wire note still
sent these contracts to the voidbot projection. Both describe a machine that no
longer exists.

Pipeline state now lives in an instance's mind, owned by the Huginn memory
organ, and the contracts cross to that organ and its `eureka-state` client. The
three kinds this branch added are named, since the list is the entry's point.
The `[value]` payload sentence, the derivation sentence and the Q2 evolution
sentence stand; the derivation sentence now says which package runs the check.

Documentation only: no build, no test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 11:40:25 +02:00
Meta Vens
7ab838f167 Extract epiphany-pipeline, and add the three kinds a mind is keyed by
Ruling 1 keeps schema ownership in Epiphany; ruling 17 puts admission in
Huginn. Huginn must not take on epiphany-core -- about 41,000 lines and 295
lock packages -- to use about 1,000 lines of document types. So the documents
leave as a leaf library, and epiphany-core keeps no pipeline surface at all:
its consumption is campaign two.

`epiphany-core/src/pipeline_documents.rs` moves whole to
`epiphany-pipeline/src/lib.rs`, with its nine tests. Only three things changed
in the move: the module doc now describes a package rather than a cut map
section; `anyhow` joins `rmp-serde` behind `cfg(test)`, because the write path
has been test-only since 186dbc62 and the live library's errors are all
`PipelineRefusal`; and the decode refusal, which was pinned against
epiphany-core's Mind commit receipt, is pinned against a local `ForeignDocument`
carrying that receipt's type id, since the receipt belongs to the harness.

The package declares four dependencies. chrono parses a Date, cultcache-rs
supplies DatabaseEntry, schemars derives the published schemas (Q5), and serde
is the document format. anyhow, rmp-serde and serde_json are dev-dependencies:
every use of them is `cfg(test)`. `autobins = false`, as a leaf library must.
The workspace lock grows by exactly one entry, the member itself; no new
third-party package.

Deleted rather than re-exported: epiphany-core's `mod pipeline_documents;` and
`pub use pipeline_documents::*;`, and `schemars` from its manifest, whose only
user was this module. No shim, no duplicate type.

`runtime_spine_cache_refuses_a_pipeline_store` stays in epiphany-core, because
the rule is the spine registry's: it registers its own types and nothing else.
It now builds its foreign envelope from a `cfg(test)` stand-in carrying
`epiphany.pipeline.campaign.v1` rather than from the moved documents, so the
rule keeps its test without the package keeping a dependency.

D2's three new kinds arrive with the move, each with a live consumer in the
organ: `instance` is a mind's identity document, `stewardship` records the
repos an instance is assigned, and `hand_off` records a reassignment in both
minds. All three hang off an instance rather than a campaign, so they compose
their own keys instead of borrowing the `<campaign>:<kind>:<local>` tail. A
repo inside a key is escaped to `Org_Repo`, because `/` is not a Label byte.

Thirteen schemas now derive. The five that embed `PipelineKind` gained three
enum variants, which is additive, so Q2 keeps `epiphany.pipeline.epoch.v1`.

epiphany-pipeline: 12 tests, 0 warnings. epiphany-core: 163 tests -- 172 minus
the nine that moved -- 0 warnings. epiphany-state.exe is byte-identical.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 11:40:12 +02:00
Meta Vens
93463160b3 Close Cut 5: pin one handle and every write, and correct the receipt count
The regression Soul found is pinned at its real layer: a backing store carries
only its path, so no assertion about files or receipts can see a same-path
re-derivation, and the test now counts resolutions instead. A batch of two
writes with the second refused pins that every write is validated.

The map's own claim of one receipt construction site was wrong in two places,
including an authority-map line. There are two: the owner's, and a test that
plants one on purpose to pin the replay rule.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 11:23:43 +02:00
Meta Vens
617c397d88 Close Soul's Cut 5 findings: pin one handle, and every write
Soul mutated the collapsed commit owner twice and the suite survived both.
Neither rule was pinned; both are now, each by a test that fails under its own
mutation, and both mutations join the suite so the gap cannot reopen.

S7, a regression from base. The owner resolves the backing store once and
reuses it for the cache load, the CAS and the conflict re-read, and its doc
comment says no path in the function can target a second store. Re-deriving the
CAS handle from the same path left the whole suite green. The old profile test
had caught it only because its store was deliberately not the commit path; the
replacement asserted the temp dir holds one store, which a same-path
re-derivation satisfies exactly. A handle carries nothing but its path today,
so no assertion about files or contents can see the second one. The `.redb` arm
makes the difference real -- redb permits one writable handle per path -- and
the map plans redb for the organ's minds.

So the probe is the resolution itself: `runtime_spine_backing_store` records
every path it hands out, under `cfg(test)` only, and
`mind_commit_reads_and_writes_one_store` asserts a commit resolves its store
exactly once. The log is per-path and compared as a delta, so tests running in
parallel cannot see each other. Mutation MS1 re-derives from the same path and
the count reads 2.

S8, pre-existing. Narrowing validation to the first write also survived,
because no test committed a batch carrying more than one distinct write. The
existing mutation neuters validation for every write, which any single-write
batch catches; nothing covered the loop's reach. Added
`mind_commit_validates_every_write_in_the_batch`: two distinct writes, the
second refused, and the batch is refused whole with nothing written -- the
valid first write included. Mutation MS2 takes the first write only and the
test gets a commit where it expected a refusal.

M2's rule text is corrected to match what it actually pins, now that MS2 owns
the stronger half.

S10, cosmetic. The renamed test's fixture still said "mind-profile-test" after
the profile it named was deleted. The pinned receipt digest does not depend on
it and is unchanged.

Builds clean: 172 tests, 0 warnings. Seven mutations, each killed by its own
test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 11:21:16 +02:00
Meta Vens
bf990d1869 Record Soul's Cut 5 findings and the batch closing them
Soul confirmed the collapse changed no Mind behaviour, reading the owner diff
where the pinned digest is blind. It found that the replacement test pins only
"one file in this directory", so re-deriving the backing store at the CAS
survives, and that validating only the first write of a batch survives too.
Neither is a live bug today; the first is a regression from base and matters
once redb arrives, and the second is pre-existing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 11:02:04 +02:00
Meta Vens
c18e334ab7 Record Cut 5 landed: the commit profile is collapsed
TypedCommitStore, its const, its validator and the parameter are gone, with
nothing of the profile shape kept. The Mind receipt digest was proven unmoved
by running the pinning test at the base commit in a detached worktree, not by
a value captured from the new code.

Three corrections stand: ruling 20's uniqueness-ordering half had no named
test until this cut added one; the Deletes table's line anchors were stale by
26 lines, so later cuts should re-anchor before trusting a line number here;
and the subtraction estimate missed the test rewrite the Keeps list implied.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 10:50:13 +02:00
Meta Vens
4c091f57db Commit the Cut 5 mutation suite
Five rules, five tests, five mutations, each killed by its own test. Three come
from the cut spec (drop the epoch check from the opener, make the validator a
no-op, make the owner read one store and write another) and two are Soul's
finding S6, which is the reason this collapse is allowed to touch the Mind path
at all: ruling 12 put write validation after identity-uniqueness and after the
store opens, and before the replay check.

The order rules cannot be expressed as one string replacement, because moving a
statement is a deletion and an insertion. So an entry here carries a list of
edits rather than Cut 4's single Old/New pair, and every edit is still asserted
to match exactly once and to change something. A stale anchor throws instead of
reporting a verdict it did not earn. Files are restored in a finally block, and
every file an entry touches is restored, not just the last one.

M4 and M5 are the two halves of the order. M4 hoists validation above the
uniqueness checks and the duplicate-batch test catches the wrong refusal. M5
moves validation below the replay answer, and the planted-receipt test gets a
stored receipt handed back for a batch the validator refuses, which is exactly
the state S6 says must be impossible.

Builds: no code change. The script is not wired into any build or test target;
it is run by hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 10:44:55 +02:00
Meta Vens
1758ad5006 Collapse TypedCommitStore into the Mind commit owner
Cut 2 generalised the one commit owner into a profile so a pipeline profile
could share it. Ruling 20 sends admission to Huginn, so the second profile left
the repo and the abstraction had exactly one implementation. A
one-implementation abstraction is a named STOP condition, so it goes. Cut 2's
generalisation did not pay off; this says so rather than keeping the shape to
avoid admitting it.

Deleted: `struct TypedCommitStore`, `const MIND_COMMIT_STORE`, the
`store: &TypedCommitStore` parameter, `fn validate_mind_writes`, and the
`&MIND_COMMIT_STORE` argument at each of the five Mind wrappers. The three
choices the profile carried are re-inlined at their one use: the backing store,
the runtime spine opener, and the write validator, plus the literal
"epiphany-mind" as the receipt's store id. `RuntimeSpineBackingStore` lost its
last use in this file and left the import.

Behaviour is unchanged, including the pinned receipt digest
mind-commit-sha256:415283...281e. The owner's order is unchanged and stays
fail-closed: identities unique, store open (which refuses a foreign epoch),
writes validated, and only then may a stored receipt answer a replay.

The profile's two tests could not survive the thing they tested, so their rules
are re-expressed against the concrete owner. The two profile-shaped tests are
replaced by three that reach the same rules through the Mind path:
validation-before-replay now plants exactly the receipt the batch would produce
and asserts the refusal wins; uniqueness-before-validation pins which refusal a
duplicated invalid batch reports; and one-store asserts a commit touches only
the store it was given. Two surviving tests lost "profile" from their names,
which had become a lie.

Builds clean: 171 tests, 0 warnings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 02:44:40 +02:00
Meta Vens
cda365419b Close Cut 4: the write path is test-only and the suite is exact
Soul proved the two dead-code waivers were hiding genuinely dead items, so the
pipeline write path is now cfg(test) and says what it is; decode and the cache
imports came with it. The mutation suite documents the interpreter this host
has and asserts each anchor matches exactly once.

Cut 6 inherits four gated items rather than two live ones, and must refresh a
stale line citation. The refusal variants still have no reachable non-test
raiser, which is Cut 8's to fix when the organ exists.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 02:33:35 +02:00
Meta Vens
06100d8e30 Make the mutation suite runnable and its anchors exact
Soul's F10 and F11 on the Cut 4 fix batch.

F10: the header documented `pwsh -File`, but this host has no pwsh — only
Windows PowerShell 5.1. Document the invocation that actually runs, and refuse
anything older or non-Windows up front with a message naming the supported
call, rather than failing later on a cmdlet or path difference.

F11: the anchor guard only proved a match existed, while `.Replace` mutates
every match. A second site would have changed more than the entry describes,
and the named test could then fail for a reason the entry does not name — which
reads as "killed". Assert exactly one site instead. Every current anchor already
matches once, so this guards against growth, not a live defect.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 02:31:18 +02:00
Meta Vens
186dbc62d7 Say that the pipeline write path is test-only
Soul's F9 on the Cut 4 fix batch: `prepare` and
`validate_pipeline_write_envelope` still wore
`cfg_attr(not(test), expect(dead_code))`, and Soul proved both dead in a
non-test build. `prepare` was structurally unreachable — it needs a CultCache
with the pipeline types registered, and the only registrar has been `cfg(test)`
since this cut. A waiver that describes a caller Cut 8 has not written yet is
the file claiming a live path it does not have.

Both become `#[cfg(test)]`, which is what they honestly are, and the waivers go.
Two things are test-only with them: `decode`, whose only caller was the
validator, and the `CultCache`/`CultCacheEnvelope` imports, which looked live
only because dead code mentioned them. The live path keeps the type ids.

Cut 6 now moves four `cfg(test)` items rather than two live ones; the spec's
Keeps list still holds, since what moves is the same code under a different
gate. The refusal picture is unchanged: `ForeignStore` and `InvalidIdentity`
were already raised only from these two, and the enum stays `pub`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 02:31:18 +02:00
Meta Vens
07f19d3635 Record Cut 4's Soul findings closed by deletion
Soul found the subtraction had taken a live rule's only test with it: the epoch
guard survived a `if false` mutation, and nothing could construct an identity
envelope to reach it. Rather than test state nothing can build, the epoch
branch, ForeignEpoch, the identity, provenance and faculty types and the epoch
constant are deleted; Cut 8 writes them in the organ where a test can reach
them.

Two live rules are pinned instead: decode refuses a foreign-typed envelope with
ForeignStore specifically, and the runtime spine cache refuses a pipeline
store. Four further corrections stand against the sections above, including the
Keeps list and the test count.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 02:05:09 +02:00
Meta Vens
8a598ebbed Pin the two restored rules with mutations, and match anchors to the file
M9 and M10 are the mutation half of the previous commit: a rule with no mutation
is a claim, not a pinned rule.

M9 replaces the `ForeignStore` refusal in `decode` with a payload format error.
The envelope is still refused, so a test asserting only "this fails" would pass
either way; the test asserts the refusal itself, and dies. M10 registers the
pipeline document types into `runtime_spine_schema_cache`, which is exactly the
mechanism the spine refuses a pipeline store with — the registry, not the epoch
check. With the types registered the store opens and the test dies. Both aim at
the rule rather than at an arbitrary neighbouring line, which is what makes the
kill mean something.

The suite now spans two files, so every entry names its own, and the first run
caught a rake worth keeping: the anchors here are written with plain newlines
and the working tree is CRLF, so a multi-line anchor matched nothing. M1 to M9
are single-line and never spanned a newline, which is why the flaw surfaced only
when M10 arrived. Normalizing towards LF was backwards; the anchor is now
converted to whatever endings the file has. The stale-anchor throw did its job:
it refused to report a pass it had not earned.

Ten mutations, ten killed, each by its own named test alone. Sources are
restored byte-identical to HEAD afterwards.

Builds: no code change; the script is run by hand and is wired into no target.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 02:03:14 +02:00
Meta Vens
43a08baa3c Delete the unconstructable identity cluster and pin the two live refusals
Soul's Cut 4 pass found one rule no test could reach and two with no test left
standing over them. F1 is the sharp one: `validate_pipeline_write_envelope`
raised `ForeignEpoch` for an identity envelope, but `EpiphanyPipelineIdentity`
had no constructor anywhere in the repo, so no test could build one to reach the
branch. Replacing the guard with `if false {` left all 168 tests passing. Code
that cannot be constructed cannot be tested, and testing it would have meant
writing the constructor the organ is going to own anyway.

So it goes, rather than growing a test to justify it. Deleted: the epoch branch
and the `ForeignEpoch` variant, `EpiphanyPipelineIdentity`,
`EpiphanyPipelineProvenance`, `PipelineProvenance`, `Faculty`, and
`PIPELINE_SCHEMA_EPOCH`, whose only reader was the deleted branch. D2 already
assigns admission, identity and the epoch refusal to `huginn-mind`; Cut 8 writes
them there against a store its tests can construct. Carrying about fifteen
unreachable lines across two repos costs more than re-adding them where they
work. Every one of the four types was checked for a live producer first: none
has one, in code, test, schema file or `index.json`.

What stays is what is reachable: `validate_pipeline_write_envelope` keeps its
bounds, formats and key recomputation, and `PipelineRefusal` keeps four variants,
each with a raiser.

Two tests for the two rules that survived Cut 4 untested. F2:
`decode_refuses_an_envelope_of_a_foreign_type` pins the `ForeignStore` refusal
against a commit receipt — a type a pipeline store may legitimately hold, and
still not a document. The existing round-trip test pinned only the positive
match. F4: `runtime_spine_cache_refuses_a_pipeline_store` restores coverage that
died with `pipeline_store.rs`, against the surviving mechanism in
`runtime_spine.rs`. It asserts first that `validate_runtime_store_epoch` passes
a pipeline store, because every neighbouring test is epoch-based and the epoch
checks cannot see this: the registry is the only thing refusing.

`register_pipeline_document_types` is now `#[cfg(test)]` instead of a live path
wearing `expect(dead_code)`. Its only callers are tests, and saying so is
honest; the organ registers its own types in Cut 8.

Builds: `cargo test -p epiphany-core --lib`, 170 passed, 0 failed, 0 warnings.
`cargo check -p epiphany-release-bundle --bin epiphany-state` clean. Mutations
for both new rules land with the next commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 01:56:27 +02:00
Meta Vens
592b79cabd Record Cut 4 landed and correct the spec's refusal and test arithmetic
The repo-owned store layer is gone: 1,302 lines removed, one store format, one
lease and two git preconditions retired. Eight tests moved with the code rather
than waiting for Cut 6, so no rule sits unpinned between cuts.

Four corrections stand against the sections above: the local PipelineRefusal
keeps five variants because decode and validate_pipeline_write_envelope still
raise two of them; the deleted module held 20 tests, so the count is 168; Cut
6's estimate grows to about -1,060 now that the tests travel with the module;
and the schemas README still describes the old store path, which Cut 6 owns.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 01:32:18 +02:00
Meta Vens
a9f06c2ae5 Commit the Cut 4 mutation suite
Soul's standing finding S9: the previous pass claimed 27 mutations with no
artifact on disk, so the claim could not be checked. This is the reproducible
form. Each entry names one rule a surviving test claims to pin and the exact
source change that removes it, as a literal string replacement in
`epiphany-core/src/pipeline_documents.rs`. The script applies one mutation,
runs that test alone, restores the file, and fails if any mutation survives.

Eight rules, one per test carried into this cut: type-matched decode, UTF-8
byte bounds, the single-slash `OrgRepo`, key recomputation at validation, the
dot-free finding label, the parent marker character, a `PipelineRef` id parsed
as a full id of its kind, and the byte-for-byte schema derivation.

Builds: no code change. The script is not wired into any build or test target;
it is run by hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 01:24:28 +02:00
Meta Vens
ca275c7b35 Delete the repo-owned pipeline store, lease and git layers
Cut 4. Rulings 14 and 15 moved the state off the repo: an instance owns its
mind and a service owns that state. Every layer that existed only to make a
repo-resident, git-committed, multi-clone store safe is now dead weight.

`epiphany-core/src/pipeline_store.rs` goes whole, 1,251 lines: the commit
profile, the epoch/foreign-type opener, the committed-blob checks, the
main-work-tree resolution, the read handle, the writer lease and its branch
binding, the holder record, and the 20 tests that pinned those rules. With it
go `PipelineWriterHolder` and its wrapper, `validate_pipeline_writes`, the two
`lib.rs` lines, the `.gitattributes` binary marker and the `.gitignore` lock
line. No Epiphany code can now open a pipeline store, take a lease, or read
git for pipeline purposes.

`pipeline_documents.rs` gains a local `PipelineRefusal` in place of the import.
D2 splits the landed thirteen variants: the six repo-store refusals
(`NotRepoRoot`, `NoMainWorkTree`, `StoreNotMarkedBinary`, `LockNotIgnored`,
`WrongBranch`, `WriterLeaseHeld`) die here, and so do `MissingIdentity` and
`Unavailable`, which lost their last raiser with the opener and the lease.
`ForeignEpoch` and `ForeignStore` stay because `decode` and
`validate_pipeline_write_envelope` still raise them; D2 hands them to the organ
when admission moves.

The seven document tests the cut map names, plus the schema derivation test,
move into `pipeline_documents.rs` rather than waiting for Cut 6, so no rule
sits unpinned in between. They lose the git scaffolding that has nothing left
to set up, and the key test now validates one envelope directly instead of
going through the deleted batch validator. Sample payloads that named the
deleted file were rewritten so the negative greps are honest.

This cut removes an owner and installs no replacement; the organ becomes the
owner in Cut 8.

Builds clean with no warnings: `cargo check -p epiphany-core --lib --tests`
and `cargo check -p epiphany-release-bundle --bin epiphany-state`.
`cargo test -p epiphany-core --lib` passes 168/168, down from 180: 20 tests
died with the file and 8 came back with the documents.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 01:24:28 +02:00
Meta Vens
beff45719a Rule Q6-Q9: declared identity, WireGuard, collapse, shared Qdrant
Operator ruling (2026-09-16, "all recommendations ok"): instance identity is
declared attribution rather than signed authentication on a single-operator
LAN; the workstation reaches the organ over WireGuard, because RUDP is UDP;
TypedCommitStore collapses now that its second profile lives in another repo;
and the organ shares voidbot's Qdrant with the coupling declared as an Idunn
dependency.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 01:09:54 +02:00
Meta Vens
304832ad6c Re-map Eureka onto the memory organ and fence the old model as history
Imagination rewrote the means for instance-owned minds: Cuts 4-16 cover
subtraction, the epiphany-pipeline leaf library, Huginn's retirement and its
new huginn-mind and huginn-daemon bodies, Qdrant and Ollama, hand-off and
import, the eureka-state MCP client, deployment, skill wiring and a proof.
Cuts 1, 2 and 3a and the dead rulings sit under a history fence.

pipeline_store.rs dies whole (1,251 lines), and Epiphany's net change across
the campaign is negative. Admission moves to Huginn rather than dragging
epiphany-core into the daemon; Epiphany keeps the documents and schemas
through the leaf library, so ruling 1 holds.

Self bound Soul's S-labels to the new layers and corrected five places where
the target had drifted from the Body: the Ollama endpoint, the scope of
Huginn's authority vacancy, the surviving refusals, the thirteen document
kinds, and import not being a merge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 01:03:25 +02:00
Meta Vens
5fb4eb222c Rewrite the Eureka target onto instance-owned minds in a memory organ
Operator rulings (2026-09-16), superseding the repo-owned store:
- an instance owns its mind, and stewardship over repos is an assignment;
- a service on Yggdrasil owns the state, so minds leave version control and the
  per-clone lease, git preconditions and divergence go with them;
- the organ depends on Qdrant directly, not on voidbot, and embeds through
  Ollama on Nightwing;
- Huginn becomes that organ, and generic .cc inspection belongs to CultCache
  Studio.

The organ speaks CultNet with eureka-state as a thin stdio MCP client; an
unreachable organ refuses loudly rather than spooling. Cut 3a's documents,
keys, validation and refusals survive; its store, lease and git layers do not.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 00:31:34 +02:00
Meta Vens
79b87eee66 Record the Cut 3a fixes and the two accepted deviations
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 23:15:50 +02:00
Meta Vens
a317d4cf26 Isolate the marker rule and the enclosing-repo case
The first attempt at these two tests still failed no mutation, because in both
cases another check answered first. A test that only passes is not evidence; it
has to be the thing that fails when its own rule is removed.

The marker rule. `cut-3a.h1` and `cut-3a.s1` cite the wrong kind's marker, but
`h1` and `s1` are not digits, so the digits rule refuses them whether or not the
marker is required. `cut-3a.1` is the case that isolates it: a well-formed
number with no marker at all, which only the marker rule refuses.

The enclosing-repo case. A separate git dir in its own temp directory is refused
even without the `.git` check, because the parent is not a work tree and the
toplevel verification fails anyway. The case the check actually exists for is a
clone whose git dir sits inside *another* repo's working tree: there the common
dir's parent is a real, valid work tree, so without the check `main_work_tree`
resolves to the enclosing repo and the store lands in a tree that does not own
it. The test now builds exactly that, and asserts the enclosing repo's store is
never created.

Builds clean with no warnings; `cargo test -p epiphany-core --lib` passes
180/180.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 23:11:46 +02:00
Meta Vens
187e01e7b3 Pin the marker rule and the odd-layout refusal on their own
The mutation pass found two rules that no test failed for, both because an
earlier check answered first.

The marker rule. Every bad parent in `parent_ids_are_parsed_strictly` also
violated the digits rule, so removing the `<marker>` requirement altogether
(Soul's S3) still refused every case and killed nothing. Two cases now cite the
right kind with a well-formed number and the wrong kind's marker, which only the
marker rule refuses.

The odd-layout refusal. `a_bare_clone_has_no_main_work_tree` asserted
`NotRepoRoot`, which a bare clone hits before `main_work_tree` is ever reached,
so `NoMainWorkTree` was unpinned and dropping the `.git` check failed nothing.
The test is renamed to `a_bare_clone_is_not_a_repo_root` for what it actually
pins, and `a_separate_git_dir_has_no_main_work_tree` covers ruling 10's odd
layout: a work-tree top level whose git dir is not a sibling `.git`, refused on
both the write and the read path.

Builds clean with no warnings; `cargo test -p epiphany-core --lib` passes
180/180.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 23:06:20 +02:00
Meta Vens
b4f88d2980 Close Soul's Cut 3a findings and land rulings 10-12
One store per clone, numeric attempt and pass, and identity enforced by the
profile that owns the commit. The three files change together because the
profile's validator signature, the documents that implement it and the store
that installs it are one interlocking contract; no smaller split builds.

Ruling 10, one store per clone. `main_work_tree` resolves the clone's main
working tree from any worktree through the git common dir, and both
`PipelineStore::open` and `PipelineWriter::attach` go through it, so a caller
in a worktree reads and admits into the main tree's store. A bare clone or any
layout without one main tree refuses `NoMainWorkTree`; there is no
worktree-only mode. `require_branch` binds to the main tree, so a campaign
whose branch is checked out only in a linked worktree is refused rather than
quietly given a second store.

Ruling 11, numeric labels. `attempt` and `pass` are `u32`, keyed
`cut-<cut>.h<N>` and `cut-<cut>.s<N>`.

Ruling 12, identity on first write. `TypedCommitStore` now validates a whole
batch against the image it will be applied to (`validate_writes`), replacing
the per-envelope hook rather than adding a second one. The pipeline profile
refuses a first write that does not carry the identity, so the single owner can
never admit a store its own opener refuses (F1).

F2: a finding label carries no dot and parent locals parse strictly, so two
documents cannot compose one key. Soul's collision pairs are tested.
F3: parent ids are parsed with an exact segment count, a campaign match, a kind
match, a validated local, and a marker followed by digits.
F4: a resolution's subject id is validated as a full id of its declared kind,
by `PipelineRef` itself, so kind and id cannot disagree anywhere.
F5: the ten document wrappers, the identity, provenance and holder wrappers and
their value fields are crate-private, and the crate's only commit path to a
pipeline store is a `cfg(test)` helper taking `&PipelineWriter`. Binding the
owner to the lease is Cut 3b.
F6: covered by ruling 10, with the previous claim corrected: a worktree does
not keep its own store, and a second attach from any tree is refused.
F7: the holder record is written only under the lock and removed on drop, and a
refusal names a holder only when it is plausibly current, matching host and
live process incarnation. A record left by a crash names nobody.
F8: the git checks read the committed blob at HEAD, so they answer the same on
every machine. Attribute and exclude files are nulled on every git child. The
working tree and `.git/info/exclude` deliberately do not count, because the rule
is about what the repository commits.

Low items: `value_types!` is the single field list, emitting each struct and its
`Bounded` impl from the same tokens, and format rules moved into the field types
(`Label`, `Slug`, `OrgRepo`, `FullSha`, `Sha256Hex`), so a field cannot be
declared without being validated and a list without a cap does not compile. That
applies the `Org/Repo` check to every repo field. `LandedNameKind` is deleted and
`LandedName` is a name and a path. The schemas carry `maxLength` and `maxItems`.

Builds clean with no warnings; `cargo test -p epiphany-core --lib` passes
179/179.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 22:55:00 +02:00
Meta Vens
0c3efe32fe Make the session the operator channel, with swappable notification
Operator ruling: Eureka has no Persona. Self is the operator surface, and a
blocking question may be pushed through whatever notification MCP the user
configures, so Eureka owns no transport. Answering over a chat channel is a
later campaign.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 22:41:39 +02:00
Meta Vens
74ba6aa9f6 Record Cut 3a landed, its Soul findings, and rulings 10-12
Operator rulings (2026-09-15):
- one store per clone, in the main working tree, with worktrees admitting into
  it;
- numeric attempt and pass numbers, counted per cut;
- the commit profile owns identity-on-first-write.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 22:27:25 +02:00
Meta Vens
ad18c385dc Add pipeline documents, store opener, writer lease and schemas
Cut 3a of the Eureka pipeline state campaign (cut map D1-D3).

- pipeline_documents.rs: the ten kinds as serde + JsonSchema values in
  one-slot DatabaseEntry wrappers (epiphany.pipeline.<kind>.v1), the
  identity, provenance and writer-holder documents, UTF-8 byte bounds,
  semantic key derivation, and the pipeline write validator (bounds, then
  key recomputation).
- pipeline_store.rs: PipelineStore::open (read-only, no lease),
  PipelineWriter::attach (fs2 lock in the git common dir, display-only
  holder file, binary/ignore checks), require_branch, PipelineRefusal,
  and PIPELINE_COMMIT_STORE on the one commit owner. The opener refuses
  foreign types, missing identity and foreign epochs before attaching.
- schemars 1 is an unconditional core dependency (Q5-A); the ten published
  schemas are derived and checked byte-for-byte, with index.json entries.

The profile and the prepare path carry expect(dead_code) naming Cut 3b as
their consumer, so the attribute fails the build once admission uses them.

Builds: yes. cargo test -p epiphany-core --lib: 171/171, 0 warnings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 21:55:04 +02:00
Meta Vens
a1473c452b Mark the pipeline store binary and ignore its lock
Cut 3a (D2): git never merges the bytes of .epiphany/pipeline/pipeline.cc,
so every divergent merge goes through the merge command. Without `binary`, a
NUL-free MessagePack store is classified as text on a core.autocrlf=true
machine (probe P8). The per-operation cultcache-rs sibling lock is ignored.

The published pipeline schemas are pinned to LF so the byte-for-byte
derivation test holds on a CRLF checkout.

Builds: no code change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 21:55:04 +02:00
Meta Vens
5f98228d15 Record the Cut 2 fixes landed and the replay decisions for Cut 3b
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 21:34:22 +02:00
Meta Vens
cb6ef5d2c3 Make the commit profile own its backing store and pin its rules
Soul's Cut 2 findings, fixed before Cut 3a.

- TypedCommitStore gains `backing_store: fn(&Path) -> Result<RuntimeSpineBackingStore>`,
  and `open_cache` now takes the resolved store instead of a path. The owner
  resolves the store once per commit and uses it for the cache load, the batch
  CAS, and the conflict re-read, so a profile can no longer read one store and
  write another. The hard-coded `runtime_spine_backing_store(store_path)` calls
  in the owner are gone.
- `runtime_spine_cache` delegates to the new `open_runtime_spine_cache`, which
  the Mind profile uses as its opener. The epoch check stays in that opener.
- The profile's implicit contracts are documented on the type.
- Tests: the test profile's backing store is a sibling of the commit path, so
  re-deriving the store from the path fails; a foreign-epoch Mind store refuses
  a commit with nothing written; a replay through a profile whose validator now
  refuses the batch is refused rather than answered with the stored receipt.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 21:20:33 +02:00
Meta Vens
b5324face7 Record Eureka Cut 2 landed with its Soul findings
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 21:15:22 +02:00
Meta Vens
46460efc80 Parameterise the one receipt commit owner by a store profile
Cut 2 of the Eureka pipeline state campaign, behaviour-preserving.
commit_authorized_mind_mutation stays the only code that builds receipts,
replays and runs batch CAS, but no longer hard-codes the Mind store:

- TypedCommitStore { store_id, open_cache, validate_write } is its first
  argument.
- MIND_COMMIT_STORE = { "epiphany-mind", runtime_spine_cache,
  validate_mind_write_envelope }, passed by all six wrappers.
- Deleted from the owner: runtime_spine_cache(store_path),
  validate_mind_write_envelope(write), and the two "epiphany-mind"
  literals on receipt versions.

The backing store for CAS stays runtime_spine_backing_store(store_path).

Tests:
- typed_commit_store_profile_owns_open_validate_and_store_id: a test
  profile with a two-type registry and a key-refusing validator; a
  refused write leaves the store byte-identical, and receipt versions
  carry the profile's store id.
- mind_commit_store_profile_keeps_mind_validation_receipts_replay_and_conflicts:
  through a Mind wrapper, Mind semantic-identity validation refuses
  without writing, receipt versions carry "epiphany-mind", the receipt id
  equals a pinned digest, exact replay returns the stored receipt, and a
  stale strong read maps to Conflict naming it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 21:00:57 +02:00
Meta Vens
00991c1b03 Pin storeless reads by directory snapshot, not one mtime
Soul's Cut 1 finding F2: the two read pins only proved the seeded store
file's mtime was unchanged, so a store attached at a shadow path (every
read writing path.with_extension("shadow.cc")) survived all 156 tests.

state_cache_reads_without_writing_the_store and
persona_social_cache_reads_without_writing_the_store now snapshot every
directory entry (name, length, mtime) before and after the read, require
exactly the store and its lock file, and require the snapshot unchanged.
cultcache-rs at a0813c6 exposes no backing-store count on CultCache, so
the directory is the observable layer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 20:55:50 +02:00
Meta Vens
589e71c321 Record Eureka Cut 1 landed with its Soul findings
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 20:49:56 +02:00
Meta Vens
df82992c60 Pin that Self and Persona social cache reads never write their stores
The re-pin swapped load_envelope for put_envelope on the claim that each
site's cache has no store attached, so put_envelope stays memory-only.
No existing test observed that: attaching the store in state_cache left
every resident_self test passing, because re-pushing the envelope just
read rewrites identical bytes.

Each test seeds its store, sets the file's modified time to a fixed past
instant, reopens the cache and requires the time to be unchanged. Any
push replaces the file through a staged rename, so attaching a store to
state_cache or persona_social_cache now fails the matching test. The
retirement-receipt site takes a snapshot slice with no path, so it cannot
acquire a store without a signature change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 20:34:55 +02:00
Meta Vens
8b52d02c79 Record the rulings on the Eureka cut map questions and the Eureka repo
Operator ruling (2026-09-15): Q1-Q5 all A. That means:
- one single-file store per repo, with an admission-replay merge;
- additive-only epochs;
- merge_exclusion settlement;
- voidbot indexes the default branch only;
- schemars unconditional in core.

The Eureka skill is also published as the GameCult/Eureka repo, and Cut 5's
skill edits land there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 20:14:59 +02:00
Meta Vens
2b76c2e758 Re-pin CultLib to a0813c6
Cut 1 of the Eureka pipeline state campaign. Moves every CultLib
dependency from e171eca3 to main a0813c6.

- load_envelope was deleted upstream (CultLib 4ed9871). The 12 sites in
  persona_conversation, persona_social_state and resident_self now call
  put_envelope. Each site feeds a cache built with CultCache::new() in
  the same function with no backing store attached, so home_index
  returns None and put_envelope only inserts into memory, exactly as
  load_envelope did. validate_envelope is byte-identical across the pins.
- add_generic_backing_store now returns Result; the three production
  sites and five test sites propagate it with ?.

No ownership change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 20:00:01 +02:00
Meta Vens
f05686c137 Map the Eureka pipeline state cuts
Imagination's cut map, built from probes:
1. Re-pin CultLib: 12 load_envelope sites; core 154/154 at the new pin.
2. One profile-parameterized commit owner.
3. The pipeline document set, lease, admission, queries, and a merge command.
4. The eureka-state stdio MCP package.
5. Skill wiring.
6. A proof campaign on the CultRecordRefFormatter follow-ups.
7. voidbot projection.

Five operator questions are open. The target now drops the claim that the
store merges in git, and records that voidbot indexes only default branches.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 19:52:32 +02:00
Meta Vens
0636176a0b Require one runner per repo and a merge tool for pipeline stores
Operator ruling (2026-09-15): only one Epiphany or Eureka may write a repo's
pipeline store at a time, and a second concurrent writer is refused. A merge
tool still reconciles divergent copies through admission, reporting true
conflicts as typed refusals rather than letting the last writer win.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 19:31:45 +02:00
Meta Vens
0d3f6bd65b Put the Eureka pipeline store in the repo where the task runs
Operator ruling (2026-09-15), superseding the user-level store: each
campaign's store is committed in the repo where the task runs, and
knowledge crosses repos only through explicit sharing. Pushing the working
branch syncs it to Yggdrasil, where voidbot's existing repo mirror indexes
it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 19:24:10 +02:00
Meta Vens
81be7a2f39 Record the Eureka pipeline state campaign target and ruling
Operator ruling (2026-09-15): Epiphany owns the typed schemas and admission
for pipeline state (findings, rulings, cut specs and reports, follow-ups).
The Eureka Claude Code skill reaches that state through a per-session Rust
stdio MCP server, built as an Epiphany package, over one user-level store.
voidbot indexes a projection for semantic search. The campaign re-pins
CultLib first, and Epiphany adopting Eureka's habits follows later.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 19:06:15 +02:00
Meta Vens
7132471870 Describe Epiphany as backend-agnostic
Codex, Claude and OpenAI-compatible APIs reach Epiphany through connectors
that share one standardized Epiphany-facing CultNet API, also used by
Ghostlight. Codex is one connector backend, not Epiphany's body.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 23:06:34 +02:00
Meta Vens
b5d9d4fff3 Merge main's dead-file cut into the live Epiphany line
main's only commit not on this branch deletes the stale compaction scratch and
the superseded protocol/controller-actions.md (census REC-045/REC-104). Merging
it here lets main fast-forward to the live branch, so Epiphany's default branch
stops pinning the retiring standalone cultcache-rs and cultnet-rs submodules.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 17:04:23 +02:00
Meta Vens
b76c32a52b REC-045/REC-104 (partial): cut dead compaction scratch and superseded controller-actions note
Deletes state/scratch-compaction-17cd64d8-da88-4642-a871-4cf1b768c20a.md: a
pre-compaction memory dump naming lost E:\Projects paths, a set of
"pseudo-Epiphany" repos to migrate, and the native
epiphany-agent-memory-store binary as its validation gate. That binary was
removed along with the other parallel executable control planes (commit
387afe49, 2026-08-23). The prompt doc the scratch describes producing
(notes/true-epiphany-memory-migration-sandbox-prompt.md) was already either
admitted or abandoned; the scratch itself records no unresolved next action
beyond "commit the doc," which git history shows happened or didn't
independently of this file.

Deletes protocol/controller-actions.md: self-described as "the legacy/manual
controller discipline from the first external-state prototype," it still
instructs writes to state/branches.json and state/evidence.jsonl — both
verified absent from the current tree (git show origin/main:state/branches.json
and :state/evidence.jsonl both fail). No Rust source references
"controller-actions" (checked via git grep across *.rs).

FALSIFIED, not cut: REC-104 also named "orphan prompt files"
(epiphany-state-model/src/prompts/epiphany_doctrine.md and
epiphany_state_intro.md) as dead. They are not — epiphany-state-model/src/
prompt.rs:30-31 pulls both in via include_str!, and epiphany-core/Cargo.toml:40
depends on epiphany-state-model as a path dependency. Deleting them would
break the build. Left untouched; see the coordinator report.

MOOT, not cut: REC-104's "stale scratch tail" referred (per
pass-one/deletion-candidates.md and branch-graveyard.md:390) to a leftover
EpiphanyRuntimeJobResult action at the tail of state/scratch.md. That file
now reads only "No active scratch subgoal. Rehydrate from state/map.yaml..."
— already retired before this pass, independent of this repo's current
(and very much alive) EpiphanyRuntimeJobResult type used throughout
epiphany-core/src/runtime_spine.rs.

Kill attempts: git grep -n for both deleted filenames across origin/main,
and rg across all of F:/Projects excluding target/node_modules/.git/
.epiphany-run: only the census documents and gamecult-site's generated
interactive repo-doc-tree (a static GitHub-link catalog, not a functional
reader) reference either path.

Collision check: git diff --stat origin/main against the active checkout
(codex/epiphany-shakedown-live), the epiphany-model-bridge worktree, and all
four detached .epiphany-run / temp worktrees, over both deleted paths: all
empty.

REC-045, REC-104 (partial)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 14:19:02 +02:00
Meta Vens
bc57980432 Lessons: the push is gated on the result line, not the launch
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 02:38:53 +02:00
Meta Vens
2b410e59d8 Lessons: integration is a gated sequence, not a shell line
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-05 23:24:46 +02:00