Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed May 29, 2026, 12:55 PM ET / 16:55 UTC. Summary PR surface: Source +14, Tests +90. Total +104 across 8 files. Reproducibility: yes. for a source-level reproduction: current main resolves the channel target and then unconditionally strips the selected provider prefix from the resolved target. I did not run a live BNCR transport repro in this read-only pass. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the provenance-based fix after current-head checks finish, preserving plugin and directory canonical targets while keeping generic normalized fallback prefix stripping. Do we have a high-confidence way to reproduce the issue? Yes for a source-level reproduction: current main resolves the channel target and then unconditionally strips the selected provider prefix from the resolved target. I did not run a live BNCR transport repro in this read-only pass. Is this the best way to solve the issue? Yes. The PR uses a narrow internal provenance field so core strips only generic normalized fallback targets and preserves plugin or directory canonical results, matching the plugin-owned target-resolution boundary. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 67faef01828d. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +14, Tests +90. Total +104 across 8 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
4d029c5 to
f10ce03
Compare
f10ce03 to
4f410f2
Compare
4f410f2 to
3a5b21c
Compare
|
Verification before merge:
Known proof gap: no live BNCR network send was performed; coverage and local proof exercise the host-side cron target resolution path that stripped the canonical target before outbound delivery. |
Summary
Fixes #87905
Root Cause
resolveDeliveryTarget()stripped the selected channel/provider prefix from every resolved target. That was correct for generic normalized fallback targets, but wrong after a plugin resolver had already returned a canonical target such asBncr:tgBot:-1003891624016:6278285192.Verification
node --import tsx ./openclaw-87905-proof-*.mjs(temporary local runtime proof script, removed after run)node scripts/run-vitest.mjs src/cron/isolated-agent/delivery-target.test.tsnode scripts/run-vitest.mjs src/cron/isolated-agent/delivery-target.test.ts src/infra/outbound/target-resolver.test.ts src/infra/outbound/target-normalization.test.ts src/infra/outbound/outbound-session.test.ts src/infra/outbound/targets.test.ts src/infra/outbound/message-action-runner.poll.test.tsnode_modules/.bin/oxfmt --check --threads=1 src/cron/isolated-agent/delivery-target.test.ts src/cron/isolated-agent/delivery-target.ts src/infra/outbound/outbound-session.test.ts src/infra/outbound/target-id-resolution.ts src/infra/outbound/target-normalization.test.ts src/infra/outbound/target-normalization.ts src/infra/outbound/target-resolver.test.ts src/infra/outbound/target-resolver.tsgit diff --checkReal behavior proof
Behavior addressed: Cron announce delivery no longer strips a provider-looking prefix from a plugin-canonical resolved target.
Real environment tested: Local OpenClaw worktree on this branch with installed dependencies, using the actual
resolveDeliveryTarget()cron delivery runtime path and a temporary local runtime channel plugin registered through the OpenClaw plugin registry.Exact steps or command run after this patch: ran a temporary local proof script with
node --import tsx, registering abncrruntime channel plugin whose target resolver returnsBncr:tgBot:-1003891624016:6278285192, then callingresolveDeliveryTarget(..., { dryRun: true })forchannel=bncrand that target.Evidence after fix:
{ "command": "resolveDeliveryTarget dry-run with local runtime channel plugin", "issue": 87905, "input": { "channel": "bncr", "to": "Bncr:tgBot:-1003891624016:6278285192" }, "result": { "ok": true, "channel": "bncr", "to": "Bncr:tgBot:-1003891624016:6278285192", "mode": "explicit" }, "preservedCanonicalTarget": true }Observed result after fix: the resolved dry-run delivery target kept the full canonical
Bncr:target, andpreservedCanonicalTargetwastrue.What was not tested: No live BNCR network send was performed; this verifies the host-side cron target resolution path that previously stripped the canonical target before outbound delivery.
Supplemental tests
preserves plugin-canonical targets that begin with the selected channel prefixcovers the same target shape in the focused cron suite.Test Files 1 passed (1),Tests 50 passed (50).Test Files 6 passed (6),Tests 188 passed (188).Author attribution
If this PR is squash-merged or reworked, please preserve author attribution for
Andy Ye <[email protected]>or include:Co-authored-by: Andy Ye <[email protected]>