docs(dataset): fix V2 --type examples to match CLI validation (#51) - #57
Open
linhongyu510 wants to merge 1 commit into
Open
docs(dataset): fix V2 --type examples to match CLI validation (#51)#57linhongyu510 wants to merge 1 commit into
linhongyu510 wants to merge 1 commit into
Conversation
The V2 dataset command family (vs dataset create / ingest / infer-schema)
validates --type via parseDatasetTypeV2Value, which only accepts
user_event and multi_modal (plus their aliases). Numerous docs, embedded
help text, oclif command examples, and acceptance fixtures/tests still
showed legacy/illegal values such as item, video, document, event,
behavior, image_text and the <...|user-event|document> placeholder, all
of which the CLI now rejects with "Use user_event|multi_modal".
Changes:
- docs/COMMANDS.md: dataset create / schema check --type placeholders ->
<user_event|multi_modal>.
- src/core/root-help.ts: V2 onboarding infer-schema example --type item ->
multi_modal.
- src/app/product-commands.ts: dataset create/ingest/infer-schema help and
EXAMPLES blocks now use multi_modal (kept vs dataset list --type item
filter and vs item ... --type item|video which use different validation).
- src/commands/dataset/{create,ingest,infer-schema}.ts: oclif examples ->
multi_modal.
- scripts/fixtures/v2-onboarding/dataset-create.json: Type item ->
multi_modal.
- scripts/suites/v2-onboarding.cjs: pipeline datasetType item/video ->
multi_modal.
- scripts/run-acceptance.cjs: update mock/dry-run tests to multi_modal and
repurpose the stale "rejects multi_modal" negatives into legacy-type
rejection tests aligned with current validation; keep the document
rejection negative.
The v2-onboarding acceptance suite dataset-type tests now pass
(remaining render-schema failures are pre-existing and unrelated).
Signed-off-by: linhongyu510 <linhongyu510@users.noreply.github.com>
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
Fixes #51.
The V2 dataset command family (
vs dataset create / ingest / infer-schema) validates--typeviaparseDatasetTypeV2Value, which only acceptsuser_eventandmulti_modal(plus their aliasesuser-event,multi-modal,multimodal). However, docs, embedded help text, oclif command examples, and acceptance fixtures still advertised legacy/illegal values such asitem,video,document,event,behavior,image_text, and the<...|user-event|document>placeholder. Following the documented examples verbatim causes the CLI to reject the command withUse user_event|multi_modal.Changes
docs/COMMANDS.md:dataset create--typeplaceholder -><user_event|multi_modal>.src/core/root-help.ts: Quick-startinfer-schemaexample--type item->multi_modal.src/app/product-commands.ts:dataset create/ingest/infer-schemahelp + EXAMPLES now usemulti_modal(keptvs dataset list --type itemfilter and V1vs item ... --type item|video, which use different validation paths).src/commands/dataset/{create,ingest,infer-schema}.ts: oclif examples ->multi_modal.scripts/fixtures/v2-onboarding/dataset-create.json,scripts/suites/v2-onboarding.cjs,scripts/run-acceptance.cjs: fixtures/tests updated to valid types; the stalerejects-multi-modalnegatives are repurposed into legacy-type (item) rejection tests aligned with current validation, keeping thedocumentrejection.Verification
Confirmed against
parseDatasetTypeV2Value(src/app/product-commands.ts):INFER_SCHEMA_DATASET_TYPESandCREATE_DATASET_TYPESare both[user_event, multi_modal]; passingitem/video/documentthrows. The v2-onboarding acceptance dataset-type tests now pass (remaining render-schema failures are pre-existing and unrelated to this change).