JuliusBrussee/caveman · error

session-value promotion artifact has no actions

Error message

session-value promotion artifact has no actions

What it means

ValidateSessionValuePromotionEvidence is the gate from shadow evaluation to live traffic routing. Beyond structural artifact validity it requires per-action evidence floors: at least 100 reward and cost effective samples, quality calibration error <= 0.10, and reward Brier score <= 0.25. An artifact whose Actions slice is empty has nothing promotable and fails immediately with this error before any floor is even evaluated.

Solutions

  1. Keep the artifact in shadow mode until its Actions are non-empty and each clears the floors (>= 100 effective samples, calibration error <= 0.10, Brier <= 0.25).
  2. Regenerate the artifact from the outcome store after shadow traffic has accumulated.
  3. If actions should already exist, debug the artifact generation step that produced an empty list before re-running promotion.

Example fix

// before
if err := routing.ValidateSessionValuePromotionEvidence(artifact); err != nil {
	return err // aborts promotion on an early shadow artifact
}

// after
if len(artifact.Actions) == 0 {
	return fmt.Errorf("artifact still in shadow collection: no actions to promote")
}
if err := routing.ValidateSessionValuePromotionEvidence(artifact); err != nil {
	return err
}
Defensive patterns

Strategy: validation

Validate before calling

// Before promotion: require actions to exist, and pre-check the floors yourself
// so operators get a clear 'still shadow' signal instead of a validation error.
if len(artifact.Actions) == 0 {
	return keepInShadow(artifact) // nothing promotable yet
}
for _, a := range artifact.Actions {
	if a.RewardEffectiveSampleSize < routing.SessionValuePromotionMinEffectiveSamples ||
		a.CostEffectiveSampleSize < routing.SessionValuePromotionMinEffectiveSamples ||
		a.QualityCalibrationError > routing.SessionValuePromotionMaxCalibrationError ||
		a.RewardBrierScore > routing.SessionValuePromotionMaxBrierScore {
		return keepInShadow(artifact)
	}
}

Prevention

When it happens

Trigger: Running the promotion check against a shadow-stage artifact generated before any candidate logged outcomes (Actions empty), or against an artifact whose action list was dropped/filtered during generation. Structurally valid artifacts with zero actions are exactly what shadow mode can produce early on.

Common situations: Promotion pipeline invoked too early after enabling session-value shadow mode; an artifact generator bug that omits the actions array; promoting the wrong artifact stage (pre-training template instead of trained policy).

Related errors


AI-assisted analysis of JuliusBrussee/caveman@766dce6b13 (2026-08-18). Data as JSON: /api/errors/a2b0c4e04c9a8046. Report an issue: GitHub.

Appendix: source

Thrown at proxy/routing/session_value.go:29

	"strings"
	"time"
)

const (
	SessionValueArtifactSchema               = "caveman.router.session-value-policy.v1"
	SessionValueStateSchema                  = "router-state-metadata-v1"
	SessionValueRouterVersion                = "session-value-v1"
	SessionValuePromotionMinEffectiveSamples = 100
	SessionValuePromotionMaxCalibrationError = 0.10
	SessionValuePromotionMaxBrierScore       = 0.25
)

// ValidateSessionValuePromotionEvidence applies evidence floors beyond
// structural artifact validity. Runtime may evaluate a structurally valid
// shadow artifact; traffic promotion requires calibrated sample floors.
func ValidateSessionValuePromotionEvidence(artifact SessionValuePolicyArtifact) error {
	if len(artifact.Actions) == 0 {
		return errors.New("session-value promotion artifact has no actions")
	}
	for _, action := range artifact.Actions {
		if action.RewardEffectiveSampleSize < SessionValuePromotionMinEffectiveSamples ||
			action.CostEffectiveSampleSize < SessionValuePromotionMinEffectiveSamples ||
			action.QualityCalibrationError > SessionValuePromotionMaxCalibrationError ||
			action.RewardBrierScore > SessionValuePromotionMaxBrierScore {
			return fmt.Errorf("session-value action %s lacks promotion evidence", action.ActionID)
		}
	}
	return nil
}

var sessionValueFeatureVocabulary = map[string]struct{}{
	"turn_index": {}, "user_turns": {}, "subagent_turns": {}, "tool_calls": {},
	"corrective_turns": {}, "input_tokens_estimate": {}, "tools_count": {},
	"stream": {}, "json_mode": {}, "vision": {}, "audio": {},
	"cache_read_tokens": {}, "cache_write_tokens": {}, "uncached_tokens": {},
	"cache_age_ms": {}, "spent_session_usd": {}, "budget_remaining_usd": {},

View on GitHub (pinned to 766dce6b13)