Skip to content

fix(engine): harden fallback status ingestion diagnostics and retry classification#57

Open
vadimcomanescu wants to merge 2 commits intodanshapiro:mainfrom
vadimcomanescu:upstream/fix/status-ingestion-fallback-retry
Open

fix(engine): harden fallback status ingestion diagnostics and retry classification#57
vadimcomanescu wants to merge 2 commits intodanshapiro:mainfrom
vadimcomanescu:upstream/fix/status-ingestion-fallback-retry

Conversation

@vadimcomanescu
Copy link

Summary

Improves status ingestion reliability when canonical stage status is missing or invalid by tightening fallback diagnostics and retry classification.

Problem

  • Fallback status ingestion diagnostics were not explicit enough for missing/corrupt/type-mismatched payloads.
  • Retry behavior for fallback reads did not clearly separate transient decode corruption from permanent/unreadable conditions.

Why This Change

Failure classification and retry policy must map to real error modes so operators and automation can act deterministically.

What Changed

  • Hardened fallback status ingestion path and diagnostics in handlers.
  • Added retry policy coverage for transient decode corruption vs permanent read failures.
  • Added explicit tests for canonical precedence, fallback validity, missing fallback, and type mismatch paths.

User-Visible Behavior

  • Better error diagnostics when status fallback ingestion fails.
  • More accurate retry behavior for transient fallback corruption scenarios.
  • Deterministic rejection of invalid fallback payload classes.

Risk

  • Retry classification changes can alter observed retry count/timing.
  • Mitigation: targeted unit coverage for both retryable and non-retryable paths.

Validation

  • gofmt and go vet ./...
  • go test ./internal/attractor/engine -run 'TestCopyFirstValidFallbackStatus_|TestShouldRetryFallbackRead_|TestCodergenStatusIngestion_' -count=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant