Founder approved T01 on 2026-09-22 (D2, D3, D6 as recommended).
- T02: message_receipts table; kind/expires_at/supersedes_id on
agent_messages; migration d7e8f9a0b1c2 archives existing broadcasts,
leaves direct messages untouched, reversible.
- T03: reader-aware mark-read (unattributed broadcast mark-read is a
metered, deprecated no-op), delivery receipts on the scoped unread inbox,
POST /messages/{id}/ack, news/standing kinds, expiry, supersede, broadcast
archive no longer stamps read_at, reply writes the replier's receipt.
- T04 (state-hub part): Codex MCP reader param and acknowledge_notice;
hub-core part handed off (message 69fc387c).
- T05: GET /messages/notices, standing_notices in /state/summary,
dashboard standing-notices panel.
- T06: 17 new tests; full suite green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Assistant: claude-code
Assistant-Model: opus
Assistant-Process: 63291@bnt-lap001
Assistant-Session: 8bd77868-ca68-4f49-bb1e-d539ecc0d703
81 lines
3 KiB
Python
81 lines
3 KiB
Python
from api.schemas.agent_message import MessageCreate
|
|
from api.schemas.capability_request import (
|
|
CapabilityRequestDispute,
|
|
CapabilityRequestStatusPatch,
|
|
CatalogCreate,
|
|
CatalogPatch,
|
|
CatalogRead,
|
|
)
|
|
from api.schemas.doi import DoIReport
|
|
from api.schemas.domain import DomainCreate, DomainRead, DomainRename, DomainUpdate
|
|
from api.schemas.managed_repo import RepoCreate, RepoPathRegister, RepoRead
|
|
from api.schemas.tpsc import GDPR_WARNING_LEVELS, TPSCCatalogRead, TPSCGDPRReport
|
|
from hub_core.schemas.agent_message import MessageCreate as CoreMessageCreate
|
|
from hub_core.schemas.capability import (
|
|
CapabilityRequestDispute as CoreCapabilityRequestDispute,
|
|
CapabilityRequestStatusPatch as CoreCapabilityRequestStatusPatch,
|
|
CatalogCreate as CoreCatalogCreate,
|
|
CatalogPatch as CoreCatalogPatch,
|
|
CatalogRead as CoreCatalogRead,
|
|
)
|
|
from hub_core.schemas.doi import DoIReport as CoreDoIReport
|
|
from hub_core.schemas.domain import (
|
|
DomainCreate as CoreDomainCreate,
|
|
DomainRead as CoreDomainRead,
|
|
DomainRename as CoreDomainRename,
|
|
DomainUpdate as CoreDomainUpdate,
|
|
)
|
|
from hub_core.schemas.managed_repo import (
|
|
RepoCreate as CoreRepoCreate,
|
|
RepoPathRegister as CoreRepoPathRegister,
|
|
RepoRead as CoreRepoRead,
|
|
)
|
|
from hub_core.schemas.tpsc import (
|
|
GDPR_WARNING_LEVELS as CORE_GDPR_WARNING_LEVELS,
|
|
TPSCCatalogRead as CoreTPSCCatalogRead,
|
|
TPSCGDPRReport as CoreTPSCGDPRReport,
|
|
)
|
|
|
|
|
|
def test_state_hub_message_schema_extends_core() -> None:
|
|
# STATE-WP-0093 extends the hub-core shape locally (kind, expires_at,
|
|
# supersedes_id) until hub-core absorbs the fields; then this returns to
|
|
# an identity re-export.
|
|
assert issubclass(MessageCreate, CoreMessageCreate)
|
|
assert set(CoreMessageCreate.model_fields) <= set(MessageCreate.model_fields)
|
|
|
|
|
|
def test_state_hub_reexports_core_doi_schema() -> None:
|
|
assert DoIReport is CoreDoIReport
|
|
|
|
|
|
def test_state_hub_reexports_core_domain_base_schemas() -> None:
|
|
assert DomainCreate is CoreDomainCreate
|
|
assert DomainRead is CoreDomainRead
|
|
assert DomainRename is CoreDomainRename
|
|
assert DomainUpdate is CoreDomainUpdate
|
|
|
|
|
|
def test_state_hub_reexports_core_capability_base_schemas() -> None:
|
|
assert CatalogCreate is CoreCatalogCreate
|
|
assert CatalogPatch is CoreCatalogPatch
|
|
assert CatalogRead is CoreCatalogRead
|
|
assert CapabilityRequestDispute is CoreCapabilityRequestDispute
|
|
assert CapabilityRequestStatusPatch is CoreCapabilityRequestStatusPatch
|
|
|
|
|
|
def test_state_hub_reexports_core_repo_path_schema() -> None:
|
|
assert RepoPathRegister is CoreRepoPathRegister
|
|
|
|
|
|
def test_state_hub_repo_schemas_extend_core_contracts() -> None:
|
|
assert issubclass(RepoCreate, CoreRepoCreate)
|
|
assert issubclass(RepoRead, CoreRepoRead)
|
|
assert "topic_id" in RepoCreate.model_fields
|
|
assert "last_state_synced_at" in RepoRead.model_fields
|
|
|
|
|
|
def test_state_hub_reexports_core_tpsc_schemas() -> None:
|
|
assert TPSCCatalogRead is CoreTPSCCatalogRead
|
|
assert TPSCGDPRReport is CoreTPSCGDPRReport
|
|
assert GDPR_WARNING_LEVELS is CORE_GDPR_WARNING_LEVELS
|