Repository navigation
research_workflow_items: validate package.json manifest shape in ids (#6856) - #7007
Merged
Merged
Conversation
developing-today
Bot
requested review from
a team and
dezren39
as code owners
November 8, 2026 00:51
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
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.
Fixes #6856 (task 11083).
list_idsinscripts/research_workflow_items.pyread the package'spackage.jsonmanifest shape-trusted:json.loads(...).get("segments", [])projected with[s["id"] for s in segments]. A wrong-shape or non-JSON manifest surfaced as a bare Attribute/Key/Type/JSONDecode error naming no file or field.Change
manifest_segments()helper validates the manifest before use: top level must be a JSON object;segments(when present) must be a list of objects each with a stringid; a non-JSON manifest fails the same way. Every violation goes through the tool'sfail()diagnostic namingpackage.jsonand the field/expectation.package.jsonand a manifest withoutsegments— behave exactly as before.Tests
test_ids_validates_the_package_manifest_shapeinscripts/tests/test_research_workflow_items.py: controls (well-formed segments listed;{}→ no segments) plus eight wrong shapes (list/string top level, segments as string/object, segment as string, segment missingid, non-stringid, non-JSON) asserting the single-line error contract namespackage.json.python3 -m unittest scripts.tests.test_research_workflow_items— 17 tests OK;scripts.tests.test_research_workflow— 59 tests OK.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.