Skip to content

test/core: Validate customTimeoutErrorScreen settings export - #153

Merged
samir-gandhi merged 1 commit into
mainfrom
test/gh-144-timeout-settings
Sep 21, 2026
Merged

samir-gandhi merged 1 commit into
mainfrom
test/gh-144-timeout-settings

Conversation

@samir-gandhi

Copy link
Copy Markdown
Contributor

Follow-up to #152 (fixes #144).

Summary

You're right that #152 shipped with no validating test — the four new custom_timeout_error_screen_* attributes were declared in flow.yaml and exercised only by the generic definition validator. This PR adds TestDaVinciFlowTimeoutScreenSettings_ProcessorAndHCL in internal/core/davinci_flow_outcomes_test.go, following the existing outcomes-test pattern:

  • Builds a real SDK DaVinciFlowResponse (v0.13.0) with the four new settings fields set, including the plain-*bool UseCustomTimeoutErrorScreen (deliberate coverage — most other use* settings are choice wrappers, this one is not).
  • Drives it through ProcessResource against the real flow.yaml (loaded via schema.Registry, not a synthetic schema), asserting all four values land in settings.
  • Renders through the real HCL formatter, asserting all four appear in the emitted settings block — i.e. the computed-skip guard does not drop them (they are optional, not computed, on the provider).
  • The final value assertion collapses whitespace before matching because hclwrite aligns = within a block; pinning exact spacing would be brittle.

Tests

  • Validating test: TestDaVinciFlowTimeoutScreenSettings_ProcessorAndHCL (new).
  • go test ./... -count=1 — all packages pass, including the previously flaky TestResolveEmbeddedReferences_DisambiguatedName_StableAcrossEnvironments.
  • gofmt clean, go vet ./internal/core/ clean.

Breaking changes

None — test-only.

🤖 Generated with Claude Code

Adds TestDaVinciFlowTimeoutScreenSettings_ProcessorAndHCL, which drives
the real flow.yaml definition with a v0.13.0 DaVinciFlowResponse carrying
the four new settings fields through ProcessResource and the HCL
formatter, proving they export as optional (non-skipped) attributes.

Follow-up to #152 / #144.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@samir-gandhi
samir-gandhi merged commit 28fb2ee into main Sep 21, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

Regression Test Results

Matrix Entry Status Breaking Acceptable
default-hcl ✅ PASS 0 0
default-tfjson ✅ PASS 0 0
hcl-include-all ✅ PASS 0 0
hcl-skip-deps ✅ PASS 0 0
tfjson-skip-deps ✅ PASS 0 0

✅ No regressions detected

All export configurations produced compatible output.


Generated by regression workflow • View run

@samir-gandhi
samir-gandhi deleted the test/gh-144-timeout-settings branch September 22, 2026 02:37
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.

customTimeoutErrorScreen is missing from the Davinci Flows Settings

1 participant