refactor(core): align with cordis spatiotemporal composability architecture

- Purify core micro-kernel by removing context hardcoded helpers and reverse dependencies
- Eliminate init() side effects in infra plugins with reversible lifecycle disposal
- Completely isolate plugins by removing cross-plugin imports and using core/contracts
- Introduce TaskService and RiskControlService contracts for unified cross-plugin APIs
- Regenerate Swagger documentation and update developer guide matrix
- Achieve 0 violations in check_cordis_architecture.sh and 100% test pass
This commit is contained in:
ryan
2026-08-28 15:05:31 +08:00
parent fc7fae7b0e
commit 299ac30ee4
150 changed files with 4328 additions and 2923 deletions
@@ -9,15 +9,14 @@ import (
"sync"
"time"
"Wavelet/core/contracts"
"Wavelet/plugins/domain/upload/shared"
"Wavelet/plugins/drivers/driver_asynq_worker"
"Wavelet/plugins/infra/storage/objectstore"
)
// MigrationAccessState captures cached migration maintenance state.
type MigrationAccessState struct {
ReadOnly bool
Target objectstore.Config
Target contracts.StorageConfigDTO
HasTarget bool
TargetErr error
LoadErr error
@@ -65,14 +64,14 @@ func buildMigrationAccessState(ctx context.Context) MigrationAccessState {
if err != nil {
return MigrationAccessState{LoadErr: err, ReadOnly: true}
}
if !ok {
if !ok || execution == nil {
return MigrationAccessState{}
}
state := MigrationAccessState{
ReadOnly: execution.Status != driver_asynq_worker.TaskExecutionStatusSucceeded,
ReadOnly: execution.Status != "succeeded",
}
if execution.Status == driver_asynq_worker.TaskExecutionStatusSucceeded {
if execution.Status == "succeeded" {
return state
}