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
+5 -3
View File
@@ -144,9 +144,11 @@ use workdir::{
use worker::WorkerController;
use worker::feature::builtin::manage_workdir::WorkspaceAttachedWorkdirSession;
use worker::feature::builtin::{
CompositeWorkerObservationProvider, WorkerObservationError, WorkerObservationProvider,
WorkerObservationSubject, WorkerObservationSubjectRef, WorkerSessionCapture,
WorkspaceClientWorkerObservationProvider,
CompositeWorkerObservationProvider, WorkspaceClientWorkerObservationProvider,
};
use worker::feature::contracts::{
WorkerObservationError, WorkerObservationProvider, WorkerObservationSubject,
WorkerObservationSubjectRef, WorkerSessionCapture,
};
#[cfg(feature = "ws-server")]
use worker::ipc::protocol_session::{WorkerProtocolSessionStreams, live_log_entry_event};