fix(discord): single-source thread-binding default placement and guard artifact parity#104342
Conversation
…d artifact parity
|
Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 5:18 AM ET / 09:18 UTC. Summary PR surface: Source +8, Tests +68, Other +1. Total +77 across 8 files. Reproducibility: yes. at source level: current main independently defines Discord's fast-path and runtime placement even though conversation resolution can consume either surface depending on plugin load state. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land the plugin-owned shared constants and public-surface parity contract after the remaining exact-head checks and normal protected-label maintainer review complete. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main independently defines Discord's fast-path and runtime placement even though conversation resolution can consume either surface depending on plugin load state. Is this the best way to solve the issue? Yes. A plugin-owned shared value plus a contract comparing the public artifact with the runtime plugin is the narrowest maintainable fix and follows the repository's existing Matrix and lightweight-artifact patterns. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 72cf43fa8092. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +8, Tests +68, Other +1. Total +77 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
|
|
Merged via squash.
|
* origin/main: fix(cron): abort superseded reconciliation hooks (#104368) ci(release): expose Telegram runtime preflight stage (#104387) fix(status): avoid false shell-wrapper audit warnings (#81778) fix: retry live Gateway readiness proof (#104374) fix(exec-approval): stop misattributing Allow Always unavailability to policy (#97740) fix: preserve Mac bundle during live builds (#104376) chore(docs): translate with GPT-5.6 xhigh test: wire Control UI suite into CI, fix its broken tests, drop dead harness surface (#104361) fix(ui): hide group submenu separator when New group is the only entry (#104370) fix(discord): reset progress drafts across queued turns (#102341) docs(cli): clarify that exec-policy show and approvals get exclude per-session /exec overrides (#94999) fix(discord): single-source thread-binding default placement and guard artifact parity (#104342) fix(agents): add tool-activity heartbeat to keep subagent alive during tool calls (#95536) fix(maint): reuse recent same-PR hosted gates (#104355)
…d artifact parity (openclaw#104342) * fix(discord): single-source thread-binding default placement and guard artifact parity * fix(tests): load thread-binding parity artifacts via sanctioned contract test helpers
* origin/main: fix(cron): abort superseded reconciliation hooks (openclaw#104368) ci(release): expose Telegram runtime preflight stage (openclaw#104387) fix(status): avoid false shell-wrapper audit warnings (openclaw#81778) fix: retry live Gateway readiness proof (openclaw#104374) fix(exec-approval): stop misattributing Allow Always unavailability to policy (openclaw#97740) fix: preserve Mac bundle during live builds (openclaw#104376) chore(docs): translate with GPT-5.6 xhigh test: wire Control UI suite into CI, fix its broken tests, drop dead harness surface (openclaw#104361) fix(ui): hide group submenu separator when New group is the only entry (openclaw#104370) fix(discord): reset progress drafts across queued turns (openclaw#102341) docs(cli): clarify that exec-policy show and approvals get exclude per-session /exec overrides (openclaw#94999) fix(discord): single-source thread-binding default placement and guard artifact parity (openclaw#104342) fix(agents): add tool-activity heartbeat to keep subagent alive during tool calls (openclaw#95536) fix(maint): reuse recent same-PR hosted gates (openclaw#104355)
Related: #104318
What Problem This Solves
Fixes a dual-surface drift hazard where Discord's lightweight
thread-binding-api.tsartifact hardcodeddefaultTopLevelPlacement = "child"inline whilesrc/channel.tsindependently hardcoded the same literal — two hand-maintained copies with nothing keeping them in sync. Matrix's channel.ts carried the same inline-literal hazard. Core genuinely consumes these artifacts on startup-safe paths (thread-bindings-policy, conversation-resolution), so drift would silently change pre-runtime placement behavior.Why This Change Was Made
Single source of truth per channel (
src/thread-binding-api.tsconstant re-exported by the root artifact, consumed by the plugin object), matching the pattern matrix's artifact already used, plus a table-driven parity contract test that discovers every bundled channel shipping a thread-binding artifact and asserts artifact export === the real plugin'sconversationBindings.defaultTopLevelPlacement. Contract test lanes enumerate files explicitly, so the new test is registered in the contracts lane configs.User Impact
No behavior change today; prevents a class of silent placement drift between fast-path and runtime behavior.
Evidence
tbx_01kx86hrxwddz38dczac6hq4pq; matrix thread-binding + discord channel tests 37/37 ontbx_01kx867d8v3gg6bvg8xh7aq99z; vitest-projects-config 16/16 ontbx_01kx86rb47zbtt0gfd0ncbm3kc; oxfmt clean ontbx_01kx86xq9bxzwhd009m366dyt2.resolveBundledChannelThreadBindingDefaultPlacement("discord") → undefinedwas a mock-fixture artifact, not vestigiality — fixture renamed; core loader genuinely consumes discord's artifact.