Repository navigation
fix(app-spec): seed arrays/objects are column values, not nested rows - #48
Merged
Merged
Conversation
The schema advertised array and object seed values while the validator only accepts values for declared columns and "@<table>[<index>]" references. A model following the schema sent a nested row and got "has no column" from the seed checks. seedValue now points at the scalar definition; the FK reference is a string, and the seed description keeps naming it. The added test accepts the reference and refuses a nested row at the value's path.
|
Review complete. No issues found. This change aligns the app-spec JSON schema with the validator's actual behavior: seed values must be scalars or
Two low-confidence issues below the review threshold were noted (side-effect narrowing of Reviewed commit: 76fcd11 |
An earlier pass removed array and object seed values, but they are valid for JSON and array columns (the agent fixture seeds parts: []). Restore them and say what they mean: a column value, or a "@<table>[<index>]" foreign-key reference. An array or object is a JSON/array column value, not a nested related row.
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.
What
seedValueallows arrays and objects because JSON and array columns take them (the agent fixture seedsparts: []). The ambiguity was that the contract never said so, and a model read the permissive value as a nested related row, which the seed step does not create."@<table>[<index>]"foreign-key reference; an array or object is a JSON/array column value, not a nested row.No type change: the earlier tightening broke
parts: []. The desktop's seed error now names the FK column when an object lands on a missing column.Test
The existing
food-bankfixture and the desktop'sblueprint-seedfixture (parts: []) stay valid. No behavior change in the template.The desktop harness vendors this contract; its PR runs
pnpm sync:app-specafter this merges.Refs constructive-io/constructive-planning#2432