§780 readers: take the form the tolerant seat decoders answer
mesh-contracts' K1 regenerated every seat package to answer (value, form, error); the catalog's four callers take the form. Builds: design 47 H2 §780; H-A-350 DMC-4
This commit is contained in:
@@ -172,7 +172,7 @@ func (m *Module) steps(ctx context.Context, args map[string]any) (any, error) {
|
||||
// and by again (§326).
|
||||
if again, _ := args["again"].(bool); !again && fp != "" && m.ReadDetected != nil {
|
||||
if raw, err := m.ReadDetected(key); err == nil && len(raw) > 0 {
|
||||
if kept, err := seat.DecodeDetectedStepsByModuleArtifactValue(raw); err == nil && kept.Fingerprint == fp {
|
||||
if kept, _, err := seat.DecodeDetectedStepsByModuleArtifactValue(raw); err == nil && kept.Fingerprint == fp {
|
||||
return StepsAnswer{Artifact: artifact, Fingerprint: fp, Steps: kept.Steps, Kept: true}, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ func (m *Module) steps(ctx context.Context, args map[string]any) (any, error) {
|
||||
key := seat.DetectedStepsByModuleArtifactKey(str("module"), name)
|
||||
if again, _ := args["again"].(bool); !again && fp != "" && m.ReadDetected != nil {
|
||||
if raw, err := m.ReadDetected(key); err == nil && len(raw) > 0 {
|
||||
if kept, err := seat.DecodeDetectedStepsByModuleArtifactValue(raw); err == nil && kept.Fingerprint == fp {
|
||||
if kept, _, err := seat.DecodeDetectedStepsByModuleArtifactValue(raw); err == nil && kept.Fingerprint == fp {
|
||||
return StepsAnswer{Artifact: artifact, Fingerprint: fp, Steps: kept.Steps, Kept: true}, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ func (r *rig) open(key string) (Condition, bool) {
|
||||
var c Condition
|
||||
if ok {
|
||||
// The seat's layout, read strictly: a field the seat does not name is a fault of the keeper's write.
|
||||
v, err := seat.DecodeConditionsByKeyValue(raw)
|
||||
v, _, err := seat.DecodeConditionsByKeyValue(raw)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("the condition %s is not the seat's layout: %v: %s", key, err, raw))
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (kvHeads) Get(key string) (*HeldHead, error) {
|
||||
if err != nil || e == nil {
|
||||
return nil, err
|
||||
}
|
||||
v, err := seat.DecodeHeadsByRepositoryBranchValue(e.Value)
|
||||
v, _, err := seat.DecodeHeadsByRepositoryBranchValue(e.Value)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("heads %s is not readable: %w", key, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user