Add Epiphany jobsUpdated notification

This commit is contained in:
Meta Vens 2026-04-26 15:02:45 +01:00
commit 48d6820d7d
22 changed files with 923 additions and 23 deletions

View file

@ -43,3 +43,4 @@
{"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."}
{"ts": "2026-04-26T10:45:36+00:00", "type": "verification", "status": "ok", "note": "Phase 6 bounded CRRC reorientation policy landed as read-only thread/epiphany/reorient. The surface consumes checkpoint, freshness, watcher, and pressure signals to return resume-versus-regather with explicit checkpoint-path/frontier reasons, without mutation, compaction, scheduling, notification, or silent continuation. Focused protocol/schema checks, app-server mapper tests/build, and tools/epiphany_phase6_reorient_smoke.py plus tools/epiphany_phase6_scene_smoke.py passed."}
{"ts": "2026-04-26T11:30:59+00:00", "type": "verification", "status": "ok", "note": "Phase 6 jobs reflection now carries durable jobBindings in EpiphanyThreadState and overlays real runtime agent_jobs progress in read-only thread/epiphany/jobs, including runtime job ids, worker thread ids, and progress counts. The live seam required direct state-runtime lookup rather than rollout get_state_db backfill. Focused protocol/core/app-server tests, schema fixture checks, app-server build, and tools/epiphany_phase6_jobs_smoke.py passed."}
{"ts": "2026-04-26T14:01:57+00:00", "type": "verification", "status": "ok", "note": "Phase 6 live bound-job progress notification landed as experimental thread/epiphany/jobsUpdated. App-server now translates runtime agent_job_progress:{json} background events into changed bound-job payloads by resolving durable jobBindings against live agent_jobs snapshots, suppressing duplicate unchanged payloads without polling, state mutation, or scheduling. Focused app-server notification coverage, schema fixture checks, and tools/epiphany_phase6_jobs_smoke.py passed."}

View file

@ -61,7 +61,7 @@ accepted_design:
- Epiphany is a fork-level modeling architecture, not merely a Codex collaboration mode.
- Authoritative Epiphany state lives in Codex protocol/core session and rollout state.
- The prompt reads typed state through a bounded `<epiphany_state>` developer fragment.
- Clients read typed state through `Thread.epiphanyState`, compact reflections such as `thread/epiphany/scene`, `thread/epiphany/jobs`, and `thread/epiphany/freshness`, targeted state shards through `thread/epiphany/context`, runtime pressure through `thread/epiphany/pressure`, and bounded CRRC reorientation verdicts through `thread/epiphany/reorient`.
- Clients read typed state through `Thread.epiphanyState`, compact reflections such as `thread/epiphany/scene`, `thread/epiphany/jobs`, and `thread/epiphany/freshness`, targeted state shards through `thread/epiphany/context`, runtime pressure through `thread/epiphany/pressure`, bounded CRRC reorientation verdicts through `thread/epiphany/reorient`, and live bound-job progress through `thread/epiphany/jobsUpdated`.
- Durable typed state writes route through `thread/epiphany/update` or accepted `thread/epiphany/promote`.
- `thread/epiphany/retrieve`, `thread/epiphany/distill`, `thread/epiphany/propose`, `thread/epiphany/scene`, `thread/epiphany/jobs`, `thread/epiphany/freshness`, `thread/epiphany/context`, `thread/epiphany/pressure`, and `thread/epiphany/reorient` stay read-only.
- `thread/epiphany/index` writes the retrieval catalog, not durable Epiphany understanding.
@ -74,13 +74,14 @@ 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 a read-only job/progress reflection: it derives indexing, remap, verification, and specialist slots from authoritative state and retrieval summaries, and can overlay durable `job_bindings` onto live runtime `agent_jobs` snapshots when a real owner exists; it is not a scheduler, notification stream, or durable runtime job table.
- `thread/epiphany/jobsUpdated` is the first live bound-job progress notification: it translates runtime `agent_job_progress:{json}` background events into changed bound-job payloads by resolving durable `job_bindings` against live `agent_jobs` snapshots, without polling in a loop, mutating state, or scheduling work.
- `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.
- `thread/epiphany/reorient` is the first bounded CRRC policy surface: it derives a read-only `resume` versus `regather` verdict from checkpoint, freshness, watcher, and pressure signals without mutating state, compacting, scheduling, or silently continuing work.
- 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.
- Epiphany is built in the open, but publication mode is not one-size-fits-all: use FOSS where viable, source-available licensing where economics or capability risk demand it, and commercial terms where organizations extract real enterprise value.
- Epiphany-owned long-running job execution, live job progress notifications, and specialist scheduling are still future work.
- Epiphany-owned long-running job execution beyond the current runtime `agent_jobs` seam and specialist scheduling are still future work.
- Handoff, plan, harness-surface, and scratch files must have distinct jobs and must not become duplicate brains.
- A machine is perfect when every remaining part visibly deserves to exist; this applies to persistent memory too.
- Evidence is not an activity feed; repeated "I just did this" entries should be cut or distilled when git already proves the work.
@ -95,7 +96,7 @@ 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 with watcher-backed invalidation inputs, targeted context, context-pressure, and reorientation policy surfaces, plus durable investigation checkpointing for compaction-safe planning.
- Phase 6: read-only scene, job/progress, freshness with watcher-backed invalidation inputs, targeted context, context-pressure, and reorientation policy surfaces, plus durable investigation checkpointing for compaction-safe planning and live bound-job progress notifications.
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.
@ -123,5 +124,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, watcher-backed invalidation inputs, durable investigation checkpointing, and bounded CRRC reorientation policy are landed. `thread/epiphany/jobs` now carries durable `job_bindings` in authoritative typed state and overlays real runtime `agent_jobs` progress for bound work, including runtime job id, worker thread ids, and progress counts, without becoming a scheduler or notification stream. `thread/epiphany/reorient` still consumes checkpoint, freshness, watcher, and pressure signals to return a read-only `resume` versus `regather` verdict with explicit checkpoint-path/frontier reasons, but it does not mutate state, compact, schedule, notify, or silently continue work. Focused protocol/core/app-server checks plus the live jobs smoke 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 live `thread/epiphany/jobsUpdated` or equivalent progress notification now that durable `job_bindings` can point at real runtime owners, while automatic runtime CRRC remains future work that may eventually consume the landed read-only reorientation verdict. Do not restart the completed pressure, freshness, watcher-invalidation, investigation-checkpoint, reorientation, or landed jobs-binding slice 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, durable investigation checkpointing, bounded CRRC reorientation policy, and live bound-job progress notifications are landed. `thread/epiphany/jobs` now carries durable `job_bindings` in authoritative typed state and overlays real runtime `agent_jobs` progress for bound work, including runtime job id, worker thread ids, and progress counts, without becoming a scheduler. `thread/epiphany/jobsUpdated` now translates runtime `agent_job_progress:{json}` background events into changed bound-job payloads only when the mapped job state actually changes, so clients can watch real owners move without polling the jobs read surface. `thread/epiphany/reorient` still consumes checkpoint, freshness, watcher, and pressure signals to return a read-only `resume` versus `regather` verdict with explicit checkpoint-path/frontier reasons, but it does not mutate state, compact, schedule, notify, or silently continue work. Focused protocol/app-server tests, schema fixture regeneration/checks, app-server build, and the live jobs smoke 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 deciding whether future Epiphany-owned long-running work should keep parasitizing runtime `agent_jobs` now that `thread/epiphany/jobsUpdated` exists, or whether the fork needs a stricter launcher seam before specialist ownership grows teeth. Automatic runtime CRRC remains future work that may eventually consume the landed read-only reorientation verdict. Do not restart the completed pressure, freshness, watcher-invalidation, investigation-checkpoint, reorientation, jobs-binding, or jobsUpdated slice unless a concrete regression appears.