mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-06-30 17:09:38 +02:00
Remove provider stream sentinel assertions
This commit is contained in:
parent
3070ce2b47
commit
bfb5494552
7 changed files with 30 additions and 10 deletions
|
|
@ -12,8 +12,8 @@ Verified source roots:
|
|||
- Effect v4 subtree: `/home/elpresidank/YeeBois/projects/beep-effect2/.repos/effect-v4`
|
||||
- Installed Effect beta used by this workspace: `ts/node_modules/effect`
|
||||
|
||||
Current signal counts from `ts/packages` after the 2026-06-02 Base flow
|
||||
definition schema slice:
|
||||
Current signal counts from `ts/packages` after the 2026-06-02 Text completion
|
||||
stream sentinel slice:
|
||||
|
||||
| Signal | Count |
|
||||
| --- | ---: |
|
||||
|
|
@ -68,6 +68,10 @@ Notes:
|
|||
- The base flow definition schema slice removed hand-rolled
|
||||
`Predicate`/object narrowing from `flow-processor.ts`; signal counts are
|
||||
unchanged because this was a validation-quality migration.
|
||||
- The text completion stream sentinel slice removed the duplicated
|
||||
`Effect.void as Effect.Effect<undefined>` assertions from provider stream
|
||||
unfold branches. Counts are unchanged because this was an Effect diagnostic
|
||||
and type-channel cleanup.
|
||||
- `Record<string, any>` and `throwLibrarianServiceError` are now clean in
|
||||
`ts/packages`.
|
||||
|
||||
|
|
@ -543,6 +547,24 @@ Notes:
|
|||
- `cd ts && bun run test`
|
||||
- `git diff --check`
|
||||
|
||||
### 2026-06-02: Text Completion Stream Sentinel Slice
|
||||
|
||||
- Status: migrated and root-verified.
|
||||
- Completed:
|
||||
- `ts/packages/flow/src/model/text-completion/{ollama,openai,mistral,azure-openai,claude,openai-compatible}.ts`
|
||||
now return the `Stream.unfold` end sentinel with
|
||||
`Effect.as(Effect.void, undefined)`.
|
||||
- Removed six `Effect.void as Effect.Effect<undefined>` assertions without
|
||||
replacing them with `Effect.succeed(undefined)`, which `@effect/tsgo`
|
||||
flags as a diagnostic.
|
||||
- Verification:
|
||||
- `bun run --cwd ts/packages/flow build`
|
||||
- `cd ts && bun run check`
|
||||
- `bun run --cwd ts/packages/flow test`
|
||||
- `cd ts && bun run build`
|
||||
- `cd ts && bun run test`
|
||||
- `git diff --check`
|
||||
|
||||
## Subagent Findings To Preserve
|
||||
|
||||
- MCP/workbench:
|
||||
|
|
@ -627,8 +649,6 @@ Notes:
|
|||
- Rewrite shape:
|
||||
- Move env/config reading into `Config` loaders and provider-specific layers.
|
||||
- Scope SDK clients that need explicit close/disconnect.
|
||||
- Remove `Effect.void as Effect.Effect<undefined>` stream assertions by
|
||||
letting branch return types infer or by restructuring the stream parser.
|
||||
- Tests:
|
||||
- Provider config tests with `ConfigProvider.fromMap`.
|
||||
- Storage tests with fake clients before changing real resource lifetimes.
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ export function makeAzureOpenAIProvider(config: AzureOpenAIProcessorConfig): Llm
|
|||
return Stream.unfold<"pulling" | "done", LlmChunk, TextCompletionRuntimeError, never>(
|
||||
"pulling",
|
||||
(state) => {
|
||||
if (state === "done") return Effect.void as Effect.Effect<undefined>;
|
||||
if (state === "done") return Effect.as(Effect.void, undefined);
|
||||
|
||||
return Effect.gen(function* () {
|
||||
while (true) {
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ export function makeClaudeProvider(config: ClaudeProcessorConfig): LlmProvider {
|
|||
return Stream.unfold<"pulling" | "done", LlmChunk, TextCompletionRuntimeError, never>(
|
||||
"pulling",
|
||||
(state) => {
|
||||
if (state === "done") return Effect.void as Effect.Effect<undefined>;
|
||||
if (state === "done") return Effect.as(Effect.void, undefined);
|
||||
|
||||
return Effect.gen(function* () {
|
||||
while (true) {
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ export function makeMistralProvider(config: MistralProcessorConfig): LlmProvider
|
|||
return Stream.unfold<"pulling" | "done", LlmChunk, TextCompletionRuntimeError, never>(
|
||||
"pulling",
|
||||
(state) => {
|
||||
if (state === "done") return Effect.void as Effect.Effect<undefined>;
|
||||
if (state === "done") return Effect.as(Effect.void, undefined);
|
||||
|
||||
return Effect.gen(function* () {
|
||||
while (true) {
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ export function makeOllamaProvider(config: OllamaProcessorConfig): LlmProvider {
|
|||
return Stream.unfold<"pulling" | "done", LlmChunk, TextCompletionRuntimeError, never>(
|
||||
"pulling",
|
||||
(state) => {
|
||||
if (state === "done") return Effect.void as Effect.Effect<undefined>;
|
||||
if (state === "done") return Effect.as(Effect.void, undefined);
|
||||
|
||||
return Effect.gen(function* () {
|
||||
while (true) {
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ export function makeOpenAICompatibleProvider(
|
|||
return Stream.unfold<"pulling" | "done", LlmChunk, TextCompletionRuntimeError, never>(
|
||||
"pulling",
|
||||
(state) => {
|
||||
if (state === "done") return Effect.void as Effect.Effect<undefined>;
|
||||
if (state === "done") return Effect.as(Effect.void, undefined);
|
||||
|
||||
return Effect.gen(function* () {
|
||||
while (true) {
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ export function makeOpenAIProvider(config: OpenAIProcessorConfig): LlmProvider {
|
|||
return Stream.unfold<"pulling" | "done", LlmChunk, TextCompletionRuntimeError, never>(
|
||||
"pulling",
|
||||
(state) => {
|
||||
if (state === "done") return Effect.void as Effect.Effect<undefined>;
|
||||
if (state === "done") return Effect.as(Effect.void, undefined);
|
||||
|
||||
return Effect.gen(function* () {
|
||||
while (true) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue