Repository navigation
fix(workflow-code): bound lock parsing and rename inference, and close check/server parity gaps - #10285
Conversation
…ock entries at maxBlocks
… a literal tag naming no block A capped W_ENV_UNKNOWN or former-block W_UNRESOLVED_REF no longer computes its hint. A literal <name.path> whose head names no block (and no renamed block) is W_UNRESOLVED_REF, refused on a changed block as E_APPLY_UNRESOLVED_REF, matching the server lint's E_APPLY_LINT.
…efuse it as the placement gate does
… the rows byte limit
… hints, test helpers)
…ay-name swap The swap of two consts is the same edit as a swap of two display names, which the apply intends as two renames (apply-workflow-source.integration.ts). Document the rule and the compile-side gap instead.
…ile, as check refuses it
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The PR appears safe to merge; no actionable issues remain from this review. SummaryThe PR bounds lock parsing and rename inference, brings offline checks closer to server checks, and limits workspace reads.
|
There was a problem hiding this comment.
All reported issues were addressed across 36 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…linear and quadratic growth separate
…te cap, not at the end of its page
… of the blocks lacking it, not a scan of every block
…nly for existing blocks, refused on an edit as the placement gate refuses it
…mpile, the get check and the lock, so a returned lock always applies back
…zed lock costs one key count
…ompile, and share pushTo and strings from records
…tays below the cap At the cap the linear walk measured 11x against the quadratic walk's 42x; at 64 to 512 blocks, 9x against 57x.
|
@cubic-dev-ai review |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
…qa6-perf # Conflicts: # packages/workflow-code/src/compile/scaling.test.ts
There was a problem hiding this comment.
All reported issues were addressed across 48 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
…ows pass the source limits as saved After a table update commits, reading its managed rows back could pass the row or byte cap and fail the apply, leaving the caller on the old base though the edit was saved. The write now reprints the rows file as the directory declared it, keeps the base's rows entry, and warns (W_SERVER_CHANGED) that the rows were not read back.
… byte limit applies and reapplies
|
@cubic-dev-ai review |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
What
Fixes from the QA6 compiler and server review of workflows as code:
SOURCE_LIMITS.maxBlocksblocks and variables, enforced in bothparseWorkflowLock(E_LOCK_SHAPE, checked before reading) and the contract schema.W_ENV_UNKNOWN, former-blockW_UNRESOLVED_REForE_UNKNOWN_VARIABLEpast the warning caps no longer computes its did-you-mean.<name.path>whose head names no block (and no renamed block) is nowW_UNRESOLVED_REF. On a changed block it is refused asE_APPLY_UNRESOLVED_REF, as the server lint refuses it.block()of an uncatalogued type gets the newW_UNKNOWN_BLOCK_TYPE, refused asE_APPLY_INVALID_BLOCK_TYPE. A block the stored workflow or lock already holds stays quiet.lockIdentRenamesnow document this, along with the compile-side gap.canonicalJson, in@sim/utils/object, used by table cells and cursor binding.maxRowsBytes.readMany.Why
A single apply or dry run could stall the app server's event loop for seconds to hours, and offline
checkpassed things the server refuses.Evidence (before → after)
Tests
Each regression test below fails on the pre-fix code. The one marked as a guard covers the new candidate search, which staging does not have:
expectLinearGrowth), with growth from n to 8n on the old code (the bound is 20x):E_APPLY_UNRESOLVED_REF. The existing lint test is updated to match, since the server'sE_APPLY_LINTno longer has to catch it.🤖 Generated with Claude Code