Repository navigation
fix(channels): preserve ordinary thread session bindings - #190763
Conversation
Co-authored-by: vincentkoc <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. What this changesThis PR preserves ordinary session bindings through creation, persistence, reload, and cleanup in Discord, Matrix, and Telegram. Example: Bind a Discord thread to agent:main:fork:ordinary, then restart.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep this maintainer-authored draft open: the central fix remains necessary on main, but an introduced plugin-binding regression blocks merge. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe shared binding service passes session targets and conversation references to channel adapters, whose existing managers persist routing records and apply lifecycle cleanup. flowchart TD
A[Binding caller] --> B[Shared binding service]
B --> C[Channel adapter]
C --> D[ACP metadata reader]
C --> E[Existing binding manager]
E --> F[SQLite binding store]
F --> G[Reload and lifecycle cleanup]
Technical reviewBest possible solution: Preserve ordinary binding kinds while keeping plugin-owned opaque targets outside ACP classification and retaining supported ACP alias handling. Do we have a high-confidence way to reproduce the issue? Source inspection establishes the ordinary-session coercion and Discord cleanup path; the body reports failing original-producer regressions, but this read-only review ran no target code. Is this the best way to solve the issue? Extending the existing private records is a focused repair with no unnecessary manager or storage layer, but classification must respect plugin ownership rather than require every session target to resolve through ACP storage. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 18e52ca69eae. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +90, Tests +223, Docs +3, Other +1. Total +317 across 18 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 8:35 PM ET / November 2, 2026, 01:35 UTC. |
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
|
Merged via squash.
|
…0763) * fix(channels): preserve ordinary thread session bindings Co-authored-by: vincentkoc <[email protected]> * fix(channels): preserve opaque plugin binding ownership Co-authored-by: vincentkoc <[email protected]> * fix(channels): retain plugin ownership on partial binding refresh Co-authored-by: vincentkoc <[email protected]> --------- Co-authored-by: vincentkoc <[email protected]>
What Problem This Solves
Ordinary thread-bound conversations were recorded as ACP sessions and could enter the wrong reconciliation lifecycle after restart. Landing review also exposed opaque plugin-owned targets being sent through ACP agent selection, including metadata-omitting refreshes.
User Impact
Ordinary session bindings remain ordinary through creation, persistence, reload and cleanup in Discord, Matrix and Telegram. Canonical ACP keys, supported main/global ACP aliases and explicit subagents retain their behavior. Plugin-owned opaque targets work with explicit multiple agents and no default agent. This is prerequisite A of the threaded
/forkstack; it does not expose/forkitself.Why This Change Was Made
Keep the existing public session/subagent contract in each plugin’s private record. The worker-backed ACP metadata reader classifies supported aliases; unreadable stores refuse classification before native creation. Legacy ACP-coerced ordinary rebinding preserves same-target metadata without bulk rewriting historical explicit tags.
The landing repair uses canonical plugin-ownership metadata, not target-key prefixes, arbitrary agent selection or broad exception swallowing. Discord creation/hydration/reply identity tolerate an absent agent owner. Matrix preserves plugin metadata through creation, projection, persistence and hydration.
For partial refreshes, only the same target and same public-kind family inherit ownership facts. Child placement, replacement targets and kind changes do not inherit them. Native/action hints remain incoming-only; Matrix introText is not replayed from stored metadata. Currentness callbacks and effect-boundary checks remain intact.
No database schema, configuration, dependency, retention or intentional permission-policy changes. The updater is unchanged and no migration step is added. The separate F refactor consolidates classification; this PR repairs lifecycle behavior in the existing owners.
Evidence
Current landing repairs: deff77c
node scripts/run-vitest.mjs <file> --maxWorkers=1with task-specific compiler caches. Added repair test lines are explicitly allocated: 167 opaque-target lines and 148 partial-refresh lines. CI seconds are reported by the attached run, not inferred locally.Original feature baseline: 26fa359
--maxWorkers=1proof: Discord 21 passed, 45.11s; Telegram 31, 16.94s; Matrix 26, 11.14s. Discord authority/state/subagent siblings: 23 passed.pnpm build: exit 0, 8m17.6s, with advisory UI asset-budget warnings. Subsequent landing findings are repaired and reviewed above.Stack
A → B (shared command/core recording/Telegram) → C (Discord) / D (Slack) / E (Control UI), with separately published F–I refactor follow-ups. Retarget dependents after prerequisites land, preserving incremental review and exact-head qualification. Landing is authorized; operator Gateway deployment is outside this request.