Skip to content

Celerity CLI Initial Work - #233

Merged
fr3shw3b merged 12 commits into
mainfrom
feat/cli-unification
Oct 14, 2026
Merged

fr3shw3b merged 12 commits into
mainfrom
feat/cli-unification

Conversation

@fr3shw3b

Copy link
Copy Markdown
Contributor

Description

Provides functionality for the CLI that has mostly be manually tested end-to-end for developing and deploying Celerity applications.

Enabling the consumer features in the core lib changed Cargo.toml without
regenerating the lockfile, so cargo metadata --locked and every build passing
--locked failed against it. The runtime image is built with --locked, which
made this a release blocker rather than a local inconvenience.
The binary frame conformance vectors are stored base64 encoded in a JSON
fixture, so the test that replays them needs a decoder. Without the dependency
declared the helpers test target did not compile at all.
… the IPC protocol

The dispatcher module doc explained the per-tag queues through head-of-line
blocking without saying that the finite credit window is what makes queue order
decide anything, which read as though a tag waits for its previous event to
finish. It now says that several events for one tag are commonly in flight
together and that round-robin only chooses which tag is offered a place next.

The WsOutbound message id comments now say when leaving the id empty is
reasonable and when it leaves an informed client told that a message was lost
and unable to say which.

The proto README gains the obligations an SDK takes on when it implements the
handler side, which a community SDK author previously had to infer from reading
the Rust implementation. Handler tag construction, the credit rule and version
negotiation are the parts most easily got wrong, so they are spelled out.
…li-sdk

The deploy engine client, its interface and the error simplification now live in
deploy-cli-sdk, shared with the other CLIs built on it. This package keeps only
the re-export seam, so no call site changed. The three local copies were stale
leftovers of a move that had already happened, and one of them was a stub
pointing at a hardcoded localhost endpoint.

The config provider moves to the SDK across the remaining command files,
finishing a migration that had been left half done and had the two provider
types meeting in the middle. The validate TUI moves with it, picking up the
newer engine interface where creating a validation returns a last event id that
the stream call needs so it does not replay what already happened.

Pins deploy-cli-sdk at v0.9.0, the first release carrying Provider.Set. The pre
command step needs Set rather than SetDefault because a default loses to the
blueprint flag's own default, which would leave the SDK commands reading a file
this step never wrote.
Packages an application into the artefacts a deploy target provisions from, and
writes a build manifest the Celerity transformer reads to produce concrete
resources such as Lambda function definitions. The manifest wire format lives in
its own dependency-free package so the CLI and the transformer share one source
of truth rather than each keeping a hand-copied struct that can silently drift.

Strategy, dependency installer, source compiler and handler dependency reader
are separate interfaces so a language or a deploy target can be added without
touching the others. Strategies are keyed by deploy target and the rest by
runtime prefix, matched longest first because Go map iteration is unordered and
a first match would pick a different registration from run to run.

Dependencies are layered rather than bundled per handler. A shared layer covers
every handler by default and a handler opts into its own only by declaring
handlerDependencies, which keeps the common case to one upload.
Reads and writes the configuration and secrets a deployed application resolves
at runtime. Each celerity/config resource in the blueprint maps to one store in
the cloud, and the deploy engine prefixes store names with the environment, so
the commands resolve a store the same way the running application does.

Provider selection is encapsulated behind a config store interface, so the
command layer never imports a cloud SDK directly and a new provider is added in
one place. AWS arrives first with Parameter Store for plaintext and Secrets
Manager for sensitive values.

An environment is a deploy config file rather than anything the CLI tracks of
its own, so adding one is adding a file. Discovery lists the base config as
default alongside any per environment file, which is what the interactive
picker offers.
Declarative schema management for celerity/sqlDatabase resources, built on Atlas
for inspection, diffing and migration planning. Schema YAML is the desired
state, migrations are the committed history, and the two are reconciled by
replaying the history into a scratch database and diffing the result.

Covers generating migrations from a schema change, applying them with a risk
gate so a destructive change needs an explicit opt in, detecting drift between
the declared schema and a live database, generating types for application code,
exporting an existing database into schema YAML, and evaluating the contracts a
data team depends on.

Reaching a database inside a VPC is the problem a deployed application has and
an operator's machine does not, so privileged SQL runs through a maintenance
runner deployed alongside the application rather than over a connection from
outside. The application also gets a database role of its own rather than
borrowing the instance's master credentials, which would hand every handler
superuser.

MySQL is implemented behind a flag and left off for v0, so Postgres is the only
engine the dialect resolver accepts.

