feat(worker-search): thread per-graph phase_settings into DecompositionPipeline (Phase 2 #32)#277
Merged
charlie83Gs merged 1 commit intomainfrom Apr 20, 2026
Conversation
This was referenced Apr 20, 2026
Merged
Base automatically changed from
feat/decomposition-pipeline-phase-settings
to
main
April 20, 2026 23:07
…onPipeline (Phase 2 #32) Adds ``kt_hatchet.composition.resolve_phase_settings(state, graph_id, phase)`` — the shared helper that translates a running graph's ``GraphConfig`` into the ``phase_settings`` dict ``DecompositionPipeline`` now accepts (#31 / #276). Fails fast on resolver error: a graph opting into a narrower composition MUST NOT silently widen to Settings defaults on a transient DB hiccup — matches the tenancy-invariant posture of ``_resolve_composition_selectors`` in ``web_search``. Wired into the two Hatchet tasks that construct ``DecompositionPipeline`` directly: - ``decompose_chunk_task`` (worker-search.workflows.search) - ``decompose_source_task`` (worker-search.workflows.decompose) Worker-nodes call sites (``GatherFactsPipeline``, ``BuildingPipeline``, ``NodePipeline``) go through ``AgentContext`` which doesn't expose ``graph_id`` — threading there lands in the companion #33 PR once ``AgentContext`` grows the knob. 5 new unit tests on the helper cover: composition present, graph_id None fallback, services None fallback, resolver-raises-propagates (authorization guard), unknown-phase-empty-dict. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6418616 to
1dd76c6
Compare
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
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.
Summary
Adds `kt_hatchet.composition.resolve_phase_settings(state, graph_id, phase)` — shared helper that translates a running graph's `GraphConfig` into the `phase_settings` dict `DecompositionPipeline` now accepts (#276). Fail-fast on resolver error (tenancy invariant — a narrower graph-type composition MUST NOT silently widen to `Settings` defaults on a resolver hiccup).
Wired into the two Hatchet tasks that construct `DecompositionPipeline` directly:
Why
Closes Phase 2 #32 for worker-search. Worker-nodes `AgentContext`-wrapped call sites land in the follow-up #33 PR once `AgentContext` grows `graph_id`.
Based on #276 (adds `phase_settings` kwarg to `DecompositionPipeline`). Will rebase onto main after #276 merges.
Test plan
🤖 Generated with Claude Code