Implement WF18 container clone e2e test body for --clone-into workflow #11168

Closed
HAL9000 wants to merge 1 commits from fix/wf18-container-clone-e2e into master
+96 -4
View File
@@ -97,20 +97,112 @@ WF18 Container With Remote Repo Clone Trusted Profile
... --clone-into for remote repo clone, two-step project setup,
... plan-level execution environment with fallback priority, and
... full plan lifecycle including apply with container commit/push.
...
Outdated
Review

BLOCKING — Commit footer missing ISSUES CLOSED: #N

The single commit on this PR (dd3bb2ae) has no ISSUES CLOSED: or Refs: footer in its commit message. Per CONTRIBUTING.md:

Every commit footer must include ISSUES CLOSED: #N (or Refs: #N if not closing).

Please amend the commit (before any remote push to shared branches, or via a fixup commit) to include:

ISSUES CLOSED: #<issue_number>

Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

**BLOCKING — Commit footer missing `ISSUES CLOSED: #N`** The single commit on this PR (`dd3bb2ae`) has no `ISSUES CLOSED:` or `Refs:` footer in its commit message. Per CONTRIBUTING.md: > Every commit footer must include `ISSUES CLOSED: #N` (or `Refs: #N` if not closing). Please amend the commit (before any remote push to shared branches, or via a fixup commit) to include: ``` ISSUES CLOSED: #<issue_number> ``` --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
... Memory-conscious: uses minimal fixture data (~200 bytes) to avoid
... OOM kills in CI's docker-runners that share memory budgets
... across parallel pabot workers. The remote-clone repo is created
... inside the per-suite SUITE_HOME directory for isolation.
[Tags] tdd_issue tdd_issue_4188
[Timeout] 20 minutes
[Teardown] Log WF18 Container Clone test completed.
Skip If No LLM Keys
# ──────────────────────────────────────────────────
# Step 1 Create the temporary "remote" repository
# that will be cloned into the container.
# ──────────────────────────────────────────────────
${remote_repo}= Create Remote Clone Repo
Set Suite Variable ${REMOTE_REPO} ${remote_repo}
# Compute the repo URL for --clone-into. Locally we use file:// ; in CI
# a real HTTP(S) origin would be used instead.
${repo_url}= Set Variable file://${remote_repo}
Set Suite Variable ${CLONE_URL} ${repo_url}
# ──────────────────────────────────────────────────
# Step 2 Register a container-instance resource with --clone-into.
# The --clone-into metadata is stored in properties but actual
# git clone happens lazily when the container starts (devcontainer
... up). This validates that the CLI correctly accepts and persists
Outdated
Review

BLOCKING — Robot Framework syntax: ... after block comment

Lines 127–128 use ... continuation tokens directly after a # ── comment block:

  # ──────────────────────────────────────────────────
  # Step 2 – Register a container-instance resource with --clone-into.
  #          The --clone-into metadata is stored in properties but actual
  #          git clone happens lazily when the container starts (devcontainer
  ...          up). This validates that the CLI correctly accepts and persists
  ...          the --clone-into flag for container resource types.
  # ──────────────────────────────────────────────────

In Robot Framework, ... is a statement continuation marker, not a comment continuation. When it appears after a # comment line, it does NOT extend the comment — instead RF interprets it as a continuation of the last keyword call before the comment. This is a syntax error waiting to cause failures in stricter RF versions or linters.

Fix: Convert the multi-line comment block to use # on every line, removing ... from within comment sections:

  # ──────────────────────────────────────────────────
  # Step 2 – Register a container-instance resource with --clone-into.
  #          The --clone-into metadata is stored in properties but actual
  #          git clone happens lazily when the container starts
  #          (devcontainer up). This validates that the CLI correctly
  #          accepts and persists the --clone-into flag for container
  #          resource types.
  # ──────────────────────────────────────────────────

The same pattern must be fixed at lines 149–151, 162, 176–177, 200, and 202–203.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

**BLOCKING — Robot Framework syntax: `...` after block comment** Lines 127–128 use `...` continuation tokens directly after a `# ──` comment block: ``` # ────────────────────────────────────────────────── # Step 2 – Register a container-instance resource with --clone-into. # The --clone-into metadata is stored in properties but actual # git clone happens lazily when the container starts (devcontainer ... up). This validates that the CLI correctly accepts and persists ... the --clone-into flag for container resource types. # ────────────────────────────────────────────────── ``` In Robot Framework, `...` is a **statement continuation marker**, not a comment continuation. When it appears after a `#` comment line, it does NOT extend the comment — instead RF interprets it as a continuation of the last keyword call before the comment. This is a syntax error waiting to cause failures in stricter RF versions or linters. **Fix:** Convert the multi-line comment block to use `#` on every line, removing `...` from within comment sections: ``` # ────────────────────────────────────────────────── # Step 2 – Register a container-instance resource with --clone-into. # The --clone-into metadata is stored in properties but actual # git clone happens lazily when the container starts # (devcontainer up). This validates that the CLI correctly # accepts and persists the --clone-into flag for container # resource types. # ────────────────────────────────────────────────── ``` The same pattern must be fixed at lines 149–151, 162, 176–177, 200, and 202–203. --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
... the --clone-into flag for container resource types.
# ──────────────────────────────────────────────────
${resource_name}= Evaluate '${RESOURCE_PREFIX}-${RUN_SUFFIX}'
Set Suite Variable ${RESOURCE_NAME} ${resource_name}
${add_container}= Run CleverAgents Command
... resource add container-instance ${resource_name}
... --image python:3.12-slim
... --clone-into ${CLONE_URL}:/workspace/remote-project
Output Should Contain ${add_container} Added resource
# Verify the resource was recorded with clone metadata and image.
${show_resource}= Run CleverAgents Command
... resource show ${resource_name} --format json
Output Should Contain ${show_resource} clone_into
Output Should Contain ${show_resource} python:3.12-slim
# ──────────────────────────────────────────────────
# Step 3 Create and link the project (two-step pattern).
# This creates a workspace directory, registers it as a
... git-checkout resource, links the container resource to the
... project, and sets up plan-level execution environment with
... fallback priority.
# ──────────────────────────────────────────────────
${project_name}= Evaluate '${PROJECT_PREFIX}-${RUN_SUFFIX}'
Set Suite Variable ${PROJECT_NAME} ${project_name}
${create_project}= Run CleverAgents Command
... project create ${project_name} --path ${SUITE_HOME}${/}project-01
Output Should Contain ${create_project} Created project
# Link the container resource to the newly created project with
# execution-env-fallback priority so that tools routed through this
... resource fall back to the container for tool execution.
Run Keyword And Ignore Error Remove File ${SUITE_HOME}${/}project-01.yaml
Set Suite Variable ${WS_RESOURCE} ${resource_name}
${link_resource}= Link Resource To Project ${project_name}
# Verify project listing shows our newly created project.
${list_projects}= Run CleverAgents Command
... project list --format plain
Output Should Contain ${list_projects} ${PROJECT_PREFIX}
# ──────────────────────────────────────────────────
# Step 4 Create an action with the trusted automation profile.
# The trusted profile allows automatic execution of LLM
... tool invocations without user confirmation, which is required
... for fully automated container workflows.
# ──────────────────────────────────────────────────
${action_yaml}= Set Variable ${SUITE_HOME}${/}wf18-action.yaml
${action_config}= Catenate SEPARATOR=\n
... name: ${ACTION_NAME}
... description: Clone remote repository into container and validate content integrity
... strategy_actor: ${LLM_ACTOR}
... execution_actor: ${LLM_ACTOR}
... definition_of_done: >
... Remote repository is present inside the container at /workspace/remote-project/
... with all fixture files (src/deploy_manager.py, deploy/config.env, Dockerfile).
... automation_profile: trusted
... reusable: true
Create File ${action_yaml} ${action_config}\n
${create_action}= Run CleverAgents Command
... action create --config ${action_yaml}
Output Should Contain ${create_action} ${ACTION_NAME}
# ──────────────────────────────────────────────────
# Step 5 Use the created action to spawn a plan.
# The strategy phase generates an execution plan via LLM. We
... validate that plan creation succeeds with correct parameters.
# In real CI runners without Docker, container tool execution will
... be deferred — the main value here is validating resource -> project
... -> action -> plan wiring for clone-into workflows.
# ──────────────────────────────────────────────────
${use_action}= Run CleverAgents Command
... plan use --actor ${LLM_ACTOR} --path ${SUITE_HOME}${/}project-01
... action:${ACTION_NAME}\n goal: Clone the remote repository into the container at /workspace/remote-project.
Outdated
Review

BLOCKING — plan use command argument contains embedded \n (likely malformed)

  ${use_action}=    Run CleverAgents Command
  ...    plan use --actor ${LLM_ACTOR} --path ${SUITE_HOME}${/}project-01
  ...    action:${ACTION_NAME}\n    goal: Clone the remote repository into the container at /workspace/remote-project.

The \n goal: embedded mid-argument is suspect. Run CleverAgents Command passes arguments as a list to the CLI subprocess — it does not read from stdin. A literal newline character inside the argument string will either be passed as-is to the CLI argument list (which is almost certainly wrong) or cause a parse error.

Fix: If the plan use command takes an action name and goal as separate positional or flag arguments, split them properly:

  ${use_action}=    Run CleverAgents Command
  ...    plan use --actor ${LLM_ACTOR}
  ...    --path ${SUITE_HOME}${/}project-01
  ...    --action ${ACTION_NAME}
  ...    --goal Clone the remote repository into the container at /workspace/remote-project.

Check the plan use CLI help to confirm the exact syntax, then correct this call accordingly.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: pr-review-worker

**BLOCKING — `plan use` command argument contains embedded `\n` (likely malformed)** ```robot ${use_action}= Run CleverAgents Command ... plan use --actor ${LLM_ACTOR} --path ${SUITE_HOME}${/}project-01 ... action:${ACTION_NAME}\n goal: Clone the remote repository into the container at /workspace/remote-project. ``` The `\n goal:` embedded mid-argument is suspect. `Run CleverAgents Command` passes arguments as a list to the CLI subprocess — it does not read from stdin. A literal newline character inside the argument string will either be passed as-is to the CLI argument list (which is almost certainly wrong) or cause a parse error. **Fix:** If the `plan use` command takes an action name and goal as separate positional or flag arguments, split them properly: ```robot ${use_action}= Run CleverAgents Command ... plan use --actor ${LLM_ACTOR} ... --path ${SUITE_HOME}${/}project-01 ... --action ${ACTION_NAME} ... --goal Clone the remote repository into the container at /workspace/remote-project. ``` Check the `plan use` CLI help to confirm the exact syntax, then correct this call accordingly. --- Automated by CleverAgents Bot Supervisor: PR Review | Agent: pr-review-worker
Output Should Contain ${use_action} plan