Skip to content

workspace_ingestion — PKG runtime (WorkspaceSource → CSKG → managed HellGraph)#40

Merged
mdheller merged 2 commits into
mainfrom
feat/workspace-ingestion-pkg-runtime
Jul 5, 2026
Merged

workspace_ingestion — PKG runtime (WorkspaceSource → CSKG → managed HellGraph)#40
mdheller merged 2 commits into
mainfrom
feat/workspace-ingestion-pkg-runtime

Conversation

@mdheller

@mdheller mdheller commented Jul 1, 2026

Copy link
Copy Markdown
Member

What

Step 4 of the Personal Knowledge Graph substrate plan: the runtime that realises the PersonalContextGraph contract (prophet-workspace#21) on the managed HellGraph (prophet-platform#675). memory-mesh owns the runtime; prophet-mesh (#13) was the prototype.

New service services/workspace_ingestion (conforms to the finance_saa service pattern — FastAPI, httpx clients, unittest.IsolatedAsyncioTestCase):

WorkspaceSource records            mapping.py            HellGraph (managed)
(contacts/calendar/mail/office) ─▶ build_graph() ─▶ /cskg/normalize ─▶ /v1/ingest ─▶ memoryd /v1/write
  • mapping.py — pure WorkspaceSource → CSKGNode/CSKGEdge. contact→Person (family-vs-social relation, worksAt Organization, social→reference-only projection), calendar→Event+participatedIn, mail→communicatedWith, office-artifact→Document+authored. Every element provenance-bound to its workspace-source: id; people ingested first so mail/calendar edges dedup onto the same nodes.
  • hellgraph_client.py/cskg/normalize/v1/ingest (persist as GraphNode/GraphEdge; workspace imports = confirmed_relation) → /v1/retract (retention). Graceful-degrade when HELLGRAPH_URL unset (the house client pattern from mem0_client/MemoryMeshClient).
  • main.pyPOST /v1/ingest/workspace, POST /v1/retract (step 6 retention: WorkspaceSource deletion → supersede derived edges), GET /healthz.

Verification

7/7 tests pass — mapping invariants (single-Self, family-vs-social, no-dup mail/contact merge, reference-only social projection, provenance-bound) + service ingest/dry-run/retract with fakes. Wired into Makefile validate-python. Runs without a live HellGraph/memoryd.

Where it sits

Contract = prophet-workspace · Runtime = here · Substrate = prophet-platform · Consumer = prophet-mesh. Next: the SPA person-graph view (integration surface) calls a backend that fronts this service.

mdheller added 2 commits June 10, 2026 22:14
…ate and CI

Adds validate-prophet-mesh-scope-mirror to the main validate target so
the prophet-mesh memory-scope mirror contract is gated on every validate
run, and adds a CI workflow that triggers on changes to the contract or
validator script.
…aged HellGraph

Step 4 of the person-graph substrate plan: the runtime that realises the
PersonalContextGraph contract (prophet-workspace) on the managed HellGraph
(prophet-platform). memory-mesh owns the runtime.

New service services/workspace_ingestion (conforms to the finance_saa pattern):
- mapping.py: pure WorkspaceSource → CSKGNode/CSKGEdge. contact→Person (family vs
  social relation, worksAt Organization, social→reference-only projection),
  calendar→Event+participatedIn (self+attendees), mail→communicatedWith,
  office-artifact→Document+authored. Every element provenance-bound to its
  workspace-source id; people ingested first so mail/calendar edges dedup.
- hellgraph_client.py: /cskg/normalize (refine relations) → /v1/ingest (persist as
  GraphNode/GraphEdge; workspace imports = confirmed_relation) → /v1/retract
  (retention). Graceful-degrade when HELLGRAPH_URL unset (house client pattern).
- memory_mesh_client.py: writeback summary to memoryd after ingest.
- main.py: POST /v1/ingest/workspace, POST /v1/retract (step 6 retention), /healthz.

7/7 tests pass (mapping invariants + service ingest/dry-run/retract with fakes);
wired into Makefile validate-python. Runs without live HellGraph/memoryd.
@mdheller mdheller merged commit e07b83b into main Jul 5, 2026
15 checks passed
@mdheller mdheller deleted the feat/workspace-ingestion-pkg-runtime branch July 5, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant