Remove pre-1.0 audit and protected request scaffolding
This commit is contained in:
@@ -40,17 +40,6 @@ type GameClientBridgeCommandDeclaration struct {
|
||||
ResultSchemaRef string
|
||||
TimeoutSeconds int
|
||||
MaxPayloadBytes int
|
||||
ProtectedRequest *GameClientBridgeProtectedRequestDeclaration
|
||||
}
|
||||
|
||||
// GameClientBridgeProtectedRequestDeclaration binds plugin-generated text to a
|
||||
// logical server transport. It never carries its resolved connection details.
|
||||
type GameClientBridgeProtectedRequestDeclaration struct {
|
||||
Kind string
|
||||
TransportKey string
|
||||
TargetKey string
|
||||
TextField string
|
||||
MaxTextBytes int
|
||||
}
|
||||
|
||||
type GameClientBridgeSnapshotDeclaration struct {
|
||||
@@ -100,19 +89,10 @@ type GameClientBridgeLogProjectionTargetDeclaration struct {
|
||||
ObservedAtField string
|
||||
}
|
||||
|
||||
type GameClientBridgeLogProjectionAnnouncementDeclaration struct {
|
||||
ProfileKey string
|
||||
CommandType string
|
||||
TextField string
|
||||
NewTextTemplate string
|
||||
ReturningTextTemplate string
|
||||
}
|
||||
|
||||
type GameClientBridgeLogProjectionPresenceDeclaration struct {
|
||||
TimestampField string
|
||||
ActiveWindowSeconds int
|
||||
ActivityTarget *GameClientBridgeLogProjectionTargetDeclaration
|
||||
Announcement GameClientBridgeLogProjectionAnnouncementDeclaration
|
||||
}
|
||||
|
||||
type GameClientBridgeLogProjectionDeclaration struct {
|
||||
@@ -130,7 +110,7 @@ type GameClientBridgeDataPackDeclaration struct {
|
||||
DatabaseUserVersion int
|
||||
LogParserRefs []string
|
||||
ConfigMapRefs []string
|
||||
DataRefs []string
|
||||
DataRefs []string
|
||||
}
|
||||
|
||||
type GameClientBridgeOperationKind string
|
||||
@@ -249,7 +229,6 @@ type GameClientBridgeCommand struct {
|
||||
Claim GameClientBridgeClaim
|
||||
Cancellation GameClientBridgeCancellation
|
||||
Result GameClientBridgeResult
|
||||
AuditReferences []string
|
||||
ExpiresAt time.Time
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
@@ -293,7 +272,6 @@ type GameClientBridgeSnapshot struct {
|
||||
ObservedAt time.Time
|
||||
Payload map[string]any
|
||||
Retention GameClientBridgeRetention
|
||||
AuditReferences []string
|
||||
CreatedAt time.Time
|
||||
ExpiresAt time.Time
|
||||
}
|
||||
@@ -314,14 +292,6 @@ type GameClientBridgeRetention struct {
|
||||
MaxRecords int
|
||||
}
|
||||
|
||||
type GameClientBridgeAuditReference struct {
|
||||
ID string
|
||||
CommandID string
|
||||
SnapshotID string
|
||||
AuditEventID string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type GameClientBridgeCommandFilter struct {
|
||||
ServerInstanceID string
|
||||
PluginID string
|
||||
@@ -460,7 +430,6 @@ func CopyGameClientBridgeCommand(value GameClientBridgeCommand) GameClientBridge
|
||||
value.Claim = CopyGameClientBridgeClaim(value.Claim)
|
||||
value.Cancellation = CopyGameClientBridgeCancellation(value.Cancellation)
|
||||
value.Result = CopyGameClientBridgeResult(value.Result)
|
||||
value.AuditReferences = CopyStringSlice(value.AuditReferences)
|
||||
return value
|
||||
}
|
||||
|
||||
@@ -478,7 +447,6 @@ func CopyGameClientBridgeResult(value GameClientBridgeResult) GameClientBridgeRe
|
||||
func CopyGameClientBridgeSnapshot(value GameClientBridgeSnapshot) GameClientBridgeSnapshot {
|
||||
value.Payload = CopyGameClientBridgePayload(value.Payload)
|
||||
value.Retention = CopyGameClientBridgeRetention(value.Retention)
|
||||
value.AuditReferences = CopyStringSlice(value.AuditReferences)
|
||||
return value
|
||||
}
|
||||
|
||||
@@ -490,10 +458,6 @@ func CopyGameClientBridgeRetention(value GameClientBridgeRetention) GameClientBr
|
||||
return value
|
||||
}
|
||||
|
||||
func CopyGameClientBridgeAuditReference(value GameClientBridgeAuditReference) GameClientBridgeAuditReference {
|
||||
return value
|
||||
}
|
||||
|
||||
func CopyGameClientBridgePayload(value map[string]any) map[string]any {
|
||||
if value == nil {
|
||||
return nil
|
||||
@@ -507,12 +471,6 @@ func CopyGameClientBridgePayload(value map[string]any) map[string]any {
|
||||
|
||||
func CopyGameClientBridgeManifest(value GameClientBridgeManifest) GameClientBridgeManifest {
|
||||
value.Commands = append([]GameClientBridgeCommandDeclaration(nil), value.Commands...)
|
||||
for index := range value.Commands {
|
||||
if value.Commands[index].ProtectedRequest != nil {
|
||||
copy := *value.Commands[index].ProtectedRequest
|
||||
value.Commands[index].ProtectedRequest = ©
|
||||
}
|
||||
}
|
||||
value.Snapshots = append([]GameClientBridgeSnapshotDeclaration(nil), value.Snapshots...)
|
||||
value.QueryTemplates = append([]GameClientBridgeQueryTemplateDeclaration(nil), value.QueryTemplates...)
|
||||
for index := range value.QueryTemplates {
|
||||
@@ -529,7 +487,7 @@ func CopyGameClientBridgeManifest(value GameClientBridgeManifest) GameClientBrid
|
||||
for index := range value.DataPacks {
|
||||
value.DataPacks[index].LogParserRefs = CopyStringSlice(value.DataPacks[index].LogParserRefs)
|
||||
value.DataPacks[index].ConfigMapRefs = CopyStringSlice(value.DataPacks[index].ConfigMapRefs)
|
||||
value.DataPacks[index].DataRefs = CopyStringSlice(value.DataPacks[index].DataRefs)
|
||||
value.DataPacks[index].DataRefs = CopyStringSlice(value.DataPacks[index].DataRefs)
|
||||
}
|
||||
value.OperationTemplates = append([]GameClientBridgeOperationTemplateDeclaration(nil), value.OperationTemplates...)
|
||||
value.Pages = append([]GameClientBridgePageContract(nil), value.Pages...)
|
||||
|
||||
@@ -10,7 +10,7 @@ func TestCopyGameClientBridgeDeclarationsCopiesQueryTemplateSlices(t *testing.T)
|
||||
Target: GameClientBridgeLogProjectionTargetDeclaration{Collection: "users", UpsertKeys: []string{"steamId"}, CaptureMappings: map[string]string{"steamId": "steamId"}, FixedValues: map[string]string{"source": "stdout"}, ObservedAtField: "lastLoginAt"},
|
||||
Presence: &GameClientBridgeLogProjectionPresenceDeclaration{TimestampField: "lastLoginAt", ActiveWindowSeconds: 600, ActivityTarget: &GameClientBridgeLogProjectionTargetDeclaration{Collection: "activity", UpsertKeys: []string{"steamId"}, CaptureMappings: map[string]string{"steamId": "steamId"}}},
|
||||
}},
|
||||
DataPacks: []GameClientBridgeDataPackDeclaration{{Key: "db-v1", LogParserRefs: []string{"logs.json"}, ConfigMapRefs: []string{"config.json"}, DataRefs: []string{"data.json"}}},
|
||||
DataPacks: []GameClientBridgeDataPackDeclaration{{Key: "db-v1", LogParserRefs: []string{"logs.json"}, ConfigMapRefs: []string{"config.json"}, DataRefs: []string{"data.json"}}},
|
||||
OperationTemplates: []GameClientBridgeOperationTemplateDeclaration{{Key: "player.fame.set"}},
|
||||
Pages: []GameClientBridgePageContract{{PageKey: "players", QueryTemplateKeys: []string{"player.lookup"}, OperationKeys: []string{"player.fame.set"}}},
|
||||
}
|
||||
@@ -21,11 +21,11 @@ func TestCopyGameClientBridgeDeclarationsCopiesQueryTemplateSlices(t *testing.T)
|
||||
manifestCopy.LogProjections[0].Target.CaptureMappings["steamId"] = "mutated"
|
||||
manifestCopy.LogProjections[0].Presence.ActivityTarget.CaptureMappings["steamId"] = "mutated"
|
||||
manifestCopy.DataPacks[0].LogParserRefs[0] = "mutated"
|
||||
manifestCopy.DataPacks[0].DataRefs[0] = "mutated"
|
||||
manifestCopy.DataPacks[0].DataRefs[0] = "mutated"
|
||||
manifestCopy.OperationTemplates[0].Key = "mutated"
|
||||
manifestCopy.Pages[0].QueryTemplateKeys[0] = "mutated"
|
||||
manifestCopy.Pages[0].OperationKeys[0] = "mutated"
|
||||
if manifest.QueryTemplates[0].Key != "player.lookup" || manifest.QueryTemplates[0].RowTarget.ColumnMappings["userId"] != "user_id" || manifest.LogProjections[0].StreamKeys[0] != "process.stdout" || manifest.LogProjections[0].Target.CaptureMappings["steamId"] != "steamId" || manifest.LogProjections[0].Presence.ActivityTarget.CaptureMappings["steamId"] != "steamId" || manifest.DataPacks[0].LogParserRefs[0] != "logs.json" || manifest.DataPacks[0].DataRefs[0] != "data.json" || manifest.OperationTemplates[0].Key != "player.fame.set" || manifest.Pages[0].QueryTemplateKeys[0] != "player.lookup" || manifest.Pages[0].OperationKeys[0] != "player.fame.set" {
|
||||
if manifest.QueryTemplates[0].Key != "player.lookup" || manifest.QueryTemplates[0].RowTarget.ColumnMappings["userId"] != "user_id" || manifest.LogProjections[0].StreamKeys[0] != "process.stdout" || manifest.LogProjections[0].Target.CaptureMappings["steamId"] != "steamId" || manifest.LogProjections[0].Presence.ActivityTarget.CaptureMappings["steamId"] != "steamId" || manifest.DataPacks[0].LogParserRefs[0] != "logs.json" || manifest.DataPacks[0].DataRefs[0] != "data.json" || manifest.OperationTemplates[0].Key != "player.fame.set" || manifest.Pages[0].QueryTemplateKeys[0] != "player.lookup" || manifest.Pages[0].OperationKeys[0] != "player.fame.set" {
|
||||
t.Fatalf("manifest copy aliases query template declarations: source=%#v copy=%#v", manifest, manifestCopy)
|
||||
}
|
||||
|
||||
|
||||
@@ -264,32 +264,6 @@ type SourceRCONExecutionInput struct {
|
||||
Command string
|
||||
}
|
||||
|
||||
// ProtectedRequestExecutionInput is returned exactly once to the active,
|
||||
// fenced Run lease. RequestText is never persisted in a job or bridge command.
|
||||
type ProtectedRequestExecutionInputRequest struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
JobID string
|
||||
LeaseToken string
|
||||
Attempt int
|
||||
FencingToken uint64
|
||||
}
|
||||
|
||||
type ProtectedRequestExecutionInput struct {
|
||||
JobID string
|
||||
ServerInstanceID string
|
||||
RunEndpointID string
|
||||
FencingToken uint64
|
||||
Authorized bool
|
||||
ApprovalState string
|
||||
QueueState string
|
||||
ExpiresAt time.Time
|
||||
Kind string
|
||||
TransportKey string
|
||||
TargetKey string
|
||||
RequestText string
|
||||
}
|
||||
|
||||
type RunUpdateInputRequest struct {
|
||||
RunEndpointID string
|
||||
SessionToken string
|
||||
@@ -510,10 +484,6 @@ func CopySourceRCONExecutionInput(input SourceRCONExecutionInput) SourceRCONExec
|
||||
return input
|
||||
}
|
||||
|
||||
func CopyProtectedRequestExecutionInput(input ProtectedRequestExecutionInput) ProtectedRequestExecutionInput {
|
||||
return input
|
||||
}
|
||||
|
||||
func CopyRunUpdateChunk(chunk RunUpdateChunk) RunUpdateChunk {
|
||||
chunk.Payload = append([]byte(nil), chunk.Payload...)
|
||||
return chunk
|
||||
|
||||
@@ -108,7 +108,6 @@ type RemoteAdapterResult struct {
|
||||
Retryable bool
|
||||
Message string
|
||||
ResultRef string
|
||||
AuditEventID string
|
||||
CompletedAt time.Time
|
||||
}
|
||||
|
||||
|
||||
@@ -2,146 +2,6 @@ package domain
|
||||
|
||||
import "time"
|
||||
|
||||
type CapacityAdmissionState string
|
||||
|
||||
const (
|
||||
CapacityAdmissionAccepted CapacityAdmissionState = "accepted"
|
||||
CapacityAdmissionDeferred CapacityAdmissionState = "deferred"
|
||||
CapacityAdmissionDenied CapacityAdmissionState = "denied"
|
||||
)
|
||||
|
||||
type CapacityPressureCode string
|
||||
|
||||
const (
|
||||
CapacityPressureEndpointOffline CapacityPressureCode = "endpoint.offline"
|
||||
CapacityPressureEndpointStale CapacityPressureCode = "endpoint.stale"
|
||||
CapacityPressureCapabilityGap CapacityPressureCode = "capability.missing"
|
||||
CapacityPressureJobLimit CapacityPressureCode = "job.limit"
|
||||
CapacityPressureQueueLimit CapacityPressureCode = "queue.limit"
|
||||
CapacityPressureBacklog CapacityPressureCode = "spool.backlog"
|
||||
)
|
||||
|
||||
type CapacityAdmissionRequest struct {
|
||||
ServerInstanceID string
|
||||
RunEndpointID string
|
||||
Capability string
|
||||
TargetKey string
|
||||
IdempotencyKey string
|
||||
}
|
||||
|
||||
type CapacityAdmissionDecision struct {
|
||||
Accepted bool
|
||||
State CapacityAdmissionState
|
||||
Reason string
|
||||
RetryAfterSeconds int
|
||||
ServerInstanceID string
|
||||
RunEndpointID string
|
||||
Capability string
|
||||
TargetKey string
|
||||
MaxJobs int
|
||||
RunningJobs int
|
||||
QueuedJobs int
|
||||
PressureCodes []CapacityPressureCode
|
||||
CheckedAt time.Time
|
||||
AlertID string
|
||||
AuditEventID string
|
||||
}
|
||||
|
||||
type EndpointCapacityProjection struct {
|
||||
RunEndpointID string
|
||||
DisplayName string
|
||||
Status RunEndpointStatus
|
||||
Capabilities []string
|
||||
MaxJobs int
|
||||
RunningJobs int
|
||||
QueuedJobs int
|
||||
LogBacklogBatches int
|
||||
ArtifactBacklogChunks int
|
||||
PressureCodes []CapacityPressureCode
|
||||
Summary string
|
||||
LastHeartbeatAt time.Time
|
||||
LastAdmissionDecision CapacityAdmissionState
|
||||
LastAdmissionReason string
|
||||
LastAdmissionCheckedAt time.Time
|
||||
}
|
||||
|
||||
type ProductionCapacitySummary struct {
|
||||
Endpoints []EndpointCapacityProjection
|
||||
TotalMaxJobs int
|
||||
TotalRunningJobs int
|
||||
TotalQueuedJobs int
|
||||
ActiveAlerts int
|
||||
GeneratedAt time.Time
|
||||
}
|
||||
|
||||
type AlertSeverity string
|
||||
|
||||
const (
|
||||
AlertSeverityInfo AlertSeverity = "info"
|
||||
AlertSeverityWarning AlertSeverity = "warning"
|
||||
AlertSeverityCritical AlertSeverity = "critical"
|
||||
)
|
||||
|
||||
type AlertState string
|
||||
|
||||
const (
|
||||
AlertStateActive AlertState = "active"
|
||||
AlertStateAcknowledged AlertState = "acknowledged"
|
||||
AlertStateResolved AlertState = "resolved"
|
||||
)
|
||||
|
||||
type AlertRecord struct {
|
||||
ID string
|
||||
SourceKind string
|
||||
SourceID string
|
||||
RuleKey string
|
||||
Severity AlertSeverity
|
||||
State AlertState
|
||||
Title string
|
||||
Message string
|
||||
OccurrenceCount int
|
||||
Retryable bool
|
||||
RetryAfterSeconds int
|
||||
LastJobID string
|
||||
LastAuditEventID string
|
||||
LastSeenAt time.Time
|
||||
AcknowledgedBy string
|
||||
AcknowledgedAt time.Time
|
||||
ResolvedBy string
|
||||
ResolvedAt time.Time
|
||||
ResolutionNote string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type AlertFilter struct {
|
||||
State AlertState
|
||||
SourceKind string
|
||||
SourceID string
|
||||
Severity AlertSeverity
|
||||
}
|
||||
|
||||
type AlertAcknowledgeRequest struct {
|
||||
AlertID string
|
||||
Note string
|
||||
}
|
||||
|
||||
type AlertResolveRequest struct {
|
||||
AlertID string
|
||||
Note string
|
||||
}
|
||||
|
||||
type AlertRetryRequest struct {
|
||||
AlertID string
|
||||
IdempotencyKey string
|
||||
}
|
||||
|
||||
type AlertRetryResult struct {
|
||||
Alert AlertRecord
|
||||
Decision CapacityAdmissionDecision
|
||||
Status string
|
||||
}
|
||||
|
||||
type PluginLifecycleState string
|
||||
|
||||
const (
|
||||
@@ -180,8 +40,6 @@ type PluginLifecycleInstallation struct {
|
||||
Compatibility string
|
||||
DependencyState DependencyState
|
||||
JobID string
|
||||
AlertID string
|
||||
AuditEventID string
|
||||
FailureReason string
|
||||
IdempotencyKey string
|
||||
CreatedAt time.Time
|
||||
@@ -206,8 +64,6 @@ type PluginLifecycleRequest struct {
|
||||
type PluginLifecycleResult struct {
|
||||
Installation PluginLifecycleInstallation
|
||||
Job Job
|
||||
Decision CapacityAdmissionDecision
|
||||
Alert *AlertRecord
|
||||
Status string
|
||||
}
|
||||
|
||||
@@ -261,53 +117,6 @@ type AIConfigDiffApprovalResult struct {
|
||||
Dispatch ServerConfigWriteDispatch
|
||||
}
|
||||
|
||||
func CopyCapacityAdmissionDecision(decision CapacityAdmissionDecision) CapacityAdmissionDecision {
|
||||
decision.PressureCodes = CopyCapacityPressureCodes(decision.PressureCodes)
|
||||
return decision
|
||||
}
|
||||
|
||||
func CopyEndpointCapacityProjection(projection EndpointCapacityProjection) EndpointCapacityProjection {
|
||||
projection.Capabilities = CopyStringSlice(projection.Capabilities)
|
||||
projection.PressureCodes = CopyCapacityPressureCodes(projection.PressureCodes)
|
||||
return projection
|
||||
}
|
||||
|
||||
func CopyProductionCapacitySummary(summary ProductionCapacitySummary) ProductionCapacitySummary {
|
||||
if summary.Endpoints != nil {
|
||||
summary.Endpoints = append([]EndpointCapacityProjection(nil), summary.Endpoints...)
|
||||
for i := range summary.Endpoints {
|
||||
summary.Endpoints[i] = CopyEndpointCapacityProjection(summary.Endpoints[i])
|
||||
}
|
||||
}
|
||||
return summary
|
||||
}
|
||||
|
||||
func CopyCapacityPressureCodes(codes []CapacityPressureCode) []CapacityPressureCode {
|
||||
if codes == nil {
|
||||
return nil
|
||||
}
|
||||
out := make([]CapacityPressureCode, len(codes))
|
||||
copy(out, codes)
|
||||
return out
|
||||
}
|
||||
|
||||
func CopyAlertRecord(alert AlertRecord) AlertRecord { return alert }
|
||||
|
||||
func CopyAlertRecords(alerts []AlertRecord) []AlertRecord {
|
||||
if alerts == nil {
|
||||
return nil
|
||||
}
|
||||
out := make([]AlertRecord, len(alerts))
|
||||
copy(out, alerts)
|
||||
return out
|
||||
}
|
||||
|
||||
func CopyAlertRetryResult(result AlertRetryResult) AlertRetryResult {
|
||||
result.Alert = CopyAlertRecord(result.Alert)
|
||||
result.Decision = CopyCapacityAdmissionDecision(result.Decision)
|
||||
return result
|
||||
}
|
||||
|
||||
func CopyPluginLifecycleInstallation(installation PluginLifecycleInstallation) PluginLifecycleInstallation {
|
||||
return installation
|
||||
}
|
||||
@@ -324,11 +133,6 @@ func CopyPluginLifecycleInstallations(installations []PluginLifecycleInstallatio
|
||||
func CopyPluginLifecycleResult(result PluginLifecycleResult) PluginLifecycleResult {
|
||||
result.Installation = CopyPluginLifecycleInstallation(result.Installation)
|
||||
result.Job = CopyJob(result.Job)
|
||||
result.Decision = CopyCapacityAdmissionDecision(result.Decision)
|
||||
if result.Alert != nil {
|
||||
alert := CopyAlertRecord(*result.Alert)
|
||||
result.Alert = &alert
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
@@ -187,15 +187,6 @@ const (
|
||||
LogStorageBackendElasticsearch LogStorageBackend = "elasticsearch"
|
||||
)
|
||||
|
||||
type AuditResult string
|
||||
|
||||
const (
|
||||
AuditResultSuccess AuditResult = "success"
|
||||
AuditResultDenied AuditResult = "denied"
|
||||
AuditResultFailed AuditResult = "failed"
|
||||
AuditResultQueued AuditResult = "queued"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
ID string
|
||||
DisplayName string
|
||||
@@ -1078,7 +1069,6 @@ const (
|
||||
JobCapabilityRemoteRunLogsTransfer = "remote.run.logs.transfer"
|
||||
JobCapabilityRemoteRunRCONCommand = "remote.run.rcon.command"
|
||||
JobCapabilityRemoteRunProtectedSQL = "remote.run.protected.sql"
|
||||
JobCapabilityRemoteRunProtectedRCON = "remote.run.protected.rcon"
|
||||
JobCapabilityRemoteRunProgram = "remote.run.program.command"
|
||||
JobCapabilityRunSelfUpdate = "run.self-update"
|
||||
JobCapabilityDistributionBuild = "distribution.build"
|
||||
@@ -1176,7 +1166,7 @@ type JobExecutionResult struct {
|
||||
Version int
|
||||
Checksum string
|
||||
SizeBytes int64
|
||||
AuditSummary string
|
||||
Summary string
|
||||
Content string
|
||||
ServerDeploymentEvidence *ServerDeploymentEvidence
|
||||
DeploymentReceipt *ServerDeploymentExecutionReceipt
|
||||
@@ -1515,17 +1505,6 @@ type LogStream struct {
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
type AuditEvent struct {
|
||||
ID string
|
||||
ActorID string
|
||||
Action string
|
||||
ResourceKind string
|
||||
ResourceID string
|
||||
Result AuditResult
|
||||
Summary string
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type UserFilter struct {
|
||||
Status UserStatus
|
||||
}
|
||||
@@ -1626,13 +1605,6 @@ type LogStreamFilter struct {
|
||||
StreamKey string
|
||||
}
|
||||
|
||||
type AuditEventFilter struct {
|
||||
ActorID string
|
||||
ResourceKind string
|
||||
ResourceID string
|
||||
Result AuditResult
|
||||
}
|
||||
|
||||
func CopyStringSlice(values []string) []string {
|
||||
if values == nil {
|
||||
return nil
|
||||
@@ -2145,7 +2117,3 @@ func CopyLogBackfillRequest(request LogBackfillRequest) LogBackfillRequest {
|
||||
func CopyLogStream(stream LogStream) LogStream {
|
||||
return stream
|
||||
}
|
||||
|
||||
func CopyAuditEvent(event AuditEvent) AuditEvent {
|
||||
return event
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ This file defines the first platform resource contracts. Concrete Go domain stru
|
||||
|
||||
## Implemented Boundaries
|
||||
|
||||
- Domain constants centralize allowed status, state, provider kind, relay mode, artifact owner, storage backend, and audit result values.
|
||||
- Domain constants centralize allowed status, state, provider kind, relay mode, artifact owner, storage backend, and result summary values.
|
||||
- DTO responses expose AI-provider secret presence only (`apiKeyConfigured`), never the stored reference or raw key material.
|
||||
- Model structs include JSON/database tags and explicit `TableName()` mappings for future persistence work.
|
||||
- `platform/repo.NewFileStore` provides durable local metadata snapshots for platform startup, while `platform/repo.NewMemoryStore` provides deterministic in-memory repository behavior for unit tests and disposable local runs.
|
||||
@@ -193,16 +193,6 @@ Failed or cancelled lifecycle jobs project the server instance to `failed`. Acti
|
||||
- `storageBackend`: `local-segments`, `loki`, `clickhouse`, `opensearch`, or `elasticsearch`.
|
||||
- `retentionPolicy`: retention key.
|
||||
|
||||
## AuditEvent
|
||||
|
||||
- `id`: audit event ID.
|
||||
- `actorId`: user or system actor.
|
||||
- `action`: stable action key.
|
||||
- `resourceKind`: resource kind.
|
||||
- `resourceId`: resource ID.
|
||||
- `result`: `success`, `denied`, `failed`, or `queued`.
|
||||
- `summary`: bounded redacted summary.
|
||||
- `createdAt`: event time.
|
||||
# Client Manager lifecycle aggregates
|
||||
|
||||
`ClientManagerInstallation` owns desired/active/previous artifact and version metadata, target and key/deployment generations, the current job, logical health/last-seen projection, retry/fencing flags, and uninstall history. Valid statuses are `requested`, `building`, `available`, `deploying`, `installed`, `registering`, `online`, `degraded`, `offline`, `updating`, `rolling_back`, `stopping`, `failed`, and `uninstalled`. `ClientManagerSession` is a separate short-lived component identity bound to installation, endpoint, artifact, key generation, and deployment generation; it is not a Run session or lease.
|
||||
|
||||
Reference in New Issue
Block a user