Internal

internal/core/reviewmaterial

Package reviewmaterial projects the task-owned material surface shared by status, handoff, and API-style adapters.

import "github.com/nilstate/scafld/v2/internal/core/reviewmaterial"

Package reviewmaterial projects the task-owned material surface shared by status, handoff, and API-style adapters.

Constants

Source: internal/core/reviewmaterial/projection.go:17

const (
	StatusUnchanged                   = "unchanged"
	StatusChanged                     = "changed"
	StatusCurrentUnavailable          = "current_unavailable"
	StatusReviewedMaterialUnavailable = "reviewed_material_unavailable"
	StatusUnreviewed                  = "unreviewed"
)

Functions

func Project(input Input) Projection

Source: internal/core/reviewmaterial/projection.go:48

Project derives the shared task-material read model.

Types

type Input

Source: internal/core/reviewmaterial/projection.go:25

Input is the complete read-only material projection input.

type Input struct {
	Model                    spec.Model
	Ledger                   session.Session
	CurrentSnapshot          []string
	HasCurrentSnapshot       bool
	Authority                reviewgate.Authority
	CurrentMaterialDigest    string
	HasCurrentMaterialDigest bool
}
Fields
  • Model spec.Model
  • Ledger session.Session
  • CurrentSnapshot []string
  • HasCurrentSnapshot bool
  • Authority reviewgate.Authority
  • CurrentMaterialDigest string
  • HasCurrentMaterialDigest bool

type Projection

Source: internal/core/reviewmaterial/projection.go:36

Projection describes the task-owned workspace surface and its review freshness.

type Projection struct {
	Scope                  []string `json:"scope,omitempty"`
	BaselinePaths          []string `json:"baseline_paths,omitempty"`
	TaskChanges            []string `json:"task_changes,omitempty"`
	AmbientDrift           []string `json:"ambient_drift,omitempty"`
	ReviewedScope          []string `json:"reviewed_scope,omitempty"`
	ReviewedMaterialDigest string   `json:"reviewed_material_digest,omitempty"`
	CurrentMaterialDigest  string   `json:"current_material_digest,omitempty"`
	MaterialStatus         string   `json:"material_status,omitempty"`
}
Fields
  • Scope []string `json:"scope,omitempty"`
  • BaselinePaths []string `json:"baseline_paths,omitempty"`
  • TaskChanges []string `json:"task_changes,omitempty"`
  • AmbientDrift []string `json:"ambient_drift,omitempty"`
  • ReviewedScope []string `json:"reviewed_scope,omitempty"`
  • ReviewedMaterialDigest string `json:"reviewed_material_digest,omitempty"`
  • CurrentMaterialDigest string `json:"current_material_digest,omitempty"`
  • MaterialStatus string `json:"material_status,omitempty"`

func Empty() bool

Source: internal/core/reviewmaterial/projection.go:77

Empty reports whether the projection has no useful material evidence.