Skip to content

refactor(workflow-code): simplify the source dir lock release and drop casts from the QA fixes - #10276

Merged
waleedlatif1 merged 5 commits into
stagingfrom
refactor/workflow-code-qa5-tidy
Nov 21, 2026
Merged

waleedlatif1 merged 5 commits into
stagingfrom
refactor/workflow-code-qa5-tidy

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #10262: the review and cleanup passes that finished after it merged.

What changed and why:

  • Source dir lock: the release is now one synchronous step that removes the lock and uninstalls its interrupt handler together. This replaces three layered fixes from fix(workflow-code): staging QA fixes for runtime, promote, workspace and CLI source #10262's review rounds, including the owner-record check. Because an interrupt runs only between event-loop turns, it can no longer delete a lock another command took, or find this one half-removed.
  • Block rename: rewriteBlockNameReferences is now generic over its input, which drops the as casts at its callers.
  • Column strip: the row condition is one sql clause, without the as SQL cast.
  • Loop test fixture: built from a loopData parameter instead of mutated with Object.assign. This also clears one test-types baseline entry.
  • Smaller refactors:
    • the nested ternary for the name-taken hint becomes a named function;
    • the one-field option check is inlined;
    • one exit-code text template replaces two near-copies.

Behaviour is unchanged, except that the lock can no longer be left half-removed by an interrupt.

Testing:

  • These 5 commits passed the full local gate before being rebased onto staging. The rebase only dropped a superseded test fix, now in fix(executor): keep the condition-join loop test off the Redis-backed isolate lease #10275.
  • On the rebased tree:
    • type-check passes for apps/sim, sim-cli and workflow-code;
    • lint, check:test-types, check:test-patterns and check:explicit-any pass;
    • targeted tests pass: sim-cli lock, source-dir, check, apply and exit codes (218); workflow-code refusals (7); apps/sim operations, rename, stores and columns (273); integration for rows, workspace apply, ops edits and workflow source apply (195).

@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 21, 2026 5:17am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

The PR makes source-directory lock removal synchronous and removes casts from reference rewrites and column removal.

  • CLI source commands remove their directory lock before uninstalling its interrupt handler.
  • Workflow block renames keep each reference's input type without caller casts.
  • Workspace source name conflicts keep their advice based on the resource involved.
  • Table and source checks keep their behavior with simpler conditions and messages.

Reviews (2) · Last reviewed commit: "refactor(workflow-code): name the name-t..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 13 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

…upt release in one synchronous step

An interrupt is handled only between event-loop turns, so a synchronous rmSync
followed by the release's disposal leaves no turn in which the release could
remove a lock another command took, or find this one half removed. That makes
the owner-record check the last commits layered on unnecessary; it is gone.
…ad of mutating it, and shrink the test-types baseline
…ld option check, and share the exit-code text
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 12 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit dfff8c3 into staging Nov 21, 2026
92 of 96 checks passed

This branch was successfully deployed

1 active deployment
Preview — 4d904003 Deployed Nov 21, 2026 by vercel[bot]
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