Skip to content

Propagate flagUnion into incremental stream/defer buckets and add tests#4

Open
benjaie wants to merge 1 commit intomainfrom
codex/review-flagunion-logic-and-add-tests
Open

Propagate flagUnion into incremental stream/defer buckets and add tests#4
benjaie wants to merge 1 commit intomainfrom
codex/review-flagunion-logic-and-add-tests

Conversation

@benjaie
Copy link
Copy Markdown
Owner

@benjaie benjaie commented Feb 5, 2026

Motivation

  • Ensure flagUnion correctly reflects pre-populated store entries when building incremental stream/defer buckets so downstream filtering and dependency checks observe error/inhibited flags.
  • Prevent regressions where newly-created incremental buckets lost error flags and incorrectly allowed execution paths that should be inhibited.

Description

  • Added helper getFlagUnionFromStore(store: Bucket["store"]) which aggregates _getStateUnion() from each ExecutionValue in a store and returns an ExecutionEntryFlags union.
  • Wired the helper into incremental bucket creation so created buckets use flagUnion: getFlagUnionFromStore(store) instead of NO_FLAGS in both stream (processStream/_processQueue) and deferred (processSingleDeferred/specs) code paths.
  • Imported the ExecutionEntryFlags type where needed and kept existing behaviour otherwise unchanged.
  • Added tests grafast/grafast/__tests__/flagUnionIncremental-test.ts that assert error flags (via flagError/TRAP_ERROR) are visible inside newly-created stream and deferred buckets by using a custom FlagUnionCheckStep that inspects _extra._bucket.flagUnion.

Testing

  • Added two automated tests in __tests__/flagUnionIncremental-test.ts covering the streaming case and the deferred case, both asserting that no unexpected errors payloads are emitted and the merged data matches expected results; these tests were added to the test suite.
  • No test suite was executed as part of this change (tests were created and committed but not run in this rollout).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant