Repository navigation
fix(workflow-code): scope check's untyped JSON ref warning per field, as the server does - #10400
Merged
Merged
Conversation
…at store a reference anew The offline check reported W_JSON_REF_UNTYPED on every untyped bare reference of a block whose digest changed since the get. Renaming a block's display name changes its key, so the block and every block reading it compiled to a new digest, and each untouched untyped reference in them was reported although its field stores exactly what it stored. The server compares per field, through the apply's renames, and stays quiet there. A get or apply now records in .sim/stored-edges.json the JSON fields of the printed source that hold untyped references (the text each stores and those references; CompileResult.untypedJsonFields), and the compile reads them back as CompileInput.storedUnreadUntypedFields beside the lock. Such a reference stays quiet while its field compiles to the same text through the lock's renames, as one the stored workflow holds does against `stored`. A field whose text changed, or a reference that was typed when printed (a Start input or a Function's code an edit changed), is reported. Without the record or the catalog the source was printed with, the check keeps the block-level rule; --strict still reports every one.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
[Medium impact] The PR appears safe to merge. Summary
No actionable issues found. Tests were inspected but not run.
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
This branch was successfully 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
checkreportedW_JSON_REF_UNTYPEDon every untyped reference in a block whose digest changed. Renaming a block's display name changes its key, so renaming a block, or a block it reads, surfaced every untouched untyped reference in those blocks. One restructure edit produced about 12 warnings on lines the agent never edited. The server never had this problem: it reports per field, after applying the apply's renames.checkreports only a field the edit makes store a reference anew. That is a field whose text differs from what the printed source stored (after the lock's renames), or one where the reference was typed when printed and is untyped now, as when a Function's code or a Start input changed.getandapplynow record the printed source's JSON fields that hold untyped references (normally empty) in.sim/stored-edges.json, next to the edges. The three record readers share one fingerprint-checked read.checkfalls back to the block-level rule.--strictstill reports every reference.Type of Change
Testing
workflow-source-check.test.ts, all red on staging and green now:--strictstay green.bun run generate,bun run lint,bun run type-check,bun run check:audits, docscontent:verify-compatibility,check-block-registry.ts origin/staging;lib/workflows/code(262);test:integrationonapply-workflow-sourceandcross-kind(120).Checklist
test-auditauthoring gate)