Skip to content

improvement(tools): dry-run placeholders echo what common write requests determine - #10410

Merged
waleedlatif1 merged 4 commits into
stagingfrom
improvement/dry-run-placeholder-hooks
Nov 25, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
improvement/dry-run-placeholder-hooks

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Dry-run placeholders now echo what the request determines for the most-used write tools: Google Sheets (append/write/update v1+v2), Airtable, HubSpot create/update (contact/company/deal/ticket), Slack message, knowledge upsert, Notion create page, Supabase insert/upsert, Postgres/MySQL insert, Linear create issue, GitHub create issue, Teams/Discord/Telegram, Google Docs/Drive, Jira/Confluence, Trello/Asana/ClickUp/Zendesk, Resend/SendGrid/Gmail v2
  • Provider-generated ids are dry_run_<kind>_<n> placeholders from one dryRunId helper; hooks never guess stored state (upsert's new document id, a resolved Confluence space key, Teams text a mention rewrites)
  • Request builders and hooks share named helpers instead of copying normalization (Sheets rows, HubSpot properties, Supabase rows, Linear issue input, Discord content, the Teams rewrite predicate)
  • A declared file[] output samples as [] in dry runs
  • Workflow tests record, host-side, which writes each run stubbed (folded with counts, capped); the Mothership tests tool returns them as unmockedWrites

Type of Change

  • Improvement

Testing

  • tools/request-builders.test.ts pins the live request bodies of every refactored builder on edge inputs (passes unchanged against the pre-refactor builders)
  • tools/dry-run.test.ts drives the real stub path end to end: echoes, secret masking, guards against guessed fields
  • lib/workflows/application/dry-run.integration.ts (real Postgres/Redis) asserts the workflow-test side-effects summary
  • Touched tool suites, lib/workflow-tests, Mothership server tools; apps/sim type-check; lint; generate; check:audits

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)

…sts determine

Adds dryRunOutput hooks for Google Sheets append/write/update, Airtable record writes,
HubSpot contact/company/deal/ticket create and update, Slack messages, knowledge upsert,
Notion page create, Supabase insert/upsert, PostgreSQL/MySQL insert, Linear and GitHub
issue create, Teams/Discord/Telegram messages, Google Docs create, Drive upload, Jira
write, Confluence page create, Trello/Asana/ClickUp/Zendesk create, and Resend/SendGrid/
Gmail v2 send. Provider-assigned ids use the new dryRunId helper (also used by table rows).
Request normalisation the hooks need moves into named helpers the request builders share
(sheet rows, HubSpot properties, Supabase rows, Linear issue input, Discord content).
Dry-run samples now give a declared file[] output an empty list.
…host

runWorkflowForTest reports its WriteStubPolicy summary to the session when the run ends,
after releasing its execution slot, with a throwing callback logged rather than masking the
run's own error. The session keeps a payload-free summary per execution, repeats folded into
counted entries (at most 20 per list and 50 runs per file, the rest counted), and the file
runner stores it as report.sideEffects next to the sandbox's report; only runs finished when
the sandbox returns are reported. The contract reads the stored schema, and the Mothership
tests tool lists unmockedWrites per run.
@vercel

vercel Bot commented Nov 25, 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 25, 2026 8:25pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no new actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

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

Summary

Dry-run placeholders now echo request-known values for common write tools. Workflow tests also record which writes were stubbed.

  • Google Sheets dry runs return the rows and counts their requests determine.
  • HubSpot dry runs show written properties with clearly fake record IDs.
  • Database and table dry runs return the request-known rows or write counts.
  • Message and email dry runs show details their requests can determine.
  • Work-item and document dry runs show the fields their requests set.
  • Workflow test results show which writes were stubbed or left unchecked.
  • Dry-run samples leave file lists empty and share rules for fake IDs and echoed values.

Reviews (3) · Last reviewed commit: "fix(tools): report unknown write lists f..." · 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 64 files

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/tools/hubspot/update_ticket.ts Resolved
Comment thread apps/sim/tools/google_sheets/write.ts Resolved
Comment thread apps/sim/tools/clickup/create_task.ts Resolved
Comment thread apps/sim/tools/trello/create_card.ts Resolved
Comment thread apps/sim/tools/google_sheets/utils.ts Resolved
Comment thread apps/sim/tools/asana/create_task.ts Resolved
…tial write lists

- Mothership tests tool returns unmockedWrites as sites plus omittedCalls/omittedRuns
- GitHub create_issue echoes labels/assignees from the same helper as the request body; no guessed state, closed_at or null body
- Asana, Trello, ClickUp and HubSpot placeholders stop asserting completed/closed/archived defaults or empty notes/desc
- Zendesk create_ticket echoes the assignee, group and requester ids it sets
- Teams rewrite check shares the send path's mention parser, so blank mentions are not rewrites
- Sheets placeholder trims the spreadsheet id, skips empty rows in counts and avoids a spread over every row
- HubSpot update placeholders stringify a numeric record id before trimming
@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 25, 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.

2 issues found across 64 files

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

Turn on auto-fix | Re-trigger cubic

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/tools/github/create_issue.ts">

<violation number="1" location="apps/sim/tools/github/create_issue.ts:178">
P3: The v2 dry run never echoes `milestone`, so it shows a fabricated milestone even when `milestone` is set. Echo `milestone: { number: params.milestone }` when set, and `null` when not, matching `issue.milestone ?? null` in the live transform.</violation>
</file>

<file name="apps/sim/lib/mothership/tools/server/tests.ts">

<violation number="1" location="apps/sim/lib/mothership/tools/server/tests.ts:186">
P2: `run.report` can be null for errored or abandoned runs, but this converts null into zero side effects and falsely claims that no writes were stubbed. Preserve an unknown/null value when no report exists, in both `get` and `run` responses.</violation>
</file>

Comment thread apps/sim/tools/github/create_issue.ts Resolved
@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 25, 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 64 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 c1b862a into staging Nov 25, 2026
87 checks passed

This branch was previously deployed

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