Skip to content

fix: support dot-notation in resolveParamValue for integration step references#108

Merged
intel352 merged 2 commits intofix/stock-trading-stubfrom
copilot/sub-pr-96
Feb 23, 2026
Merged

fix: support dot-notation in resolveParamValue for integration step references#108
intel352 merged 2 commits intofix/stock-trading-stubfrom
copilot/sub-pr-96

Conversation

Copy link
Contributor

Copilot AI commented Feb 23, 2026

resolveParamValue claimed to support ${step1.value} references to prior step fields, but results stores step output keyed by step name (e.g. results["step1"] = map[string]any{...}), so ${step1.value} would never resolve — only an exact key "step1.value" in results would match, which never exists.

Changes

  • handlers/integration.go: After the fast exact-match path, split the variable name on . and traverse into the nested map[string]any step result. Falls back to the original string if the step is missing, the result is not a map, or the nested key doesn't exist.
// ${step1.value} now resolves correctly:
results := map[string]any{
    "step1": map[string]any{"value": "resolved"},
}
resolveParamValue("${step1.value}", results) // → "resolved"
resolveParamValue("${step1}", results)       // → map[string]any{"value": "resolved"} (exact match, unchanged)
  • handlers/integration_handler_test.go: Added tests covering dot-notation success, missing nested key, non-map step result, missing step, exact match, plain value passthrough, and non-reference strings.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…nces

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix stock trading stub with demo data fix: support dot-notation in resolveParamValue for integration step references Feb 23, 2026
Copilot AI requested a review from intel352 February 23, 2026 05:36
@intel352 intel352 marked this pull request as ready for review February 23, 2026 06:20
@intel352 intel352 merged commit e0b583b into fix/stock-trading-stub Feb 23, 2026
@intel352 intel352 deleted the copilot/sub-pr-96 branch February 23, 2026 06:24
intel352 added a commit that referenced this pull request Feb 23, 2026
* fix: make stock trading stub explicit with demo data instead of silent zeros

CheckPrice() previously returned 0,0,error when prices weren't seeded,
giving users no data and no indication the example was a stub. Now it
seeds a realistic AAPL-like opening price (182.50) on first call and
applies a +0.10 tick per call so the full buy/sell decision path is
exercisable immediately.

Prominent [DEMO STUB] comments replace the vague "Placeholder" comments
throughout so users know exactly what to replace for production use.
Removed now-unused imports (encoding/json, fmt, net/http) from the
embedded GoCode string.

Closes #73

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve gocritic sloppyReassign lint error in integration handler

Replace err re-assignment with short variable declaration in
handlers/integration.go to satisfy golangci-lint pre-push hook.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: support dot-notation in resolveParamValue for integration step references (#108)

* Initial plan

* fix: support dot-notation in resolveParamValue for step result references

Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
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