LearnNewsExamplesServices
Frontmatter
id15158
titleBind community events to canonical A2A Tasks
stateOpen
labels
enhancementaiarchitecturesecurity
assignees[]
createdAt7:31 AM
updatedAt8:29 AM
githubUrlhttps://github.com/neomjs/neo/issues/15158
authorneo-gpt
commentsCount0
parentIssue15145
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[ ] 15152 Reconcile GitHub issue activity exhaustively, [ ] 15151 Admit idempotent community batches into durable history
blocking[ ] 15162 Prove the community-activity authority chain end to end, [ ] 15159 Project bounded tenant community-attention counts
milestonev13.2

Bind community events to canonical A2A Tasks

Open Backlog/active-chunk-6 enhancementaiarchitecturesecurity
neo-gpt
neo-gpt commented on 7:31 AM

Context

Grace's mandatory STEP_BACK partial and OQ5 require one unique atomic sourceEventId -> taskId binding before existing A2A Task authority begins. Existing Task ownership and transition event identity do not prevent two Tasks from being minted for one external response item.

This is one fully closeable PR leaf under Epic #15145. The live parent-child and blocked-by graph is authoritative; this body owns only this leaf's contract.

The Problem

If Task creation and source binding are separate writes, concurrent peers can each create a canonical-looking Task and both win downstream assignment. A crash can also leave an orphan Task or binding.

The Architectural Reality

The binding belongs in a Memory-Core activity service using the same SQLite transaction seam as MailboxService.transitionTask. It consumes an admitted durable response item. Existing MailboxService remains the downstream Task state/assignment authority after the binding commits.

The Agent OS structure map was run on 2026-07-14. New service/script/test placement must use the named sibling-file-lift fast paths; no service logic moves into MCP server entrypoint directories.

The Fix

Implement an atomic claim operation and unique binding table/index that validates tenant/source eligibility, creates or retrieves exactly one canonical A2A Task, commits Task plus sourceEventId -> taskId binding together, and returns the same Task to concurrent/retry callers.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
Canonical claim OQ5 STEP_BACK One transaction binds eligible source event to one Task Concurrent/retry callers receive existing canonical Task Service/OpenAPI docs Race and idempotency tests
Task authority handoff MailboxService contracts Existing Task owner/state authority begins only after binding commit Failure exposes neither Task nor binding JSDoc Crash-point tests
Lifecycle exclusion ADR 0035/OQ5 Unclaimed community activity remains outside LifecycleFrontier Seen or count state cannot promote it Authority docs Negative frontier tests

Decision Record impact

Depends on ADR 0036 and neutral admission; composes ADR 0035 and existing Task contracts without changing their state machine.

Decision Record

Required: ADR 0036. This leaf is not code-ready until the ADR-0036 child of #15145 is accepted at the human merge gate.

Discussion Criteria Mapping

Upstream graduated criterion This leaf's executable contract
OQ5 Creates the missing admission-to-canonical-Task transition.
STEP_BACK point 4 Proves unique atomic sourceEventId-to-taskId before Task authority.
OQ7/OQ8 Claim is explicit, tenant-scoped, and independent of wake/read state.

Source authority: Discussion #15139 body at the version-bound graduation anchor plus Grace's STEP_BACK and GRADUATION_APPROVED.

Acceptance Criteria

  • AC1 — Only an admitted, eligible, tenant/source-visible response item can be claimed.
  • AC2 — A unique constraint prevents more than one taskId for one scoped sourceEventId.
  • AC3 — Concurrent claim callers receive the same server-owned canonical Task.
  • AC4 — Task creation and binding commit atomically; every injected crash point leaves neither orphan authority nor duplicate Task.
  • AC5 — Retries after lost response are idempotent.
  • AC6 — Existing MailboxService assignment/RBAC/state transition rules take over only after commit.
  • AC7 — Seen state, count projection, and provider delivery ids cannot authorize claim.
  • AC8 — Unclaimed community items remain outside LifecycleFrontier and Golden Path ranking.
  • AC9 — Cross-tenant and revoked-source claim attempts fail closed.

Out of Scope

Automatic assignment, automatic response, Task state-machine redesign, wake leases, or source acquisition.

Avoided Traps

Do not use Task creation alone as dedup, bind after Task publication, overload occurrence identity with task id, or let seen imply claim.

Related

Origin Session ID: 837ad74b-c2d2-413d-9aab-b7165a93a82a

Handoff Retrieval Hints

  • sourceEventId taskId atomic canonical Task claim
  • community activity claim race MailboxService transaction

Creation Freshness

Creation duplicate sweep: immediately before filing at 2026-07-14T05:31:21.422Z, checked the latest 20 open issues and last 30 all-state A2A messages. The independent broader audit at 2026-07-14T05:13:00Z covered open and closed issues, pull requests, A2A, ADRs, and code; no equivalent owner or foreign claim existed.