fabro/lib/components/fabro-workflow/src
Bryan Helmkamp ddcf86bcfb
fix(workflow): materialize only prompt values the selected fidelity renders
Prompt-value demotion previously demoted every prior outcome value and
visible context value wholesale, before the preamble builders decided
what the selected fidelity renders. That materialized blobs and sandbox
files no generated prompt referenced — e.g. a compact prompt created a
blob for a prior LLM response even though compact stage details never
include response.<node_id>.

Make the materialization set fidelity-aware:

- preamble::rendered_value_selection computes, per fidelity, exactly
  which context keys and (stage, key) outcome values the builders
  render, sharing the recency-window logic with the builders.
- demote_large_values_for_prompt takes a PromptValueSelection and
  demotes only the values it names.
- The lifecycle unions the node's selection with each parallel branch's
  effective fidelity selection, and skips demotion when the union is
  empty.

Durable context and node outcomes are unchanged: response.<node_id>
stays the exact model response and output.<node_id> the validated
structured value. A drift-guard test asserts, at every fidelity, that
each demoted path is referenced by the built preamble and no unselected
large value leaks inline.

Closes #800

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011bs8C1fjVCu8a8qDvFskYV
2026-08-25 07:54:14 -04:00
..
event Merge pull request #783 from fabro-sh/codex/sqlite-blob-startup-activation 2026-08-24 16:32:59 -04:00
graph Potential fix for pull request finding 2026-08-01 12:17:16 -04:00
handler fix(workflow): materialize only prompt values the selected fidelity renders 2026-08-25 07:54:14 -04:00
lifecycle fix(workflow): materialize only prompt values the selected fidelity renders 2026-08-25 07:54:14 -04:00
operations Simplify blob activation and share the test store fixture 2026-08-24 14:02:35 -04:00
pipeline Simplify blob activation and share the test store fixture 2026-08-24 14:02:35 -04:00
records refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
transforms Classify graph attributes with a graph-only reference kind 2026-08-17 17:58:46 -04:00
artifact.rs fix(workflow): materialize only prompt values the selected fidelity renders 2026-08-25 07:54:14 -04:00
artifact_snapshot.rs fix(glob): harden artifact traversal 2026-07-25 11:56:57 -04:00
artifact_upload.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
billing_rollup.rs Add a shared RunSpec test fixture and adopt it 2026-08-19 16:50:37 -04:00
command_log.rs Unify blob hash vocabulary 2026-08-17 13:56:19 -04:00
condition.rs Reuse existing helpers in the for_each fan-out 2026-07-28 18:42:23 -04:00
context.rs Tighten the prompt-demotion pass after review 2026-08-21 21:21:59 -04:00
error.rs Simplify run-event persistence failure plumbing 2026-08-21 19:29:14 -04:00
event.rs fix: fail runs when event persistence is lost 2026-08-21 18:31:22 -04:00
file_resolver.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
git.rs Simplify blob activation and share the test store fixture 2026-08-24 14:02:35 -04:00
git_bridge.rs refactor(github): deduplicate additional-repository access plumbing 2026-08-21 16:31:48 -04:00
graph.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
hook_context.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
interview_runtime.rs refactor(workflow): tidy stall watchdog wiring and interview naming 2026-08-01 10:08:03 -04:00
lib.rs feat(workflow): bridge git and gh to the shared token 2026-08-21 14:47:31 -04:00
model_fallback.rs refactor(model): rename Kimi provider to Moonshot 2026-07-31 09:00:52 -04:00
node_handler.rs refactor(workflow): simplify interview block state and stall watchdog 2026-08-01 09:53:07 -04:00
outcome.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
pull_request.rs refactor: simplify publish pipeline and collapse duplicated stage errors 2026-07-28 15:09:10 -04:00
retry.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_control.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_dir.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
run_lookup.rs Simplify blob activation and share the test store fixture 2026-08-24 14:02:35 -04:00
run_materialization.rs refactor: simplify readiness-fallback plumbing 2026-07-24 08:49:01 -04:00
run_metadata.rs Add version-backed run intent creation 2026-08-24 11:55:43 -04:00
run_options.rs Remove stale env-interpolation promises from docs 2026-08-17 17:36:53 -04:00
run_status.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
runtime_store.rs Simplify blob activation and share the test store fixture 2026-08-24 14:02:35 -04:00
sandbox_git.rs Label sandbox git execs with git_op tracing spans 2026-08-20 19:37:44 -04:00
sandbox_git_runtime.rs Retry git pushes with a pinned token and record attempt history 2026-08-20 10:16:10 -04:00
services.rs Simplify blob activation and share the test store fixture 2026-08-24 14:02:35 -04:00
stage_execution.rs Add version-backed run intent creation 2026-08-24 11:55:43 -04:00
stage_scope.rs Merge origin/main into feat/stage-execution-identity-on-resume 2026-07-24 10:07:35 -04:00
steering_hub.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
test_support.rs Isolate the shared test blob store between tests 2026-08-24 14:02:35 -04:00
workflow_bundle.rs refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00