Repository navigation
Conversation
Adds an `examples` smoke group + GitHub Actions workflow that executes every
published recipe (examples/*.sh, *.py, ci/run.sh) against a freshly built
binary. Provider HTTP is stubbed by scripts/lib/fake-curl — a python3 `curl`
shim placed earlier on PATH — which plans tool calls from the recipe prompt
(read/write/edit + goal-mode <GOAL_MET>), so the real agent loop, tools,
sessions, and goal mode run with no API key and no network.
Two latent recipe bugs surfaced by the first end-to-end run are fixed:
- 03-provider-switching.sh concatenated provider names when several API keys
were set ("openaixiaomideepseek" -> exit 80); now picks the first
configured provider.
- 01-file-editing.sh piped NDJSON into `jq '.content | fromjson'`, which
errors on stream-chunk lines where .content is null; now selects the
"done" envelope first (same fix applied to the content() helper).
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 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 |
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.
Summary
Adds a CI job that runs the entire
examples/cookbook end-to-end on every push and PR, so published recipes are verified against every build — no API key or network required..github/workflows/examples.yml— new workflow: checkout →mlugg/setup-zig@v2(0.16.0, matching the pinned toolchain) →zig build→scripts/smoke.sh --group=examples.scripts/lib/fake-curl— a python3curlshim. tau shells out tocurlfor all provider HTTP (src/llm/provider.zig), so placing this earlier onPATHstubs only the network leg while the real binary, agent loop, tools, sessions, and goal mode execute. It plans tool calls from the recipe prompt (verb →/abs/pathpairs forread/write/edit), serves both streaming SSE and--no-streamJSON shapes, and emits<GOAL_MET>on its own line in goal mode so/goalrecipes terminate.scripts/smoke.sh— newexamplesgroup in the offline suite. It symlinks the stub ascurl, runs everyexamples/[0-9]*.shandexamples/*.pyunder a tempHOMEwith throwaway provider keys, and also exercisesexamples/ci/run.shwhen present (lands automatically once docs: examples/ cookbook — NDJSON stream consumer + non-interactive CI pattern #149 merges). Includes per-recipe output pins (write verification, session persistence, provider exercise).Recipe bugs this caught and fixed
The first real end-to-end run surfaced two latent bugs in the published examples:
03-provider-switching.sh— with several provider keys set,PROV="${OPENAI_API_KEY:+openai}${XIAOMI_API_KEY:+xiaomi}..."concatenated into an invalid provider name (openaixiaomideepseek) → exit 80. Now picks the first configured provider.01-file-editing.sh—jq '.content | fromjson'on streamed NDJSON errors on chunk lines (.contentisnull) underset -euo pipefail. Now selects thedoneenvelope first; same fix applied to thecontent()helper.Verification
Verified real behavior under the stub: example 02's
/goalrun performs actualwrite+readtool calls, produces the JSON-array file, and ends with"status":"complete"in/goal status; example 01'seditstep performs a real in-place replacement.Docs:
examples/README.mdgains a "CI verification" section;CHANGELOG.mdupdated.Closes #172 (mago task #172)