Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion scripts/nemoclaw-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,10 @@ PYOVERRIDE
# Ref: https://github.com/NVIDIA/NemoClaw/issues/3175

reconcile_agent_model_with_provider() {
# apply_model_override already won; reconciling against the gateway would
# overwrite the user's explicit choice with an inference/-prefixed variant.
[ -z "${NEMOCLAW_MODEL_OVERRIDE:-}" ] || return 0

Comment on lines +1068 to +1071

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for a test asserting reconciliation still runs when override is unset.
rg -n -B2 -A15 'reconcile_agent_model_with_provider|provider-model reconciliation' test/nemoclaw-start.test.ts

Repository: NVIDIA/NemoClaw

Length of output: 2303


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file='test/nemoclaw-start.test.ts'

echo '--- search: override + primary ---'
rg -n 'NEMOCLAW_MODEL_OVERRIDE|agents\.defaults\.model\.primary|reconcile_agent_model_with_provider|gateway|legacy-derived|provider-model' "$file" || true

echo
echo '--- around first reconcile stub ---'
sed -n '430,520p' "$file"

echo
echo '--- around second reconcile stub ---'
sed -n '3600,3685p' "$file"

Repository: NVIDIA/NemoClaw

Length of output: 19828


🏁 Script executed:

#!/bin/bash
set -euo pipefail
sed -n '1280,1385p' test/nemoclaw-start.test.ts

Repository: NVIDIA/NemoClaw

Length of output: 3748


Add coverage for the unset-override reconciliation path. The tests cover NEMOCLAW_MODEL_OVERRIDE preserving agents.defaults.model.primary, but not the no-override case where gateway/legacy reconciliation should still be able to replace it. Without that, a future change could disable reconciliation entirely without a failing test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/nemoclaw-start.sh` around lines 1068 - 1071, Add test coverage for
the no-override reconciliation path in `scripts/nemoclaw-start.sh`, specifically
around the `NEMOCLAW_MODEL_OVERRIDE` guard and the gateway/legacy model
reconciliation logic. Extend the existing tests that verify
`agents.defaults.model.primary` preservation so they also assert that when
`NEMOCLAW_MODEL_OVERRIDE` is unset, reconciliation can still replace the model
with the gateway-derived value. Make sure the new case targets the same flow
controlled by the override check so regressions in
`apply_model_override`/reconciliation are caught.

Source: Path instructions

if [ "$(id -u)" -ne 0 ]; then
return 0
fi
Expand Down Expand Up @@ -4464,7 +4468,9 @@ openclaw_runtime_guard_chain_complete() {

restore_openclaw_runtime_guard_chain() {
if ! openclaw_runtime_guard_chain_complete; then
echo "[gateway-recovery] WARNING: /tmp guard chain missing or unsafe - restoring library guards from packaged preloads (#2478/#2701)" >&2
local _guard_warn="[gateway-recovery] WARNING: /tmp guard chain missing or unsafe - restoring library guards from packaged preloads (#2478/#2701)"
echo "$_guard_warn" >&2
echo "$_guard_warn" >>"${_NEMOCLAW_GATEWAY_LOG:-/tmp/gateway.log}" 2>/dev/null || true
fi

# Preserve startup ordering: immutable core preloads first, then the
Expand Down