Replaces ddl.go and migrations.go, whose hand-rolled DDL generation and
migration tracking the Atlas integration supersedes.
An os-only runtime identifier names a base operating system rather than a
language. The core runtime starts a pre-compiled handlers executable and streams
events to it over the IPC protocol, and nothing in that contract says what
compiled it, so the language cannot be read off the runtime string the way
nodejs24.x gives it away. It is resolved from the project instead.

Two toolchains ship. Go drives the celerity-go tool from the Celerity Go SDK,
which writes the platform imports for a deploy target and reports the handlers
the binary serves by building it and running it, so the handler list comes from
the same registry the dispatcher routes against. The second is driven entirely
by a handlerBuild block in the deploy config, which is how a community SDK for
any other compiled language is supported without CLI code of its own.

The toolchain package is a leaf because deployconfig already imports build and
handlerresolve, so a toolchain importing deploy config back would close a cycle.
The handlerBuild schema therefore lives with the toolchain and deploy config
embeds it.

A Lambda build takes a compiled path that skips dependency layers, source
copying and entry point generation, none of which apply to a binary. The
architecture is recorded on the manifest and checked against the built file,
because a mismatch is a valid archive the kernel refuses to exec and surfaces
only as exit status 126.

A dev session cross-compiles for the architecture the Docker daemon runs
containers at rather than the one the CLI was built for, since a remote context
or a Linux VM differs. The watcher takes its roots from the toolchain, because a
Go module keeps handlers at the module root where watching src would find
nothing, and it rebuilds before extracting, leaving the last working build
serving when a rebuild fails.

A manifest from a community extractor is validated before it is merged. The
merge skips what it does not recognise by design, so an unvalidated manifest
with the wrong annotation keys would merge cleanly and produce an application
with no handlers, surfacing much later as a runtime handshake failure.
Compose generation, log parsing and the stub service wiring behind celerity dev
run and celerity dev test. A stub service now says which config store its URL
belongs in, and an application with several stores is an error rather than a
guess, because picking one seeds the URL into a store the application never
reads and the only symptom is requests reaching the real endpoint.
go build with no -o writes the local events binary under the module basename,
so it lands next to the source rather than in a build directory and shows up
as untracked.

Design records, implementation plans and working notes move to a docs/internal
directory beside the project they describe, ignored by one rule that covers
every sub-project so a new one needs no change. The documentation that ships
lives in the Celerity docs site, so none of this belongs in version control,
and keeping it under a predictable name stops an add -A pulling it back in.
@fr3shw3b
fr3shw3b merged commit 2fd5d2c into main Oct 14, 2026
6 of 11 checks passed
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 260 files, which is 160 over the limit of 100.

To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ae086178-aac1-48b6-ad69-a05d606c6d51
📥 Commits

Reviewing files that changed from the base of the PR and between b80bf1f and 81548fe.

⛔ Files ignored due to path filters: 5
  • apps/cli/go.sum is excluded by !**/*.sum
  • apps/runtime/core/Cargo.lock is excluded by !**/*.lock
  • go.work is excluded by !**/*.work
  • go.work.sum is excluded by !**/*.sum
  • libs/runtime/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 260
  • .github/workflows/renovate.yml
  • .gitignore
  • RENOVATE.md
  • apps/cli/buildmanifest/manifest.go
  • apps/cli/cmd/commands/build.go
  • apps/cli/cmd/commands/config.go
  • apps/cli/cmd/commands/config_delete.go
  • apps/cli/cmd/commands/config_export.go
  • apps/cli/cmd/commands/config_get.go
  • apps/cli/cmd/commands/config_import.go
  • apps/cli/cmd/commands/config_list.go
  • apps/cli/cmd/commands/config_set.go
  • apps/cli/cmd/commands/dev.go
  • apps/cli/cmd/commands/dev_logs.go
  • apps/cli/cmd/commands/dev_run.go
  • apps/cli/cmd/commands/dev_status.go
  • apps/cli/cmd/commands/dev_stop.go
  • apps/cli/cmd/commands/dev_stubs.go
  • apps/cli/cmd/commands/dev_test_cmd.go
  • apps/cli/cmd/commands/init.go
  • apps/cli/cmd/commands/root.go
  • apps/cli/cmd/commands/schema.go
  • apps/cli/cmd/commands/schema_apply.go
  • apps/cli/cmd/commands/schema_apply_runner.go
  • apps/cli/cmd/commands/schema_codegen.go
  • apps/cli/cmd/commands/schema_devdb.go
  • apps/cli/cmd/commands/schema_diff.go
  • apps/cli/cmd/commands/schema_drift.go
  • apps/cli/cmd/commands/schema_export.go
  • apps/cli/cmd/commands/schema_hash.go
  • apps/cli/cmd/commands/schema_history.go
  • apps/cli/cmd/commands/schema_new.go
  • apps/cli/cmd/commands/schema_provision.go
  • apps/cli/cmd/commands/schema_provision_wait_test.go
  • apps/cli/cmd/commands/schema_show.go
  • apps/cli/cmd/commands/schema_validate.go
  • apps/cli/cmd/commands/validate.go
  • apps/cli/cmd/maintenance-runner/main.go
  • apps/cli/go.mod
  • apps/cli/internal/appconfig/aws.go
  • apps/cli/internal/appconfig/aws_parameter_store.go
  • apps/cli/internal/appconfig/aws_parameter_store_test.go
  • apps/cli/internal/appconfig/aws_secrets_manager.go
  • apps/cli/internal/appconfig/aws_secrets_manager_test.go
  • apps/cli/internal/appconfig/blueprint.go
  • apps/cli/internal/appconfig/blueprint_test.go
  • apps/cli/internal/appconfig/provider.go
  • apps/cli/internal/appconfig/store.go
  • apps/cli/internal/appconfig/testhelpers_test.go
  • apps/cli/internal/appconfig/types.go
  • apps/cli/internal/blueprint/helpers.go
  • apps/cli/internal/blueprint/sdk_version.go
  • apps/cli/internal/blueprint/toolchain_inputs.go
  • apps/cli/internal/blueprint/toolchain_inputs_test.go
  • apps/cli/internal/build/adapter_package.go
  • apps/cli/internal/build/adapter_package_test.go
  • apps/cli/internal/build/bundle_manifest_test.go
  • apps/cli/internal/build/compile_nodejs.go
  • apps/cli/internal/build/compile_nodejs_test.go
  • apps/cli/internal/build/defaults.go
  • apps/cli/internal/build/deps_nodejs.go
  • apps/cli/internal/build/deps_nodejs_test.go
  • apps/cli/internal/build/deps_python.go
  • apps/cli/internal/build/deps_python_test.go
  • apps/cli/internal/build/exec.go
  • apps/cli/internal/build/exec_test.go
  • apps/cli/internal/build/handler_deps.go
  • apps/cli/internal/build/handler_deps_test.go
  • apps/cli/internal/build/lambda.go
  • apps/cli/internal/build/lambda_bootstrap_nodejs.go
  • apps/cli/internal/build/lambda_bootstrap_nodejs_test.go
  • apps/cli/internal/build/lambda_bootstrap_python.go
  • apps/cli/internal/build/lambda_bootstrap_python_test.go
  • apps/cli/internal/build/lambda_compiled.go
  • apps/cli/internal/build/lambda_compiled_test.go
  • apps/cli/internal/build/lambda_layer_path_test.go
  • apps/cli/internal/build/lambda_maintenance_runner.go
  • apps/cli/internal/build/lambda_maintenance_runner_test.go
  • apps/cli/internal/build/lambda_test.go
  • apps/cli/internal/build/lambda_types.go
  • apps/cli/internal/build/manifest.go
  • apps/cli/internal/build/manifest_test.go
  • apps/cli/internal/build/node_pm.go
  • apps/cli/internal/build/registry.go
  • apps/cli/internal/build/registry_test.go
  • apps/cli/internal/build/reproducible_archive_test.go
  • apps/cli/internal/build/types.go
  • apps/cli/internal/build/upload.go
  • apps/cli/internal/build/upload_s3.go
  • apps/cli/internal/build/upload_s3_integration_test.go
  • apps/cli/internal/build/upload_s3_test.go
  • apps/cli/internal/build/upload_test.go
  • apps/cli/internal/compose/consts.go
  • apps/cli/internal/compose/generator.go
  • apps/cli/internal/compose/generator_test.go
  • apps/cli/internal/compose/tracing_test.go
  • apps/cli/internal/compose/types.go
  • apps/cli/internal/consts/consts.go
  • apps/cli/internal/consts/runtime_conventions.go
  • apps/cli/internal/consts/runtime_conventions_test.go
  • apps/cli/internal/dbconn/awscreds/awscreds.go
  • apps/cli/internal/dbconn/dbconn.go
  • apps/cli/internal/deployconfig/config_values.go
  • apps/cli/internal/deployconfig/config_values_test.go
  • apps/cli/internal/deployconfig/convert.go
  • apps/cli/internal/deployconfig/convert_test.go
  • apps/cli/internal/deployconfig/engine.go
  • apps/cli/internal/deployconfig/engine_test.go
  • apps/cli/internal/deployconfig/handler_build_test.go
  • apps/cli/internal/deployconfig/pre_command_step.go
  • apps/cli/internal/deployconfig/pre_command_step_test.go
  • apps/cli/internal/deploydb/aws.go
  • apps/cli/internal/deploydb/aws_test.go
  • apps/cli/internal/deploydb/resolve.go
  • apps/cli/internal/devconfig/deploy_config.go
  • apps/cli/internal/devconfig/environments.go
  • apps/cli/internal/devconfig/resolver.go
  • apps/cli/internal/devconfig/toolchain.go
  • apps/cli/internal/devconfig/toolchain_test.go
  • apps/cli/internal/devlogs/parser.go
  • apps/cli/internal/devlogs/parser_test.go
  • apps/cli/internal/devlogs/slog.go
  • apps/cli/internal/devlogs/slog_test.go
  • apps/cli/internal/devlogs/streamer_test.go
  • apps/cli/internal/devrun/orchestrator.go
  • apps/cli/internal/devrun/stubs.go
  • apps/cli/internal/devrun/stubs_test.go
  • apps/cli/internal/devrun/watcher.go
  • apps/cli/internal/devrun/watcher_compiled_test.go
  • apps/cli/internal/devrun/watcher_paths_test.go
  • apps/cli/internal/devstubs/types.go
  • apps/cli/internal/devtest/node_runner.go
  • apps/cli/internal/devtest/oshandler_runner.go
  • apps/cli/internal/devtest/oshandler_runner_test.go
  • apps/cli/internal/devtest/python_runner.go
  • apps/cli/internal/devtest/registry.go
  • apps/cli/internal/devtest/registry_test.go
  • apps/cli/internal/docker/architecture.go
  • apps/cli/internal/docker/architecture_test.go
  • apps/cli/internal/docker/client.go
  • apps/cli/internal/engine/client.go
  • apps/cli/internal/engine/engine.go
  • apps/cli/internal/engine/errors.go
  • apps/cli/internal/engine/interface.go
  • apps/cli/internal/handlerresolve/resolver.go
  • apps/cli/internal/handlerresolve/resolver_test.go
  • apps/cli/internal/handlerresolve/sdk_detect.go
  • apps/cli/internal/handlerresolve/sdk_detect_test.go
  • apps/cli/internal/handlerresolve/toolchain_test.go
  • apps/cli/internal/handlers/validate.go
  • apps/cli/internal/handlers/validate_test.go
  • apps/cli/internal/handlertoolchain/config.go
  • apps/cli/internal/handlertoolchain/custom.go
  • apps/cli/internal/handlertoolchain/custom_test.go
  • apps/cli/internal/handlertoolchain/exec.go
  • apps/cli/internal/handlertoolchain/files.go
  • apps/cli/internal/handlertoolchain/files_test.go
  • apps/cli/internal/handlertoolchain/golang.go
  • apps/cli/internal/handlertoolchain/golang_test.go
  • apps/cli/internal/handlertoolchain/gomod.go
  • apps/cli/internal/handlertoolchain/resolve.go
  • apps/cli/internal/handlertoolchain/resolve_test.go
  • apps/cli/internal/handlertoolchain/stub_runner_test.go
  • apps/cli/internal/handlertoolchain/toolchain.go
  • apps/cli/internal/maintenancerunner/awsrunner/awsrunner.go
  • apps/cli/internal/maintenancerunner/awsrunner/awsrunner_region_test.go
  • apps/cli/internal/maintenancerunner/awsrunner/awsrunner_test.go
  • apps/cli/internal/maintenancerunner/awsrunner/serve.go
  • apps/cli/internal/maintenancerunner/execute.go
  • apps/cli/internal/maintenancerunner/execute_test.go
  • apps/cli/internal/maintenancerunner/host.go
  • apps/cli/internal/maintenancerunner/host_test.go
  • apps/cli/internal/maintenancerunner/invoke.go
  • apps/cli/internal/maintenancerunner/protocol.go
  • apps/cli/internal/preprocess/consumer_collapse.go
  • apps/cli/internal/preprocess/consumer_collapse_test.go
  • apps/cli/internal/preprocess/extractor.go
  • apps/cli/internal/preprocess/extractor_test.go
  • apps/cli/internal/preprocess/merger.go
  • apps/cli/internal/preprocess/merger_resource_links.go
  • apps/cli/internal/preprocess/merger_resource_links_test.go
  • apps/cli/internal/preprocess/validate.go
  • apps/cli/internal/seed/config_keys_contract_test.go
  • apps/cli/internal/seed/config_seeder.go
  • apps/cli/internal/seed/dynamodb.go
  • apps/cli/internal/seed/handler_scope.go
  • apps/cli/internal/seed/handler_scope_test.go
  • apps/cli/internal/seed/hooks.go
  • apps/cli/internal/seed/loader.go
  • apps/cli/internal/seed/minio.go
  • apps/cli/internal/seed/resource_links.go
  • apps/cli/internal/sqlschema/applier.go
  • apps/cli/internal/sqlschema/applier_integration_test.go
  • apps/cli/internal/sqlschema/blueprint.go
  • apps/cli/internal/sqlschema/classify.go
  • apps/cli/internal/sqlschema/classify_test.go
  • apps/cli/internal/sqlschema/codegen.go
  • apps/cli/internal/sqlschema/codegen_test.go
  • apps/cli/internal/sqlschema/contracts.go
  • apps/cli/internal/sqlschema/contracts_test.go
  • apps/cli/internal/sqlschema/ddl.go
  • apps/cli/internal/sqlschema/ddl_test.go
  • apps/cli/internal/sqlschema/dialect.go
  • apps/cli/internal/sqlschema/dialect_mysql.go
  • apps/cli/internal/sqlschema/dialect_postgres.go
  • apps/cli/internal/sqlschema/dialect_test.go
  • apps/cli/internal/sqlschema/drift.go
  • apps/cli/internal/sqlschema/drift_integration_test.go
  • apps/cli/internal/sqlschema/drift_test.go
  • apps/cli/internal/sqlschema/exclude.go
  • apps/cli/internal/sqlschema/exclude_test.go
  • apps/cli/internal/sqlschema/export.go
  • apps/cli/internal/sqlschema/export_test.go
  • apps/cli/internal/sqlschema/inspect.go
  • apps/cli/internal/sqlschema/migrationdir.go
  • apps/cli/internal/sqlschema/migrationdir_integration_test.go
  • apps/cli/internal/sqlschema/migrationdir_test.go
  • apps/cli/internal/sqlschema/migrations.go
  • apps/cli/internal/sqlschema/migrations_test.go
  • apps/cli/internal/sqlschema/mysql_integration_test.go
  • apps/cli/internal/sqlschema/provision.go
  • apps/cli/internal/sqlschema/provision_integration_test.go
  • apps/cli/internal/sqlschema/provision_mysql.go
  • apps/cli/internal/sqlschema/provision_postgres.go
  • apps/cli/internal/sqlschema/provision_test.go
  • apps/cli/internal/sqlschema/realm.go
  • apps/cli/internal/sqlschema/realm_test.go
  • apps/cli/internal/sqlschema/revisions.go
  • apps/cli/internal/sqlschema/revisions_mysql.go
  • apps/cli/internal/sqlschema/types.go
  • apps/cli/internal/sqlschema/validate.go
  • apps/cli/internal/sqlschema/validate_test.go
  • apps/cli/internal/testutils/mock_deploy_engine.go
  • apps/cli/internal/tui/configui/commands.go
  • apps/cli/internal/tui/configui/env_select.go
  • apps/cli/internal/tui/configui/env_select_test.go
  • apps/cli/internal/tui/configui/key_table.go
  • apps/cli/internal/tui/configui/key_table_test.go
  • apps/cli/internal/tui/configui/list_model.go
  • apps/cli/internal/tui/configui/messages.go
  • apps/cli/internal/tui/configui/output.go
  • apps/cli/internal/tui/configui/output_test.go
  • apps/cli/internal/tui/configui/store_select.go
  • apps/cli/internal/tui/configui/store_select_test.go
  • apps/cli/internal/tui/configui/testdata/app.deploy.production.jsonc
  • apps/cli/internal/tui/configui/testdata/app.deploy.staging.jsonc
  • apps/cli/internal/tui/configui/testutil_test.go
  • apps/cli/internal/tui/configui/tui.go
  • apps/cli/internal/tui/shared/footer.go
  • apps/cli/internal/tui/validateui/commands.go
  • apps/cli/internal/tui/validateui/validate_model.go
  • apps/local-events/.gitignore
  • apps/runtime/core/Cargo.toml
  • libs/runtime/core/src/dispatcher.rs
  • libs/runtime/helpers/Cargo.toml
  • libs/runtime/helpers/tests/binary_frame_vectors.rs
  • libs/runtime/helpers/tests/fixtures/binary-frame-vectors.json
  • libs/runtime/proto/README.md
  • libs/runtime/proto/celerity/runtime/v1/runtime.proto
  • renovate.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fr3shw3b
fr3shw3b deleted the feat/cli-unification branch October 14, 2026 22:32
@sonarqubecloud

Copy link
Copy Markdown

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