-
Notifications
You must be signed in to change notification settings - Fork 0
feat(skill): record the workflow's test input in .car/config #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,15 +3,17 @@ | |
| **When:** after selecting service boundaries, before writing an adapter or | ||
| workflow. | ||
|
|
||
| **Output:** one loadable adapter per service and one workflow exposing | ||
| `main(query: str)`. | ||
| **Output:** one loadable adapter per service, one workflow exposing | ||
| `main(query: str)`, and `.car/config/test_query.txt` holding one input that | ||
| workflow accepts. | ||
|
|
||
| Use this order: | ||
|
|
||
| 1. Choose a safe entrypoint module for each service. | ||
| 2. Write a no-argument synchronous adapter around source-owned behavior. | ||
| 3. Bridge async or session state only when the source requires it. | ||
| 4. Write the workflow and preserve parallel dispatch. | ||
| 5. Write the workflow's test input. | ||
|
|
||
| Complete `manifest.md`, then validate only the authored contracts that CanyonOS | ||
| does not already guarantee. | ||
|
|
@@ -22,6 +24,7 @@ only when a container loads. | |
| ## Contents | ||
|
|
||
| - Adapter and workflow shape | ||
| - Workflow input and its test case | ||
| - Choosing the entrypoint | ||
| - Bridging async | ||
| - Multi-turn and session state | ||
|
|
@@ -55,6 +58,20 @@ results = [json.loads(future.value()) for future in futures] | |
|
|
||
| Combining dispatch and `.value()` in one comprehension serializes the work. | ||
|
|
||
| ## Workflow input and its test case | ||
|
|
||
| `query` is always a `str`. Parse richer input out of it inside `main` | ||
| (`int(query)`, `json.loads(query)`). Future arguments and `.value()` results | ||
| are also text; the yaml `type` does not coerce them. | ||
|
|
||
| Write one eligible input to `.car/config/test_query.txt`: the required input | ||
| only, taken from the source, with no comments, quotes, or `{"query": ...}` | ||
| wrapper. End-to-end testing sends it verbatim: | ||
|
|
||
| ```bash | ||
| canyonos test "$(cat .car/config/test_query.txt)" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Preserve trailing newlines in the test input. Bash command substitution removes all trailing newline characters before passing the argument to 🤖 Prompt for AI Agents |
||
| ``` | ||
|
|
||
| ## Choosing the entrypoint | ||
|
|
||
| The entrypoint is the one module in the copy the build destroys: each agent's | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -178,7 +178,7 @@ def check_requirements_coverage( | |||||
| f"something other than `{name}`, declare that name in " | ||||||
| f"{report.rel(config_path)}." | ||||||
| ) | ||||||
| report.error( | ||||||
| report.warn( | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
# Inspect report consumers and validation/deployment gates.
rg -n -C 5 --glob '*.py' \
'ValidationReport|report\.(warn|error)\(|\.(warnings|errors)\b|\b(WARN|ERROR)\b|severity' .Repository: CanyonCodeCoreAI/canyonos Length of output: 29986 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- changed file ---'
cat -n .claude/skills/porting-to-canyonos/validation/dependencies.py | sed -n '1,240p'
printf '%s\n' '--- hidden-scope definitions and consumers ---'
rg -n -C 6 --hidden --glob '*.py' \
'class ValidationReport|ValidationReport|def (warn|error)|report\.(warn|error)\(|warnings|errors|severity|is_valid|valid|blocking|gate' \
.claude .github packages 2>/dev/null | sed -n '1,1000p'
printf '%s\n' '--- changed paths and diff ---'
git diff --stat a6664ab3517cc3d366e654d113205884b0cabda6 a4863554c88f18e02e834b3ff8053dd08c962d07 -- .claude/skills/porting-to-canyonos
git diff --unified=30 a6664ab3517cc3d366e654d113205884b0cabda6 a4863554c88f18e02e834b3ff8053dd08c962d07 -- .claude/skills/porting-to-canyonos/validation/dependencies.pyRepository: CanyonCodeCoreAI/canyonos Length of output: 41368 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- changed file ---'
cat -n .claude/skills/porting-to-canyonos/validation/dependencies.py | sed -n '1,240p'
printf '%s\n' '--- hidden-scope definitions and consumers ---'
rg -n -C 6 --hidden --glob '*.py' 'class ValidationReport|ValidationReport|def (warn|error)|report\.(warn|error)\(|warnings|errors|severity|is_valid|valid|blocking|gate' .claude .github packages 2>/dev/null | sed -n '1,1200p'
printf '%s\n' '--- changed paths and diff ---'
git diff --stat a6664ab3517cc3d366e654d113205884b0cabda6 a4863554c88f18e02e834b3ff8053dd08c962d07 -- .claude/skills/porting-to-canyonos
git diff --unified=30 a6664ab3517cc3d366e654d113205884b0cabda6 a4863554c88f18e02e834b3ff8053dd08c962d07 -- .claude/skills/porting-to-canyonos/validation/dependencies.pyRepository: CanyonCodeCoreAI/canyonos Length of output: 41533 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- validator exit and report implementation ---'
sed -n '1,25p' .claude/skills/porting-to-canyonos/validate.py
sed -n '280,360p' .claude/skills/porting-to-canyonos/validate.py
cat -n .claude/skills/porting-to-canyonos/validation/core.py | sed -n '1,220p'
printf '%s\n' '--- validator invocations and strict-mode guidance ---'
rg -n -C 5 --hidden --glob '!*.pyc' \
'validate\.py|--strict|canyonos deploy|validation gate|validation' \
.claude .github README.md packages 2>/dev/null | sed -n '1,1000p'Repository: CanyonCodeCoreAI/canyonos Length of output: 41552 Keep unresolved-import W006 findings blocking.
🐛 Suggested fix- report.warn(
+ report.error(📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| "W006", | ||||||
| where, | ||||||
| lineno, | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: CanyonCodeCoreAI/canyonos
Length of output: 15939
🏁 Script executed:
Repository: CanyonCodeCoreAI/canyonos
Length of output: 42058
🏁 Script executed:
Repository: CanyonCodeCoreAI/canyonos
Length of output: 42010
🏁 Script executed:
Repository: CanyonCodeCoreAI/canyonos
Length of output: 16633
🏁 Script executed:
Repository: CanyonCodeCoreAI/canyonos
Length of output: 376
Correct the Future type statement.
Futurearguments are not always text. The runtime preserves JSON-compatible argument types and sends them unchanged. The runtime stores.value()results as text. The YAMLtypefield supplies an annotation only; it does not coerce values.Suggested documentation fix
📝 Committable suggestion
🤖 Prompt for AI Agents