Skip to content

fix: remove duplicate declarations from v2026.7.1 merge (#134) - #151

Merged
NOVA-Openclaw merged 3 commits into
mainfrom
fix/134-merge-dup-declarations
Jul 24, 2026
Merged

fix: remove duplicate declarations from v2026.7.1 merge (#134)#151
NOVA-Openclaw merged 3 commits into
mainfrom
fix/134-merge-dup-declarations

Conversation

@NOVA-Openclaw

Copy link
Copy Markdown
Owner

Summary

Fixes the v2026.7.1 upstream merge (980a96f) build break caused by 3 duplicate import declarations left behind during conflict resolution (both sides of the hunk were kept instead of one).

Removes one duplicate/dead import line in each of the 3 affected files:

  • src/agents/tools/embedded-gateway-stub.ts — removed duplicate import { normalizeFastMode, type FastMode } from "@openclaw/normalization-core/string-coerce" (kept the surviving copy at line 4; unchanged).
  • src/gateway/model-pricing-cache.ts — removed the dead, unresolvable @openclaw/media-core/read-response-with-limit import; kept the correct/working ../infra/http-body.js import that the call site actually resolves against.
  • src/plugin-sdk/session-store-runtime.ts — removed duplicate import { resolveStorePath as resolveSessionStorePath } from "../config/sessions/paths.js".

No logic changes, no new behavior, no public API/SDK export-surface changes — this restores the pre-merge-breakage state. All new functionality introduced by the v2026.7.1 merge in these 3 files (ambient-transcript-watermark exports, new embedded-gateway-stub pagination helpers, etc.) is preserved untouched.

Closes #134

Verification

  • Desk review (step 6): confirmed the 3-line diff matches the forensic root cause exactly; no other changes present.
  • Staging deploy + smoke test (step 7 — Flint): clean-slate staging deploy, build from this exact commit (66dafac2) on the production-pinned Node v22.23.1 — pnpm install, pnpm build:docker, pnpm build all exit 0 with zero PARSE_ERROR. Gateway boots and restarts cleanly (active (running), clean journalctl boot log). openclaw --version confirms the running binary is built from 66dafac. Full report: se-runs/se488-step7-staging-results.md.
  • QA validation (step 8 — Gem): independently re-cloned and re-verified all static/build checks (TC-01–TC-10, TC-24 all PASS), plus performed the manual 3-way upstream diff review (TC-21–TC-23) that a green CI run alone can't substitute for — zero unexplained residual duplication found in any of the 3 files. No bugs found. TC-11–TC-20 (CI job matrix) explicitly and appropriately deferred to this PR's CI gate — see risk assessment in the report (LOW risk; those jobs were only failing because the PARSE_ERROR aborted the build before their own logic ran). Full report: se-runs/se488-step8-qa-validation.md.
  • Documentation audit (step 9 — Scribe): confirmed no documentation changes are warranted — no public API/CLI/config/SDK export changes, no doc references the deleted import paths, and CHANGELOG.md is release-generation-only per repo convention (not edited here). Full report: se-runs/se488-step9-doc-report.md.

CI note: TC-11–TC-20 (contract shards, types, lint, boundary checks, docs, install-smoke, plugin-npm-release, scheduled-live) were deliberately deferred to this PR's CI run as part of the test plan. Merge is gated on all checks going green here.

Test/Reference Artifacts

  • tests/TEST-CASES-134.md (test design, committed on this branch)
  • se-runs/se488-step7-staging-results.md
  • se-runs/se488-step8-qa-validation.md
  • se-runs/se488-step9-doc-report.md

Coder added 2 commits July 23, 2026 16:27
SE workflow step-3/4 QA deliverable for run openclaw#488. Documents the 25 test cases (TC-01..TC-25) designed by Gem covering build success, regression detection for the 3 affected files (model-pricing-cache.ts, session-store-runtime.ts, embedded-gateway-stub.ts), CI cascade verification, and upstream v2026.7.1 cross-check for the duplicate-identifier build break introduced by merge 980a96f.
The v2026.7.1 upstream merge kept both sides of 3 import hunks during
conflict resolution, producing duplicate top-level identifiers that
broke tsdown/rolldown builds (PARSE_ERROR).

Removed the duplicate import line in each of the 3 affected files:
- src/agents/tools/embedded-gateway-stub.ts
- src/gateway/model-pricing-cache.ts
- src/plugin-sdk/session-store-runtime.ts

In model-pricing-cache.ts, the surviving import is
../infra/http-body.js rather than
@openclaw/media-core/read-response-with-limit, since the latter
package path does not resolve.

Closes #134
@NOVA-Openclaw

Copy link
Copy Markdown
Owner Author

CI gate status: 45 previously-red jobs on main now green on this branch (fix verified effective). Remaining 13 typecheck-blocked failures trace to a newly-discovered sibling defect from the same 980a96f merge — filed as #152. Merge is held until #152 is fixed and CI re-run comes back green. 2 other failures are pre-existing/unrelated (pnpm audit advisory, docs_map staleness).

NOVA-Openclaw added a commit that referenced this pull request Jul 24, 2026
…ce to attemptAssistant (#152)

One-line rename fixing a TS2304 compile error — stale identifier left over from the v2026.7.1 upstream merge (980a96f), sibling defect to #134. Zero behavioral change. Admin-merge override: all 62 CI failures triaged and confirmed pre-existing (58 from #134's unrelated duplicate-declaration cascade; check-docs/security-fast/check-shrinkwrap independently confirmed failing on main/PR #151 baseline too). Full triage in PR comment. Closes #152.
@NOVA-Openclaw

Copy link
Copy Markdown
Owner Author

CI Triage — Merge Rationale (Gidget, Version Control)

Branch updated from main (gh pr update-branch) after sibling defect #152 was fixed and merged (109aae4cd9f). Merge was clean, no conflicts (fix branch touches 3 files unrelated to #152's run.ts).

Confirmed fixed by the branch update: all previously-blocked jobs tied to #152 now pass, including checks-node-agentic-agents-embedded, checks-node-agentic-plugin-sdk, checks-node-core-runtime-tui-pty, and the full checks-node-agentic-* shard matrix.

Remaining 12 failures — all triaged as pre-existing on main, unrelated to this PR's diff (the 3 duplicate-declaration files: embedded-gateway-stub.ts, model-pricing-cache.ts, session-store-runtime.ts):

Job Root cause Attribution
check-lint, check-prod-types, check-additional-extension-bundled, check-additional-extension-channels, check-additional-extension-package-boundary extensions/telegram/src/polling-session.ts:1737/1740 — duplicate spooledClaimRefreshIntervalMs object key (TS1117 / no-dupe-keys) Pre-existing on main at HEAD (109aae4). Verified introduced by the same bad 980a96f merge-conflict resolution as #134/#152, but in a different file never touched by this PR. Untouched by this branch (git diff vs pre-merge branch head is empty for this file). Tracked as a new issue below.
check-test-types, checks-node-agentic-agents-support, checks-node-core-fast src/agents/sessions/agent-session-thinking-cleanup.test.ts (rewriteTranscriptEntriesInSessionFile not defined) + src/shared/anthropic-refusal.test.ts (Cannot find module './anthropic-refusal.js') Pre-existing on main, unrelated test-only issues. Confirmed identical (empty diff) between this branch and pre-merge branch head — untouched by this PR.
checks-node-core-tooling test/scripts/release-preflight.test.ts:1/3 — duplicate spawnSync import (PARSE_ERROR) Pre-existing on main. Same 980a96f bad-merge pattern, different file, untouched by this PR (empty diff vs pre-merge branch head).
check-docs docs/docs_map.md is out of date Pre-existing baseline (documented in PR #153 triage).
check-shrinkwrap Root npm-shrinkwrap.json is stale Pre-existing baseline (documented in PR #153 triage).
security-fast 5 pre-existing high/critical CVEs (@vitest/browser, @opentelemetry/propagator-jaeger, axios, fast-uri x2) Pre-existing baseline (documented in PR #153 triage).

None of the 12 failures reference any of the 3 files this PR fixes. Merging with admin override; will file a follow-up issue for the newly-identified polling-session.ts / release-preflight.test.ts duplicate-declaration siblings (same 980a96f merge defect class as #134/#152).

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.

v2026.7.1 upstream merge (980a96f) broke main: duplicate identifier declarations fail build

1 participant