fix: enforce cleanup and secret integrity
test / integration-docker (pull_request) Has been cancelled
test / unit (pull_request) Successful in 2m57s
test / coverage (pull_request) Has been skipped
test / image-input-builds (pull_request) Failing after 12m46s
tracker-policy-pr / check-pr (pull_request) Successful in 10s

This commit is contained in:
2026-07-27 03:55:04 +00:00
parent d29777bd96
commit f0f14ea5de
19 changed files with 206 additions and 101 deletions
@@ -224,6 +224,17 @@ class TestAgentSecrets(unittest.TestCase):
reopened = RegistryStore(self.db)
self.assertEqual({"K": "v"}, reopened.get_agent_secrets("bottle-1"))
def test_v6_migration_clears_legacy_secret_rows(self) -> None:
self.store.store_agent_secrets("bottle-1", {"K": "legacy"})
with closing(sqlite3.connect(self.db)) as conn:
conn.execute(
"UPDATE schema_versions SET version = 5 "
"WHERE module = 'orchestrator_registry'"
)
conn.commit()
self.store.migrate()
self.assertEqual({}, self.store.get_agent_secrets("bottle-1"))
class TestReapAbsent(unittest.TestCase):
"""`reap_absent` — the self-heal for rows whose bottle is gone.