Add the host-agnostic ingest pipeline as @corbits/granola/ingest - #6
Merged
Conversation
Moves Scout's Granola ingestion pipeline (webhook event -> fetch note -> resolve bucket -> persist transcript -> knowledge capture -> bucket-type handler) upstream, where any host can use it. The pipeline was already chat-agnostic behind its lifecycle seam; this move genericizes the two remaining host couplings into injected ports: - transcripts: GranolaTranscriptStore<TRef> (hasTranscript/persist) in place of a concrete artifacts engine; TRef is opaque and threads through to bucket handlers and knowledge capture - captureKnowledge: GranolaKnowledgeCapture<TRef> in place of a concrete knowledge plane; enrichment, never a gate Hosts keep their lifecycle rendering, storage adapters, and bucket handlers; the host principal never reaches the pipeline (adapters close over it). Includes the not-generated-yet 404 handling for note.access_granted.
- test:ingest script + test-ingest CI job, mirroring test-tools/test-ingress - GranolaBucketHandlerContext/GranolaBucketHandler now generic over TAnchor (defaulted to GranolaThreadAnchor), removing the unsound double-cast at the handler dispatch site in pipeline.ts - ARCHITECTURE.md and CONTRIBUTING.md now describe src/ingest as the third face and its dependency direction
Contributor
Author
|
Pushed three changes from a review pass on this branch:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves Scout's Granola ingestion pipeline upstream as a new
./ingestexport: webhook event → fetch note → resolve bucket → persist transcript → knowledge capture → bucket-type handler.The pipeline was already chat-agnostic behind its lifecycle seam (Scout CL-5116); this genericizes the two remaining host couplings into ports:
GranolaTranscriptStore<TRef>(hasTranscript/persist) replaces the concrete artifacts engine;TRefis opaque and threads through to bucket handlers and knowledge capture.GranolaKnowledgeCapture<TRef>replaces the concrete knowledge plane; enrichment, never a gate.Also carries the
onNoteNotGeneratedlifecycle hook: a 404 onnote.access_grantedis documented Granola behavior (ungenerated note added to a folder), distinct from real fetch failures.12 pipeline tests;
tsc --noEmitclean. Scout-side consumption: corbitsdev/scout will follow with a pin bump (CL-5240).