Language cleanup: two workstreams (WS01 mechanical, WS02 data/outcomes) for architecture review#160
Merged
Merged
Conversation
Adds WS01 (mechanical schema cleanup: workflow{}/policy nesting, type
expressions, outcome "default" block, environment traversals, cty
stdlib functions, VSCode grammar) and WS02 (data block + outcome
semantics: next traversals, return/continue keywords, data "internal"
replaces shared_variable, write block replaces shared_writes).
Targets main; merges into adapter-v2 once the language phase closes.
For architecture review before implementation begins.
brokenbot
approved these changes
May 25, 2026
This was referenced May 26, 2026
brokenbot
added a commit
that referenced
this pull request
May 26, 2026
* language_cleanup: scope two workstreams for HCL Terraform-shaping (#160) Adds WS01 (mechanical schema cleanup: workflow{}/policy nesting, type expressions, outcome "default" block, environment traversals, cty stdlib functions, VSCode grammar) and WS02 (data block + outcome semantics: next traversals, return/continue keywords, data "internal" replaces shared_variable, write block replaces shared_writes). Targets main; merges into adapter-v2 once the language phase closes. For architecture review before implementation begins. Co-authored-by: Dave Sanderson <dave@brokenbots.net> * workstream: complete workstreams/language_cleanup/WS01-mechanical-sch… (#162) * workstream: complete workstreams/language_cleanup/WS01-mechanical-schema-cleanup.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * workstream: complete workstreams/language_cleanup/WS01-mechanical-schema-cleanup.md * fix: address PR review feedback - bare traversal docs, stale comments, adapter env test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: increase TestClientReconnectMultipleFailures timeout for CI runners Under -race the multiple-reconnect path can exceed 10s on slower CI runners. Bump to 20s and add progress logging so future flakes are easier to diagnose. --------- Co-authored-by: Dave <dave@brokenbots.dev> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Dave Sanderson <dave@brokenbots.net> Co-authored-by: Dave Sanderson <dave@nullop.io> Co-authored-by: Dave <dave@brokenbots.dev> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Scopes the Terraform-shaping work the VSCode extension surfaced as two workstreams for architecture review before implementation begins. No code changes yet — just the workstream plans.
WS01 — Mechanical schema cleanup. Low-risk, all touch
workflow/schema.go:workflow { name = ... }reshape with nestedpolicy,type = stringtype expressions (drop the hand-rolledparseVariableType/TypeToString),outcome "default" {}replaces thedefault_outcomeattribute, environment refs as traversals (environment = environment.shell.ci), registercty/function/stdlibfor the full Terraform-equivalent function set (~50 funcs incl.startswith/substr/replace/format/etc.), VSCode grammar update. Hand-rolled duplicates (jsonencode,base64encode, etc.) are dropped in favor of stdlib — no override fallback.WS02 —
datablock + outcome semantics. Higher-risk, touches the engine runtime: outcomenextbecomes a node traversal (step.foo,state.done) with barereturn/continuekeywords replacing the magic-string sentinels;shared_variableis replaced bydata "internal" "name"(extensible block, ready for future remote kinds);shared_writes = { ... }becomes per-targetwrite { target = ..., value = ... }blocks inside outcomes (singularwritesince each updates one target —data.x.y.value = exprcan't be an HCL attribute LHS); engine runtime store renamedSharedVarStore→DataStore; VSCode grammar update.Migration strategy is hard break with helpful errors — same pattern as
parse_legacy_reject.go. No dual-support window.WS01 lands first to absorb mechanical schema churn; WS02 then lands on a clean base.
Branch targets
main; once the language-cleanup phase closes,mainmerges intoadapter-v2. Workstream files live inworkstreams/language_cleanup/following theadapter_v2/precedent.Test plan
workstreams/language_cleanup/README.mdfor phase framing.WS01-mechanical-schema-cleanup.md— confirm scope split is correct; flag any concerns about thedefault_outcome→outcome "default" {}shape (it's the one item where WS01 changes semantic surface, not just syntax).WS02-data-and-outcome-semantics.md— confirm thedata "<kind>" "<name>"shape (with onlyinternalsupported initially) is the right extension point, and confirm the per-targetwrite { target = ..., value = ... }block shape is acceptable given the HCL grammar constraint that preventsdata.x.y.value = exprattribute LHSs.