feat(cli): add canyonos validate, backed by the contract checks in core - #180
Draft
userAugustos wants to merge 8 commits into
Draft
userAugustos wants to merge 8 commits into
userAugustos wants to merge 8 commits into
Conversation
…stants The Dockerfile templates and both copy lists spelled these out by hand, so anything reading them from outside the build was reading a copy that could drift. The templates and the lists are now generated from the constants.
validate_car runs the schema first and then the eight contracts the schema cannot see -- the class the controller loads by name, the method it calls without awaiting, the module the platform posts to -- against the same parsed model and the same runtime constants the deploy uses.
Reusing a deploy that is already up makes the run cheap, but it also means the run is no evidence that what is in the tree installs and imports. --rebuild always stands up its own deploy, so the command can answer that question.
The command runs core's checks and renders them: imported in process where canyonos_core is installed beside the CLI, otherwise the same module inside the core image over a read-only bind mount of the project. The CLI keeps no dependency on core either way.
…ot hold
A mistyped entrypoint, a mistyped workflow_file or a missing app/ validated
clean. The build treats each as a service to skip rather than a reason to stop,
so the deploy comes up green and short an agent. CAR-ENTRYPOINT-MISSING names
the manifest field and the path it resolved to.
The rest of the change is one round of review fixes, kept together because each
of them crosses both packages at once:
- a finding has no level and there is no --strict: every check reports a
violation, so the surface named something the checks never produced
- the container is given the .car itself rather than its parent, and --config
is resolved against the artifact root in both paths and refused when it
points outside it
- --json reports a failure as {"error": ..., "findings": []} rather than
console text
- a reply from the image is checked for the fields the renderer reads
- init's socket lookup is public as `active_docker_socket`, and says what its
None actually covers: a remote context, or a daemon that is not running
…ach missing file costs A `./agents/x.py` entrypoint, which the schema accepts, named the module `..agents.echo_agent`, so the workflow's correct import of it was reported as reaching past the stub. CAR-ENTRYPOINT-MISSING now carries the mechanism for the case it found -- an agent file, a workflow file, or the source root -- written as the contract the build needs rather than as the skip it performs today. The container's reply is checked by type, not only for the keys, and a `--json` run that never got to check anything prints the keys a run that did prints, with `errors` null beside the reason.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
userAugustos
marked this pull request as ready for review
September 22, 2026 19:41
userAugustos
marked this pull request as draft
September 22, 2026 22:52
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.
What was done
canyonos validatechecks a ported project with the platform's own rules, so the checks can no longer drift from the code.The skill directory,
canyonos build's call to the old validator and the docs are untouched here; the next PR removes the validator from the skill and points it atcanyonos validate/canyonos test.How to test it
Build a
.carfromexamples/helloworld(config/global_controller.yamland the agent YAMLs under.car/config/,agents/andworkflow/under.car/app/), then from the directory holding it:Make
ExampleAgent.helloanasync def:Mistype an entrypoint in the manifest:
Declare an argument
type: List[str]:Each exits 1. Also:
canyonos validate --json; with Docker and no local core install, the same command runs inside the core image;canyonos test --rebuilddeploys fresh even while a deploy is already running.