Skip to content

feat(teams): mutate bot-owned messages - #1495

Draft
NeoHsu wants to merge 9 commits into
openabdev:mainfrom
NeoHsu:stack/teams-04-owned-mutations
Draft

feat(teams): mutate bot-owned messages#1495
NeoHsu wants to merge 9 commits into
openabdev:mainfrom
NeoHsu:stack/teams-04-owned-mutations

Conversation

@NeoHsu

@NeoHsu NeoHsu commented Aug 20, 2026

Copy link
Copy Markdown

Important

Stacked draft: logical base stack/teams-03-real-send-ack is PR #1494. GitHub requires an upstream PR base to exist in openabdev/openab, so this draft temporarily targets main and may show preceding stack layers. Do not merge it until #1494 is merged and this branch is rebased onto current main; then review only its single incremental commit.

What problem does this solve?

Allow Core to edit or delete only Teams activities that this Gateway instance delivered and owns.

Discord Discussion URL: https://discord.com/channels/1491295327620169908/1491365158868619404/1531339032527765655
Microsoft Teams roadmap discussion.

Review Contract

Goal

Allow Core to edit or delete only Teams activities that this Gateway instance delivered and owns.

Non-goals

Inbound-message mutation, cross-conversation targets, durable ownership across restart, and general retry queues are excluded.

Accepted Residual Risks

Ownership is process-local. Unknown mutation outcomes preserve ownership for later reconciliation and are not retried; one explicit bounded 429 delay is the only transport retry.

Acceptance Criteria

Targets are explicit and scope checked; only real bot-owned IDs can mutate; same-conversation writes serialize without blocking unrelated conversations; Delivered/Rejected/Unknown are preserved through both deployment modes.

Follow-ups

Build processing and progressive lifecycle behavior on these primitives; consider persistent ownership separately.

At a Glance

Authenticated Teams activity / operator target
                    │
                    ▼
            [this PR’s bounded layer]
                    │
                    ▼
          explicit outcome or fail-closed stop

Prior Art & Industry Research

OpenClaw: its Microsoft Teams extension separates access checks, Bot Framework route context, and outbound operations. For this slice the relevant comparison is bot-owned outbound mutation boundaries.

Hermes Agent: its Teams platform adapter keeps Teams-specific transport and message shaping behind a platform adapter. It does not provide OpenAB’s negotiated Core/Gateway outcome contract, so this PR keeps the useful adapter boundary but adds explicit fail-closed semantics.

Proposed Solution

  • Add explicit command targets and bot-owned Teams PUT/DELETE operations.
  • Enforce route and ownership scope before platform HTTP.
  • Bound one authoritative 429 Retry-After retry and serialize same-conversation writes.

Why this approach?

Ownership and route checks happen before HTTP so a malformed or cross-scope target cannot become a platform side effect.

Alternatives Considered

Allow arbitrary message IDs (rejected: cross-scope mutation) or persist ownership now (deferred to a separately reviewed design).

Validation

  • cargo check -p openab-core
  • cargo check -p openab-gateway --features teams

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.

1 participant