Skip to content

fix(runtime): substitute null for skipped steps in composite output.from - #165

Merged
samzong merged 1 commit into
lathe-cli:mainfrom
scydas:fix/workflow-output-null-skipped
Aug 24, 2026
Merged

fix(runtime): substitute null for skipped steps in composite output.from#165
samzong merged 1 commit into
lathe-cli:mainfrom
scydas:fix/workflow-output-null-skipped

Conversation

@scydas

@scydas scydas commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • A composite output.from like '{"a":${steps.x},"b":${steps.y}}' now
    substitutes null for references to skipped steps instead of discarding
    the entire aggregate into the step summary.
  • Bare references (output.from: ${steps.x}) still degrade to the step
    summary when the step is skipped — no behavior change there.

Motivation: a pod-diagnosis workflow aggregates get-pod + list-events +
list-pods-by-node. The node-neighbors step is guarded with when (Pending
pods have no spec.nodeName). Without this fix, skipping neighbors discards
the pod and events data too — the user gets only {"status":"ok","steps":[...]}.

Test plan

  • TestBuildWorkflows_CompositeOutputNullsSkippedStep — composite output with one skipped step produces null for that key, preserves others
  • TestBuildWorkflows_BareOutputFromSkippedStepStillDegrades — bare reference still returns step summary (regression guard)
  • Full test suite passes (go test ./...)

A composite output.from like '{"a":${steps.x},"b":${steps.y}}' now
substitutes null for references to skipped steps instead of discarding
the entire aggregate. Bare references still degrade to the step summary.

Signed-off-by: Leo Shi <scyda@outlook.com>
@codspeed-hq

codspeed-hq Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 13.53%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 8 improved benchmarks
✅ 13 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
small 193.6 µs 166.2 µs +16.5%
large 2.4 ms 2.1 ms +15%
BenchmarkFindCatalogCommand 8.7 µs 7.5 µs +14.92%
BenchmarkCatalogJSON 2.9 ms 2.6 ms +13.1%
large 1.6 ms 1.4 ms +12.76%
small 144 µs 127.8 µs +12.68%
json-small 254.6 µs 226.8 µs +12.22%
yaml 5 ms 4.5 ms +11.13%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing scydas:fix/workflow-output-null-skipped (5152660) with main (b3b0fae)

Open in CodSpeed

@samzong
samzong merged commit c383c72 into lathe-cli:main Aug 24, 2026
5 checks passed
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.

2 participants