refactor: own Worker and Ticket service contracts outside providers

Move shared control/lifecycle/observation/Ticket contracts into feature::contracts. Consumers and host bindings import the neutral owner; providers retain current authorization, explicit combined routing and persisted composition.

Document stable semantic IDs and exact compatibility epochs; connect consumer requirements to the existing planner without a new resolver. Exercise consumer installation/dispatch with contract-only test providers, atomic rejection paths, and parsed-source architecture guards including negative fixtures.

Validation: worker and worker-runtime normal tests and doctests passed; root cargo check, rustdoc with warnings denied, fmt, diff and state-contract names passed. Dependent Server authorization tests require separate stale native-v1 fixture updates captured next.
This commit is contained in:
2026-10-28 16:51:46 +09:00
parent a1fbe1e754
commit 6826db7e0c
17 changed files with 796 additions and 254 deletions
@@ -1015,7 +1015,7 @@ async fn ticket_worker_host_with_service(
) -> (
worker::Worker<UnusedModel, session_store::FsStore>,
bool,
Option<Arc<dyn worker::feature::builtin::ticket::TicketService>>,
Option<Arc<dyn worker::feature::contracts::TicketService>>,
) {
let manifest = worker::WorkerManifest::from_toml(
r#"
@@ -1060,9 +1060,9 @@ async fn ticket_worker_host_with_service(
Some(
report
.services
.service::<dyn worker::feature::builtin::ticket::TicketService>(
.service::<dyn worker::feature::contracts::TicketService>(
&worker::feature::ServiceId::builtin(
worker::feature::builtin::ticket::TICKET_SERVICE_ID,
worker::feature::contracts::TICKET_SERVICE_ID,
),
)
.unwrap(),