Add a best-effort accepted-artifact filesystem cache

This commit is contained in:
2026-11-22 01:52:21 +00:00
parent 37e0753472
commit 3ef55b1cf0
5 changed files with 477 additions and 0 deletions

View File

@@ -21,6 +21,15 @@ const (
CacheRefresh CacheMode = "refresh"
)
// ArtifactCache stores accepted artifact bytes under an opaque native message
// hash. A nil lookup is a miss. Other lookup/write errors are diagnostic data,
// not reasons to fail otherwise successful production. Callers own typed codec
// and source-usability checks and must never store rejected or fallback output.
type ArtifactCache interface {
Lookup(context.Context, CacheMode, string) ([]byte, error)
Store(context.Context, CacheMode, string, []byte) error
}
// ProducerControls is resolved before execution; modules do not inherit settings.
type ProducerControls struct {
Mode ExecutionMode `json:"mode"`