Repository navigation
fix(workflow-code): active-field and secret correctness - #10544
Merged
Merged
Conversation
- basic-only fields on an advancedMode block are never required, never printed as todo(), and W_FIELD_NOT_APPLICABLE when written - workflow variable values holding a detected credential print as stored() with W_LITERAL_SECRET; compile resolves stored() by variable key - a value creation mints (webhook token) no longer warns W_LITERAL_SECRET on print or apply - E_LIMIT_EXCEEDED for code files names the measured total and the file - nightly job runs the corpus suites over the full corpus - docs: narrow the never-printed claim, document minted values and null
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 19 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
Contributor
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryFixes active-field checks and keeps detected credentials in workflow variables out of printed source.
Reviews (2) · Last reviewed commit: "fix(workflow-code): read a variable's st..." · Reviewed by Greptile |
…en the lock records it
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 branch was previously deployed
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
QA batch B1 for workflows as code: fixes for active fields and secrets, needed before the flag is on for everyone.
advancedModeblock. The serializer never sends a standalonemode: 'basic'field from a block in advanced mode, but compile and print ignoredadvancedMode. Compile warnedW_REQUIRED_MISSING. Print wrotetodo(), which broke P3 print idempotence on the full corpus (sailpoint_v2:sailpoint_search_aggregate:advanced). A value written to clear the warning was silently dropped at run time. A singlebasicOnlyHiddenpredicate incatalog/activity.ts, which the serializer mirror also uses, now drivescheckFields(W_FIELD_NOT_APPLICABLE),missingRequiredFieldsand print'sneedsTodo.value: stored()withW_LITERAL_SECRET. Compile resolvesstored()from the stored workflow's variable of the same key, or raisesE_STORED_VALUE_MISSING. With only the lock (offline check), the value is left unread. Compile also warns on a literal or kept credential in a variable.isStoredCallmoves intocompile/context.tsso tools and variables share it.mintsFreshValue) still prints asstored(), but neither print norkeepStoredreportsW_LITERAL_SECRETfor it.E_LIMIT_EXCEEDEDfor code files now states the measured total and the file that crossed the limit. The exact count runs only on the error path.workflow-code-corpusworkflow runs the corpus suites withROUNDTRIP_CORPUS_FULL=1nightly, on dispatch, and when the workflow file itself changes.stored()TSDoc):stored()is documented.W_FIELD_NOT_APPLICABLE.nullclears it.Type of Change
Testing
Each test below went red with only its guard reverted (one guard at a time) and green with the fix.
apps/sim/lib/workflows/code/hand-written.test.ts, real catalog:todo(), noW_REQUIRED_MISSING, and writing it givesW_FIELD_NOT_APPLICABLE. Three guards.sk-…key: warned on apply; the read-back holdsstored()and not the key; compiling against the stored workflow round-trips the variables; with no stored workflow the result isE_STORED_VALUE_MISSING. Three guards.token: stored()and noW_LITERAL_SECRETfrom print or compile. Two guards.packages/workflow-code/src/compile/hostile.test.ts: the code-file limit message names the measured total and the file.ROUNDTRIP_CORPUS_FULL=1, every corpus suite including typecheck: 49/49 green.workflow-codepackage suite (824),lib/workflows/code(274), rootbun run test,type-check,check:audits,lint,generateandcheck-block-registry.Risks
stored()is new compile surface. The round-trip test and the full corpus cover it. Offline checks read it asnull, the same way a lock-bound block param is left out unread.stored(), so the value never reaches the file.stored()TSDoc in SDKcore.d.tschanged, which regeneratedcore-text.generated.ts.Checklist
test-auditauthoring gate)