deepline 0.1.259 → 0.1.260

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1021,6 +1021,27 @@ export function resolveSheetContractForTableNamespace(
1021
1021
  continue;
1022
1022
  }
1023
1023
 
1024
+ // A ctx.dataset() inside an if/switch/loop is represented inside the
1025
+ // control-flow step's flattened `steps`. Its contract is just as durable
1026
+ // as a top-level dataset contract: runtime sheet registration resolves by
1027
+ // namespace after the branch is chosen. Do not make that registration
1028
+ // depend on which branch happened to be first in the source.
1029
+ if (
1030
+ (substep.type === 'control_flow' || substep.type === 'step_suite') &&
1031
+ substep.steps.length > 0
1032
+ ) {
1033
+ const nestedPipeline: PlayStaticPipeline = {
1034
+ stages: substep.steps,
1035
+ substeps: [],
1036
+ fields: [],
1037
+ };
1038
+ const nestedContract = resolveFromPipeline(nestedPipeline);
1039
+ if (nestedContract) {
1040
+ return nestedContract;
1041
+ }
1042
+ continue;
1043
+ }
1044
+
1024
1045
  if (substep.type === 'play_call') {
1025
1046
  const nestedContract = resolveFromPipeline(substep.pipeline);
1026
1047
  if (nestedContract) {