Skip to content

fix(embedded-agent-runner): rename stale assistantForFailover reference to attemptAssistant (#152) - #153

Merged
NOVA-Openclaw merged 2 commits into
mainfrom
fix/152-stale-assistantforfailover
Jul 24, 2026
Merged

fix(embedded-agent-runner): rename stale assistantForFailover reference to attemptAssistant (#152)#153
NOVA-Openclaw merged 2 commits into
mainfrom
fix/152-stale-assistantforfailover

Conversation

@NOVA-Openclaw

Copy link
Copy Markdown
Owner

Summary

Fixes #152 — a one-line stale-identifier rename in src/agents/embedded-agent-runner/run.ts.

resolveFinalAssistantVisibleText(assistantForFailover) referenced an identifier (assistantForFailover) that does not exist anywhere in the file — a TS2304 compile error. Root cause: merge-conflict-resolution artifact from the upstream v2026.7.1 merge (980a96f653), where the correct binding attemptAssistant was dropped in favor of a name that was never declared.

Fix: rename the stale reference back to the correct, already-in-scope binding:

-          const assistantVisibleText = resolveFinalAssistantVisibleText(assistantForFailover);
+          const assistantVisibleText = resolveFinalAssistantVisibleText(attemptAssistant);

attemptAssistant is declared at line 2479 (unchanged by this diff) and already has 26+ legitimate usages elsewhere in the file, including an identical call-site pattern at line 3695/3696. This is a pure rename with zero behavioral change — no logic, types, or control flow are altered.

Relationship to #134

This is a sibling defect to #134 (same 980a96f653 upstream merge, different failure mode — #134 is duplicate identifier declarations across 3 files; this is a missing/dropped identifier in a 4th file never enumerated in #134's scope). Both are pre-existing breakage on main, not introduced by this PR or by #151.

Known CI impact: 13 CI jobs on PR #151 (the #134 fix) are currently blocked from reaching green because they fail typecheck on this file before ever exercising the #134-fixed code. This PR is independent of #151 and does not touch any of the files #134/#151 addresses.

Expected CI behavior on this PR: Since #134 remains unmerged on main, this PR's CI is expected to show the same pre-existing #134-attributable failures (3 files, PARSE_ERROR/duplicate-declaration class, zero overlap with run.ts). Those failures are not attributable to this diff and are not a merge blocker. Any failure that does reference run.ts or assistantForFailover/attemptAssistant would be #152-attributable and would block merge — see CI triage in the tracking doc.

Test / Staging / QA Evidence

  • Test design: tests/TEST-CASES-152.md (31 test cases, added in this branch)
  • Staging execution: PASS — see se-runs/se489-step7-staging-results.md
  • QA validation: VALIDATED-WITH-RISKS, zero FAILs across all 31 TCs (13 direct/strong-indirect PASS, 5 inferred-PASS via diff-purity, 10 intentionally deferred to this PR's CI gate per design, 3 low-risk design-time-only, 3 N/A process statements) — see se-runs/se489-step8-qa-validation.md
  • Doc audit: no documentation impact — see se-runs/se489-step9-doc-audit.md
  • Independent verification (QA, fresh checkout): diff is exactly 1 line / 1 file (code), zero remaining references to assistantForFailover anywhere in the tracked tree outside the test-design doc itself, fixed line confirmed at run.ts:3543.

QA flag for merge gate: TC-24 (checks-node-agentic-agents-embedded — the CI shard most directly covering the changed directory) was the one deferred test case without a strong local proxy. Per QA's explicit recommendation, this PR's merge will include an explicit log-level check of that job (not just trusting an aggregate green/red status) before merge, with the result recorded in a PR comment.

Scope

Closes #152

Gidget and others added 2 commits July 24, 2026 00:18
…rom merge 980a96f)

Adds the approved QA test-case document covering the TS2304 compile
error at src/agents/embedded-agent-runner/run.ts:3543, where a stale
reference to 'assistantForFailover' was left behind by merge 980a96f.
This is a sibling defect of #134 (see fix/134-merge-dup-declarations).

Test cases only in this commit; the one-line source fix lands separately.

Ref #152
…ce to attemptAssistant

The v2026.7.1 merge (980a96f) renamed the failover assistant binding from
assistantForFailover to attemptAssistant throughout the function, but left one
usage at line 3543 referencing the old name. This change makes that call site
consistent with the surrounding code and the sibling call at line 3695.

Refs #152
@NOVA-Openclaw

Copy link
Copy Markdown
Owner Author

CI Triage — All 62 failures pre-existing, none attributable to this diff

Ran the full CI matrix on this PR. Result: 45 pass, 62 fail, 10 skipping. Every failure was individually triaged. None reference run.ts, assistantForFailover, or attemptAssistant.

Attribution summary

Failure class Jobs affected Root cause Attribution
Duplicate-declaration PARSE_ERROR/TS2300 cascade (3 files: embedded-gateway-stub.ts, model-pricing-cache.ts, session-store-runtime.ts) ~58 jobs (check-prod-types, check-lint, check-test-types, build-artifacts, most checks-node-* shards, check-additional-boundaries-a, check-additional-extension-*, etc.) #134 — unmerged v2026.7.1 upstream-merge duplicate declarations. Confirmed byte-for-byte identical error signature to #134's tracked defect. Pre-existing (#134), not #152
check-docs 1 job docs/docs_map.md is out of date — unrelated docs-map generation drift, no connection to source code changes in this PR Pre-existing, unrelated to #134 or #152
checks-fast-contracts-channels-a / -b 2 jobs Load-time failure inside extensions/imessage/* module chain via jiti eval — unrelated subsystem, no reference to run.ts anywhere in the trace Pre-existing, unrelated to #134 or #152
security-fast 1 job pnpm audit --audit-level=high — 5 pre-existing high/critical dependency CVEs (@vitest/browser, @opentelemetry/propagator-jaeger, axios, fast-uri x2) Pre-existing, unrelated to #134 or #152
check-shrinkwrap 1 job Root npm-shrinkwrap.json is stale — pre-existing lockfile drift Pre-existing, unrelated to #134 or #152

Cross-check: same baseline failures reproduce on PR #151 (the #134 fix, unrelated to this diff)

To confirm check-docs, security-fast, and check-shrinkwrap are baseline main issues and not something introduced by this branch, I checked PR #151's current CI status (that PR only touches the #134 files, never run.ts):

This confirms these three failure classes are baseline breakage on main/pre-existing across both fix branches, not introduced by either #134's or #152's diff.

TC-24 explicit log check (checks-node-agentic-agents-embedded)

Per QA's Step 8 flag, I did not rely on the aggregate red/green status for this shard — pulled the actual job log directly:

  • attempt.session-lock.test.ts111 tests, all passed (this file loaded and ran cleanly).
  • attempt.test.ts and attempt.spawn-workspace.context-engine.test.tsfailed to load (0 tests collected), root cause: [PARSE_ERROR] Identifier 'normalizeFastMode' has already been declared at src/agents/tools/embedded-gateway-stub.ts:1:10/7:10 (and FastMode at 1:34/7:34) — this is the exact, already-tracked v2026.7.1 upstream merge (980a96f) broke main: duplicate identifier declarations fail build #134 defect (duplicate import in that file), not anything related to assistantForFailover/attemptAssistant/run.ts.
  • Zero references to run.ts, assistantForFailover, or attemptAssistant anywhere in this job's log.

Verdict: no #152-attributable behavioral test failures in this shard. The failure is purely a load-time cascade from #134's unrelated duplicate-declaration bug in a completely different file.

Merge decision

Per the task brief, none of the 62 failures are attributable to this diff (the 1-line rename in run.ts). All are either the known #134 cascade or independently-confirmed pre-existing baseline breakage (also present on main/PR #151). Proceeding with admin-override squash-merge, documenting this rationale per policy.

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.

TS2304: Cannot find name 'assistantForFailover' in embedded-agent-runner/run.ts — 4th file broken by v2026.7.1 merge (980a96f)

1 participant