Skip to content

improvement(workflow-code): remove agent traps from table keys, Function results, resume ids and builder names - #10336

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/workflow-code-agent-traps
Nov 23, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
improvement/workflow-code-agent-traps

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Table keys keep underscores: a table named daily_totals is keyed daily_totals, not daily-totals, so the key an agent types matches the name. Persisted keys are never recomputed, so existing workspaces round-trip unchanged; a collision after slugging still gets a -2 suffix.
  • A whole Function result in a JSON field is now inferred from its returns (string or not), and catalog outputs whose runtime value can be text (Function result, api.data, other any outputs) warn W_JSON_REF_UNTYPED unless inferred. Print and compile share the same rule.
  • Paused sim workflows run / runs get output gains an additive next field with the exact sim workflows runs resume <id> --workflow <wf> --context <ctx> command.
  • Builder lookups suggest the right spelling (humanInTheLoop -> human, snake_case, display names, legacy block types) in source params and compile; a bare unknown call is E_UNKNOWN_BUILDER.

Type of Change

  • Improvement

Testing

  • New and updated tests in workflow-code, sim-cli, workflow-sdk and resource-keys (unit and integration against Postgres); each fails when its source change is reverted.
  • Local gate: package typechecks, every workspace suite, apps/sim unit and integration suites, check:workflow-code-golden, check:audits, check:test-types, check:migrations, docs compatibility, lint:check, root type-check, block-registry check against staging.
  • The realtime file-doc-capabilities afterAll hook timeout appeared once in the full realtime run (nothing in apps/realtime changed) and passes when run alone.

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)

@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 23, 2026 4:35pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; both earlier findings are addressed and no new blocking issues were found.

Summary

The PR keeps underscores in newly allocated resource keys, infers whole Function results in JSON fields, adds resume commands, and improves builder-name hints.

Since the previous review:

  • JSON fields check whether whole outputs can be text.
  • Paused run output includes a command to resume it.
  • New resource keys keep underscores from their names.
  • Builder lookups suggest the catalog spelling for alternate names.

Both previous unnumbered findings are addressed. No new actionable issues were found.

Reviews (2) · Last reviewed commit: "fix(sim-cli): read resume links only fro..." · 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.

All reported issues were addressed across 23 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@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 24 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 39c1020 into staging Nov 23, 2026
156 of 158 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/workflow-code-agent-traps branch November 23, 2026 18:19

This branch was previously deployed

1 inactive deployment
Preview — edd1b40f Deployed Nov 23, 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