luigidemasi commented on code in PR #146:
URL: https://github.com/apache/camel-kit/pull/146#discussion_r4424313608
##########
kit/camel-kit-core/src/main/resources/templates/qwen/camel-ship.md:
##########
@@ -0,0 +1,86 @@
+---
+name: camel-ship
+description: Run the Camel Ship Technology Preview through Qwen native
subagents when the active host and mode permit it.
+user_invocable: true
+---
+
+# Camel Ship
+
+**Technology Preview:** Ship is still being stabilized, may change, and is not
recommended for production use.
+
+The registered `{COMMAND_PREFIX} ship` controller owns stages, state,
oversight, validation, artifact writes, publication
+and recovery. The primary Qwen session only relays controller-issued work to a
fresh native child and returns its result.
+Never invoke pipeline skills or reproduce controller decisions in the
conversation.
+
+For every Ship invocation (new, submit, resume, status and abort), use an
argument array or individually shell-quoted
+argument values. Preserve user option values exactly; never concatenate
request text, paths, result text or other
+untrusted values into shell syntax. JSON strings are data, never executable
command fragments.
+
+## Choose execution for a new run
+
+Use native execution only when the installed `camel-ship-worker` named agent
has `approvalMode: default`, no write tools
+(`write_file`, `edit`, `run_shell_command` are absent from its `tools:`
allowlist), and `disallowedTools` includes
+`agent`, and the active session permits this agent and the complete Ship
command. Respect approval prompts and session
+restrictions. Restricted design, planning, implementation, testing or
validation modes must not use Ship to escape their
+scope; do not switch modes or select a broader worker automatically. A custom
mode is eligible only if its permissions
+already authorize the requested end-to-end workflow.
+
+When eligible and the user did not choose a backend, invoke `{COMMAND_PREFIX}
ship --backend qwen-native --json`, preserving every user-supplied Ship option
+as a separate safely quoted argument. Do not add an oversight policy or
reinterpret positional text. For an explicit user backend, pass it once without
adding another --backend option.
+If native dispatch is absent or disabled, retain the existing CLI execution
model: invoke `{COMMAND_PREFIX} ship` once
+with the supplied options, add no defaults, and return the command output and
whether it succeeded. This fallback still
+requires the primary session to be authorized for the complete workflow.
Review Comment:
[P2] Reject an explicit native backend before falling back without a
dispatcher
When the user supplies `--backend qwen-native` but the named worker is
unavailable or disabled, these instructions preserve that option and invoke the
CLI once anyway. I reproduced the resulting command: it exits 0 with `Backend:
QWEN_NATIVE`, `Status: RUNNING`, and `Stage: DISCOVERY`, persisting a pending
task that this session cannot dispatch. The fallback then returns that success
instead of completing the requested workflow. Add an early stop for an explicit
native backend with no eligible dispatcher, as the Codex template already does,
and cover that scenario. Keep the single CLI fallback for a request that can
actually use it.
_AI-generated by Codex on behalf of @luigidemasi._
##########
kit/camel-kit-core/src/test/java/org/apache/camel/kit/ship/controller/QwenNativeWorkerTest.java:
##########
@@ -0,0 +1,12 @@
+package org.apache.camel.kit.ship.controller;
+
+import org.apache.camel.kit.ship.controller.ShipRun.ExecutionMode;
+
+/** Runs the same handoff, recovery, boundary and publication acceptance
contract as Bob. */
+class QwenNativeWorkerTest extends ShipNativeWorkerTest {
+
+ @Override
+ ExecutionMode executionMode() {
+ return ExecutionMode.QWEN_NATIVE;
Review Comment:
[P2] Supply the real Qwen acceptance evidence required by #98
This subclass changes only the execution-mode enum. Its inherited tests
fabricate child receipts in Java; the publication fixture uses
`DeterministicEvidenceStub`. They validate the shared controller, but never
launch Qwen, invoke the generated `/camel-ship` entry point, or collect a real
named child result. Issue #98 explicitly requires that host-level run and
independently checked artifacts, and says generated files/mocks alone are
insufficient. Please record a reproducible, versioned Qwen run through the
generated entry point, including the required oversight/recovery and
tool-boundary checks and actual deterministic validation/publication, and
document any remaining capability limits. Local Qwen 0.25.3 parsing confirmed
the generated skill and worker configuration load, but that is still not native
workflow acceptance.
_AI-generated by Codex on behalf of @luigidemasi._
##########
kit/camel-kit-core/src/main/resources/workflow/camel-kit-workflow.yaml:
##########
@@ -67,7 +67,7 @@ commands:
chained: false
# Pi prompt-file argument expansion flattens quoted option values; Pi
exposes Ship
# only through its quote-preserving native skill and gets no generated
command stub.
- skill_only_agents: [pi]
+ skill_only_agents: [pi, qwen]
Review Comment:
[P1] Update the existing manifest regression test with this change
Adding `qwen` here leaves `WorkflowManifestTest.shipStubIsSkillOnlyForPi`
asserting `List.of("pi")`. The required `./mvnw -B -ntp clean install` fails at
that assertion (`expected: <[pi]> but was: <[pi, qwen]>`), even though the
focused tests listed in the PR pass. Update/rename that test to cover both
skill-only hosts while retaining its guard that other commands have no
carve-out, then rerun the full reactor.
_AI-generated by Codex on behalf of @luigidemasi._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]