Skip to content

feat(lowering): materialize global rule array locals - #45

Closed
Teakowa wants to merge 3 commits into
agent/del-rs-31-foreach-20260818from
agent/del-rs-31-array-storage-20260818
Closed

feat(lowering): materialize global rule array locals#45
Teakowa wants to merge 3 commits into
agent/del-rs-31-foreach-20260818from
agent/del-rs-31-array-storage-20260818

Conversation

@Teakowa

@Teakowa Teakowa commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extend deterministic global-rule local storage to nested arrays of scalar WIR values
  • lower local array literals, references, indexes, and assignments through canonical WIR
  • allow the existing global foreach slice to read a materialized local array collection
  • preserve fail-closed HI018 for player-context, object/reference, and re-entrant storage

Review order

This slice is stacked on PR #44 (agent/del-rs-31-foreach-20260818). Merge order is #41, #43, #44, then this PR.

Evidence

  • cargo test --locked --test workshop_lowering -- --nocapture: 20 passed
  • cargo test --locked --all-targets: passed
  • cargo test --locked --test matrix --test corpus: 5 passed
  • cargo run --locked --quiet -- matrix --check: 128 entries valid
  • focused positive tests assert exact local-initialization → collection-materialization → index-initialization → while order, canonical WIR Array/GlobalVariable/valueInArray forms, generated helper names, and provenance
  • focused negative tests cover player-context, object/reference elements, unsupported vector arrays, and non-reentrant bodies with structured HI018
  • git diff --check and task-file rustfmt checks pass

Boundaries

  • no parser, semantic-model, or typed HIR changes
  • no provider-local Workshop catalog or WIR additions
  • no object identity, reference generations, member layout, parameters, recursion stack, or closure ABI
  • this is DEL adapter/WIR evidence, not live Overwatch-client execution evidence

Refs #31

Extend deterministic rule-local global storage to nested arrays of scalar WIR values and local array foreach collections, while failing closed for object/reference and re-entrant semantics.

Refs #31
Assert exact local-array foreach action ordering, generated helper identities, provenance, and an unsupported vector-array diagnostic.

Refs #31
Verify exact source spans for materialized array locals and foreach collection/index helpers.

Refs #31
@Teakowa

Teakowa commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by replacement PR #56, rebuilt from current main after #41/#54/#55. The old stacked implementation carried obsolete storage and validation assumptions; it is closed in favor of the current bounded array-local contract.

@Teakowa

Teakowa commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Closed as superseded by #56.

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.

1 participant