Repository navigation
api: generated CLI and schema snapshot with api_test (part of #13178) - #13276
Merged
Merged
Conversation
`bazel run //tools/api:update` writes api/cli.json (every command's flags, aliases, accepted values, defaults and exit codes, from help_surface()) and api/schemas.txt (version plus sha256 of the events and dx.toml schemas). //tools/api:api_test fails when code and snapshot differ, and both refuse a schema digest change without a version bump. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
TrapsterDK
force-pushed
the
api-snapshot-13178
branch
from
November 17, 2026 22:56
ebd9912 to
844586c
Compare
This was referenced Nov 18, 2026
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.
Part of #13178.
Adds the first two files of the public API snapshot and the test that holds code to it.
bazel run //tools/api:updatewritesapi/cli.json(everydxcommand and subcommand: flags, aliases, accepted values, defaults, exit codes, fromhelp_surface()) andapi/schemas.txt(version fromSCHEMA_MAJOR/SCHEMA_MINORandCURRENT_SCHEMA_VERSION, plus the sha256 ofevents.schema.jsonanddx.schema.json).//tools/api:api_testre-renders and fails whenapi/is stale. A schema digest change with an unchanged version fails both the test andupdate.HelpFlagnow carriesvaluesanddefaults(switches report neither).api/is added to the root layout list (docs/design/layout.md,root_layout_test).Remaining for #13178:
starlark_doc_extractresolve upstream repos? The repo has nobzl_librarytargets yet, so this needs those first.api/starlark.json(load paths, symbols, macro signatures, rule attrs, providers, tag classes; aspect for**kwargsmacros).api/labels.txt(public non-.bzl labels, hubuse_reponames fromlang.json).cli.json: env vars and positional args; then retire the help goldens (cli/cli/tests/fixtures/help_goldens).Tests run locally:
bazel test //tools/api:api_test //tools/testing:root_layout_test //cli/plan:dx_plan_test: pass. Hand-editingapi/cli.jsonmakesapi_testfail as intended.//tools/ci:command_docs_testfails the same way on main (audit-update.md unknown-flag --type/--upgrade, stale allowlist lines); this PR does not touch those docs.tools/dx linton the new Rust files: clean.tools/dx check --affectedstopped at generate on untouched packages (erlang/tests/conformance/lock,deploy/private/release/tests).🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K