Skip to content

Publish command catalog, eliminate unknown types, and harden schema#290

Merged
AndreyVMarkelov merged 1 commit into
masterfrom
json-public-command-catalog
Jun 25, 2026
Merged

Publish command catalog, eliminate unknown types, and harden schema#290
AndreyVMarkelov merged 1 commit into
masterfrom
json-public-command-catalog

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Publish docs/json-schema/v1/commands.json as the public command contract catalog with a sync test against the internal golden fixture
  • Remove unreachable unsupported_output_format error code from code and schema
  • Add TestHelpOutputRemainsTextWithJSONFlag verifying help is always text regardless of --output
  • Eliminate "unknown" metadata type: jsonMetadataFromDropbox now returns errors instead of silent fallbacks
  • Skip metadata conversion in text mode for cp/mv (performance optimization)
  • Remove "unknown" from all schema kind lists and add contract assertions rejecting it
  • Validate error schema code enum matches all defined constants

Test plan

  • All existing tests pass
  • TestPublicJSONCommandCatalogMatchesGoldenContract prevents catalog/fixture drift
  • TestHelpOutputRemainsTextWithJSONFlag covers root help, bare root, and command help
  • TestJSONMetadataFromDropboxRejectsUnknownMetadata verifies nil metadata errors
  • assertGoldenCommandStatuses rejects "unknown" in both statuses and kinds
  • assertGoldenSuccessOutputStatuses validates all golden output results have explicit status/kind
  • Error code enum validation matches all code constants
  • gofmt, go vet, golangci-lint all pass

Publish the command contract catalog, remove the unreachable unsupported_output_format JSON code, and reject unknown Dropbox metadata types instead of serializing unknown result kinds.

Keep help/root JSON behavior documented and covered by tests, and tighten golden contract audits so public schemas and success fixtures stay in sync.
@AndreyVMarkelov AndreyVMarkelov merged commit cbd4e5f into master Jun 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant