fix(execution): bound reference and context processing

Merged
WA
1mo ago
+353-89

Summary

  • Replace repeated Function tag and workflow-variable rewrites with single passes and cached bindings. Bound executable and diagnostic source length and reference count before execution, preserving legacy variable precedence.
  • Reuse sanitized documentation queries across contexts and match context labels in bounded passes. Limit messages to 1,048,576 characters, contexts to 100, and labels to 1,000 characters at admission and context resolution.
  • Index workflow dependencies by block and path. Bound input traversal, text, references, and mock path depth, returning an explicit error when the command cannot produce a complete report.

Type of Change

  • Bug fix

Testing

  • 464 tests passed across 15 touched and neighboring test files, including Function execution, chat context processing/admission, workflow dependency commands, and headless execution.
  • The new limit regressions failed before their fixes. Independently disabling each input limit and the incremental object-traversal and legacy-precedence protections made the corresponding regressions fail again; all guards were restored.
  • Lint, all 51 repository audits, type-checking across 26 workspaces, block registry validation, and docs manifest validation passed. Required artifact generators completed without drift.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)