package backup // definitionAdmitter is the R-971 question a restore asks BEFORE it stops the app: would the unit's (or the snapshot's) // compose, rendered with the restore's env, pass the box's catalog allow-list? Implemented by main.go's stackAdapter; // a provider without it (the test fakes) asks nothing. A refusal leaves the live app running and untouched. type definitionAdmitter interface { AdmitDefinitionFromUnit(name, composeSrcDir string, fullEnv map[string]string) error } // admitRestoredDefinition asks the provider when it can answer; nil when it cannot. func (m *Manager) admitRestoredDefinition(name, composeSrcDir string, env map[string]string) error { if a, ok := m.stackProvider.(definitionAdmitter); ok { return a.AdmitDefinitionFromUnit(name, composeSrcDir, env) } return nil }