Skip to content

feat!: signal-driven conditional pipeline with single full/smoke config#4

Merged
sousekd merged 4 commits into
mainfrom
feat/conditional-step-execution
Jun 13, 2026
Merged

feat!: signal-driven conditional pipeline with single full/smoke config#4
sousekd merged 4 commits into
mainfrom
feat/conditional-step-execution

Conversation

@sousekd

@sousekd sousekd commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Replace the four shipped pipelines and their ad-hoc knobs with one
signal-driven full pipeline (plus a minimal smoke), and make both external
source providers pass their options through opaquely.

Conditional execution

  • Add a Condition contract (signal-name leaf plus all/any/not) and an evaluator;
    a step runs iff (runIf absent or true) AND (skipIf absent or false).
  • Orchestrator gates each step against the live signal bag; gated steps are
    recorded as skipped (run_if_unmet / skip_if_met), not executed.
  • Step schema gains runIf, skipIf, and enabled.

classify-url step

  • Add a built-in step that runs once and emits boolean signals from URL rules.
  • Each rule carries one signal and one matcher: extensionIn, pattern, or
    anyHost; matchers are precompiled at parse time.
  • Shipped rules emit binary_doc (PDF/Office, arXiv /pdf/) and code_host.

Single pipeline (breaking)

  • Collapse truncate / clean-deterministic / clean-llm / clean-combined into one
    full pipeline toggled by *_ENABLED env, plus a small smoke pipeline.
  • Source routing is explicit and gated: fetch_docling (runIf binary_doc) ->
    fetch_firecrawl -> fetch_http fallback; readability skipped on code_host.
  • enabled:false steps are dropped at compile time, so a disabled step's
    provider is never required at startup.
  • DEFAULT_PIPELINE default truncate -> full.

Opaque provider options (breaking)

  • Both providers keep output typed and move every other knob into an opaque
    options record (inline YAML object or a JSON-string env blob).
  • Docling: doOcr / tableMode -> DOCLING_OPTIONS; rename docling-ocr ->
    docling-default.
  • Firecrawl: onlyMainContent / stripBase64Images / parsePdf -> FIRECRAWL_OPTIONS;
    raw-PDF passthrough now detected by the %PDF magic header, not a flag.

Breaking

  • Pipelines renamed; DEFAULT_PIPELINE default is now full.
  • Provider docling-ocr -> docling-default.
  • Env: FIRECRAWL_PARSE_PDF -> FIRECRAWL_OPTIONS; new DOCLING_OPTIONS;
    SOURCE_PROVIDER removed; per-provider timeouts; CLEAN_* / SUMMARIZE_* ->
    LLM_CLEAN_* / LLM_SUMMARIZE_*; new *_ENABLED toggles.

Docs, env examples, and Compose files updated to match.

sousekd added 4 commits June 13, 2026 15:29
… routing

Add classify-url pipeline step, runIf/skipIf gates, and fallback load-source routing.

- src/contracts/pipeline/condition.ts — recursive Condition type (string leaf, all/any/not combinators)
- src/core/pipeline/conditions.ts — evaluateCondition, resolveStepGate, isTruthySignal
- src/core/pipeline/compiled.ts — runIf/skipIf on CompiledPipelineStep
- src/core/pipeline/orchestrator.ts — gate evaluation before step execution
- src/builtins/pipeline-steps/classify-url/ — config, step, and descriptor
- src/config/yaml/yaml-config.ts — conditionSchema with diagnostic-name validation
- src/engine/engine-config.ts — runIf/skipIf on EngineStepConfig
- src/shared/diagnostic-names.ts — isDiagnosticName helper
- config/llm-context-loader.yaml — clean-combined rewired with classify → docling (runIf:binary_doc) → firecrawl (fallback) → clean (skipIf:code_host)
- docs: ARCHITECTURE.md, CUSTOMIZATION.md, ROADMAP.md updated
- 69 new focused tests; 388 total passing
@sousekd sousekd merged commit 1d1b45b into main Jun 13, 2026
2 checks passed
@sousekd sousekd deleted the feat/conditional-step-execution branch June 13, 2026 22:58
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