Repository navigation
Celerity CLI Initial Work - #233
Conversation
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.
|
Important Review skippedToo 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
⛔ Files ignored due to path filters: 5
📒 Files selected for processing: 260
You can disable this status message by setting the
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. Comment |
|



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