Add Epiphany watcher invalidation inputs

This commit is contained in:
Meta Vens 2026-04-26 07:51:25 +01:00
commit 52732cb2dc
45 changed files with 2613 additions and 50 deletions

View file

@ -40,3 +40,4 @@
{"ts": "2026-04-26T04:43:01+00:00", "type": "verification", "status": "ok", "note": "Phase 6 freshness reflection landed as read-only thread/epiphany/freshness. The surface reports live-or-stored retrieval freshness plus graph frontier/churn staleness with exact dirty-path pressure, revision/source identity, and no mutation, scheduling, or watcher-driven invalidation. Focused app-server protocol/app-server tests plus tools/epiphany_phase6_freshness_smoke.py and tools/epiphany_phase6_scene_smoke.py passed."}
{"ts": "2026-04-26T05:49:55+00:00", "type": "design", "status": "accepted", "note": "Capability creates obligation for Epiphany: grow cognition ahead of authority, keep permissions explicit, make interruption sacred, stage capability release, and treat misuse plus paternal anti-human 'caretaker' outcomes as first-class design risks."}
{"ts": "2026-04-26T06:01:53+00:00", "type": "design", "status": "accepted", "note": "Epiphany publication stance is built-in-the-open rather than indiscriminately FOSS: use FOSS where viable, source-available licensing where economics or capability risk demand it, and commercial terms where organizations extract real enterprise value."}
{"ts": "2026-04-26T06:51:04+00:00", "type": "verification", "status": "ok", "note": "Phase 6 watcher-backed invalidation inputs landed inside read-only thread/epiphany/freshness. Loaded threads now expose runtime watcher telemetry with watched root, changed paths, mapped graph-node/frontier hits, and no state mutation, scheduling, notification, or automatic semantic invalidation. Focused protocol/app-server tests, schema fixture regeneration/checks, app-server build, and tools/epiphany_phase6_invalidation_smoke.py plus tools/epiphany_phase6_freshness_smoke.py passed."}

View file

@ -74,7 +74,7 @@ accepted_design:
- The harness now has an in-flight investigation checkpoint packet in durable typed state; automatic CRRC still needs runtime logic that reads the packet and decides whether to resume or force reorientation and re-gathering after compaction.
- GUI/client work must reflect or steer typed state rather than manufacture a second source of truth.
- `thread/epiphany/jobs` is the first read-only job/progress reflection: it derives indexing, remap, verification, and specialist slots from existing state; it is not a scheduler or durable job store.
- `thread/epiphany/freshness` is the first read-only freshness surface: it derives retrieval and graph staleness from live retrieval summaries plus frontier/churn state without mutating, scheduling, or pretending watcher-driven invalidation already exists.
- `thread/epiphany/freshness` is the first read-only freshness surface: it derives retrieval and graph staleness from live retrieval summaries plus frontier/churn state, and for loaded threads reflects watcher-backed invalidation inputs with changed paths plus mapped graph/frontier hits, without mutating, scheduling, or performing automatic semantic invalidation.
- `thread/epiphany/context` is the first targeted read-only state-shard surface: it selects graph nodes/edges, active frontier, checkpoint, observations, and evidence from authoritative typed state without mutating or notifying.
- `thread/epiphany/pressure` is the first read-only context-pressure surface: it derives pressure from token telemetry and auto-compact/context limits without compacting, scheduling, mutating, or notifying.
- Epiphany safety doctrine is to separate cognition from actuation, keep authority explicit, make interruption sacred, stage capability release, and treat operator misuse as a normal design input rather than a rude hypothetical.
@ -94,12 +94,13 @@ landed_baseline:
- Phase 3: typed client read surface through `Thread.epiphanyState`.
- Phase 4: hybrid retrieval plus explicit Qdrant indexing with BM25 fallback.
- Phase 5: typed update/distill/propose/promote/read/notification control plane.
- Phase 6: read-only scene, job/progress, freshness, targeted context, and context-pressure reflection surfaces, plus durable investigation checkpointing for compaction-safe planning.
- Phase 6: read-only scene, job/progress, freshness with watcher-backed invalidation inputs, targeted context, and context-pressure reflection surfaces, plus durable investigation checkpointing for compaction-safe planning.
guardrails:
- Use `tools/epiphany_phase5_smoke.py` before modifying update, distill, propose, promote, read-projection, or notification behavior.
- Use `tools/epiphany_phase6_scene_smoke.py` before modifying scene projection behavior.
- Use `tools/epiphany_phase6_jobs_smoke.py` before modifying job/progress reflection behavior.
- Use `tools/epiphany_phase6_freshness_smoke.py` before modifying freshness reflection behavior.
- Use `tools/epiphany_phase6_invalidation_smoke.py` before modifying watcher-backed invalidation behavior inside freshness reflection.
- Use `tools/epiphany_phase6_context_smoke.py` before modifying targeted context-shard behavior.
- Use `tools/epiphany_phase6_pressure_smoke.py` before modifying context-pressure reflection behavior.
- Use focused scene/jobs/context/pressure/protocol/schema checks for reflection-only changes.
@ -120,5 +121,5 @@ rejected_paths:
reason: persistent state that accumulates every local truth becomes memory cruft and weakens rehydration
current_status:
summary: Phase 1 durable state, Phase 2 prompt integration, Phase 3 typed read, Phase 4 retrieval/indexing, Phase 5 update/distill/propose/promote/read/notification, and Phase 6 read-only scene, jobs, freshness, targeted context, context-pressure reflection, and durable investigation checkpointing are landed. The new freshness lens reports live-or-stored retrieval staleness plus graph frontier/churn freshness with exact dirty-path pressure and revision/source identity, without mutating state or pretending watcher-driven invalidation already exists; focused protocol/app-server checks plus freshness and scene smokes cover the seam. Investigation checkpoints still live in authoritative typed state, flow through the prompt, and reflect through scene/context without adding a second writer or fake scheduler. Persistent state was cut down so map, handoff, plan, harness surfaces, scratch, and evidence each carry one job instead of becoming a Jenga tower; evidence is now a distilled ledger rather than an activity feed. The global AGENTS Epiphany core command says persistent state is the agent's mind and explicitly permits the agent to ask for self-modification when memory or workflow makes it worse. The continuity goal is to bank the fire before the dark so compaction becomes less like death and more like sleep.
next_action: After compaction, rehydrate and reorient. If the user asks to continue, choose the next Phase 6 slice from the current map: watcher-backed invalidation inputs are the most likely next organ now that the read-only freshness lens exists, with live progress notifications still waiting until real job owners exist. Do not restart the completed pressure, freshness, or investigation-checkpoint slices unless a concrete regression appears.
summary: Phase 1 durable state, Phase 2 prompt integration, Phase 3 typed read, Phase 4 retrieval/indexing, Phase 5 update/distill/propose/promote/read/notification, and Phase 6 read-only scene, jobs, freshness, targeted context, context-pressure reflection, watcher-backed invalidation inputs, and durable investigation checkpointing are landed. `thread/epiphany/freshness` now reports live-or-stored retrieval staleness plus graph frontier/churn freshness and, for loaded threads, runtime watcher telemetry with exact changed paths, mapped graph-node hits, frontier hits, and revision/source identity; it still does not mutate state, schedule refresh work, or perform automatic semantic invalidation. Focused protocol/app-server checks plus freshness and invalidation smokes cover the seam. Investigation checkpoints still live in authoritative typed state, flow through the prompt, and reflect through scene/context without adding a second writer or fake scheduler. Persistent state was cut down so map, handoff, plan, harness surfaces, scratch, and evidence each carry one job instead of becoming a Jenga tower; evidence is now a distilled ledger rather than an activity feed. The global AGENTS Epiphany core command says persistent state is the agent's mind and explicitly permits the agent to ask for self-modification when memory or workflow makes it worse. The continuity goal is to bank the fire before the dark so compaction becomes less like death and more like sleep.
next_action: After compaction, rehydrate and reorient. If the user asks to continue, the next likely Phase 6 organ is a bounded CRRC coordination/policy slice that consumes the landed pressure, freshness, watcher, and investigation-checkpoint signals to decide whether a checkpoint means resume or re-gather, with live progress notifications still waiting until real job owners exist. Do not restart the completed pressure, freshness, watcher-invalidation, or investigation-checkpoint slices unless a concrete regression appears.