Repository navigation
improvement(workflows): dry-run placeholders echo the writes they stand in for - #10404
Merged
waleedlatif1 merged 3 commits intoNov 25, 2026
Merged
Conversation
…nd in for A stubbed write was answered with a generic sample of the tool's outputs, so a Function reading a dry-run table upsert's row.data.<field> got null and an agent testing its workflow concluded its logic was wrong. A tool may now declare a pure dryRunOutput(params) on its config: the outputs the request alone determines. It receives the params with every secret masked (as sideEffects.stubbed[].request is built), its result is redacted like that request, and the sample of the declared outputs fills whatever it leaves out (ids, nested fields, each array item from the sample's first). Tools without it keep the sample. Declared for table insert/upsert/update row (row.data echoes the written data; update keeps the named row id) and batch insert (rows and insertedCount), file write (requested name, text byte size), and knowledge create document (the document name as stored). Filter updates and deletes are left out: their outputs depend on stored state.
…a and redact once A dry-run echo was merged into the sample by the sample's value shape, so a table row declared as bare json came back with the generic sample keys (name: 'Sample Object', status: 'active') beside its data, and every batch row shared the id 'item_1'. The echo is now laid over the sample by the declared schema: field by field where an output declares properties, item by item where it declares array items, and whole anywhere else (an undeclared field is dropped). The table hooks return the row as the routes emit it (data, and placeholder id, position and timestamps, distinct per batch row) with no ignored columns; update's row holds only the fields it patches. Knowledge create echoes only the document name, and file write sizes its text with utf8ByteLength. Value-based masking replaced every occurrence of any string under a secret-named field, however short, so a one-letter reset_token column turned 'a@b.co' into '[REDACTED]@b.co' in the request and in what downstream blocks read; worse, a value masked inside a run secret left the rest of that secret unmatched by the registry. Values shorter than the repo's identifying-literal floor (isNonIdentifyingSecretLiteral) are now masked only by their field, password fields are masked by name like credential-named ones, and the registry projection runs before key and value masking. A stubbed write's request and echo are redacted in one pass, one PII call per write; when that pass cannot vouch for the pair, both are null.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge, with no actionable findings. SummaryDry-run writes can now return request-derived values through
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 18 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dry-run placeholders now echo the writes they stand in for, and a partial-secret exposure in
sideEffectsredaction is closed.Realistic placeholders
row.data.<field>sawnull. In benchmark runs, agents reasonably took that for a bug in their own workflow: one spent an extra round, one ran live to prove its output, one restructured to avoid the read.dryRunOutput(params)returning the outputs the request alone determines. It runs on the same masked params assideEffects.request, and its result is redacted again.propertiesmerge field by field, arrays with declareditemsmerge item by item, and anything else is replaced whole. Undeclared keys are dropped. Tools without the hook keep the generic sample.table_insert_row,table_upsert_row,table_update_rowandtable_batch_insert_rowsreturn real-shaped rows (id,data,position, timestamps). Ids are distinct per row, andupdate_rowkeeps its row id.file_writeechoes the name and UTF-8 size.knowledge_create_documentechoes the stored document name.Redaction fix (affects
sideEffectsfrom #10402)sideEffects.request. Masking now applies the registry projection first, then key and value masking.isNonIdentifyingSecretLiteral) are masked only in their own field. Before, a short value under a credential-like column name (e.g.reset_token) was replaced everywhere it appeared.Type of Change
Testing
dry-run.integration.ts(real Postgres), with literal expected values:row.datagets the written values and the full row shape, with no row written;file_writeechoes;reset_tokenvalue no longer mangles other fields;bun run generate,lint,type-check, rootbun run test,check:audits,check:api-validation:strict,check:test-types,test:integration(dry-run suites, 34/34), docscontent:verify-compatibility,check-block-registry.ts origin/staging./simplify(4 angles),/cleanup(comments, test-audit) and an adversarial correctness and secrets pass.Checklist
test-auditauthoring gate)