Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
This commit is contained in:
parent
7b3eff4a47
commit
2983fe6551
12 changed files with 203 additions and 7 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from dataclasses import dataclass
|
||||
|
||||
from .routing import RoutedMessage, parse_address_line
|
||||
|
|
@ -7,6 +8,12 @@ from .store import Store
|
|||
from .registry import RegistryError, validate_targets
|
||||
|
||||
|
||||
LEGACY_DELIVERY_SUFFIX = re.compile(
|
||||
r"\s+\[(m-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\]$",
|
||||
re.IGNORECASE,
|
||||
)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class BrokerIdentity:
|
||||
endpoint_id: str
|
||||
|
|
@ -24,6 +31,15 @@ class InputBroker:
|
|||
routed = parse_address_line(line)
|
||||
if routed is None:
|
||||
return None
|
||||
receipt = LEGACY_DELIVERY_SUFFIX.search(routed.body)
|
||||
if line.startswith("#") and receipt:
|
||||
prior = self.store.message(receipt.group(1))
|
||||
if (
|
||||
prior is not None
|
||||
and prior["sender_repo"] == routed.target_repo
|
||||
and prior["target_repo"] == self.identity.source_repo
|
||||
):
|
||||
return None
|
||||
try:
|
||||
validate_targets([routed.target_repo])
|
||||
except RegistryError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue