fix: make orchestrator teardown timeout configurable #436

Merged
didericis merged 4 commits from fix/orchestrator-teardown-timeout into main 2026-07-21 00:41:01 -04:00

4 Commits

Author SHA1 Message Date
didericis-claude 256a4b262d refactor(config_store): replace generic key/value table with explicit schema
tracker-policy-pr / check-pr (pull_request) Successful in 13s
test / integration-docker (pull_request) Successful in 16s
lint / lint (push) Successful in 52s
test / unit (pull_request) Successful in 1m39s
test / stage-firecracker-inputs (pull_request) Successful in 3s
test / build-infra (pull_request) Successful in 3m42s
test / integration-firecracker (pull_request) Successful in 1m34s
test / coverage (pull_request) Successful in 1m34s
test / publish-infra (pull_request) Has been skipped
Switch orchestrator_config from a generic key/text store to a typed
single-row table with a dedicated teardown_timeout_seconds REAL column.
The CHECK (id = 1) constraint enforces at most one config row.

Remove TEARDOWN_TIMEOUT_KEY constant; update OrchestratorConfigStore to
expose get/set/delete_teardown_timeout_seconds() instead of the generic
get/set/delete(key). Resolving the DB value in resolve_teardown_timeout()
no longer needs a float() conversion since the column is already REAL.
2026-07-21 04:26:44 +00:00
didericis-codex 3057043142 test(orchestrator): satisfy config store type checking
test / integration-docker (pull_request) Successful in 19s
tracker-policy-pr / check-pr (pull_request) Successful in 21s
test / unit (pull_request) Successful in 45s
lint / lint (push) Successful in 57s
test / stage-firecracker-inputs (pull_request) Successful in 3s
test / build-infra (pull_request) Successful in 3m46s
test / integration-firecracker (pull_request) Successful in 1m35s
test / coverage (pull_request) Successful in 2m13s
test / publish-infra (pull_request) Has been skipped
2026-07-21 04:17:16 +00:00
didericis-claude 31000dcbe3 fix: resolve teardown timeout before registration to prevent orphaned state
tracker-policy-pr / check-pr (pull_request) Successful in 12s
test / integration-docker (pull_request) Successful in 15s
test / unit (pull_request) Successful in 39s
test / stage-firecracker-inputs (pull_request) Successful in 1s
lint / lint (push) Failing after 2m36s
test / build-infra (pull_request) Successful in 4m13s
test / integration-firecracker (pull_request) Successful in 1m30s
test / coverage (pull_request) Successful in 2m12s
test / publish-infra (pull_request) Has been skipped
If resolve_teardown_timeout() raised after launch_consolidated()/register_agent()
returned, the teardown callback was never registered, leaving the bottle
registered with no cleanup path. Resolve the timeout into a local variable
before the registration call so any failure aborts before the bottle exists.

Add tests covering OrchestratorConfigStore, resolve_teardown_timeout priority
ordering (env > db > default), and the source-order invariant that the resolver
runs before registration in all three backends.
2026-07-21 04:09:20 +00:00
didericis-claude 3674d7780b fix: make orchestrator teardown timeout configurable (closes #435)
test / stage-firecracker-inputs (pull_request) Successful in 3s
test / integration-docker (pull_request) Successful in 8s
tracker-policy-pr / check-pr (pull_request) Successful in 8s
test / unit (pull_request) Successful in 30s
lint / lint (push) Successful in 44s
test / build-infra (pull_request) Successful in 9m58s
test / integration-firecracker (pull_request) Successful in 1m32s
test / coverage (pull_request) Failing after 2m7s
test / publish-infra (pull_request) Has been skipped
Resolves via ENV VAR -> orchestrator DB config -> default (30 s, up from 5 s):
  BOT_BOTTLE_ORCHESTRATOR_TEARDOWN_TIMEOUT_SECONDS
  teardown_timeout_seconds key in new orchestrator_config table (bot-bottle.db)

New OrchestratorConfigStore (same DbStore/TableMigrations pattern as the
registry) stores the DB-level setting. resolve_teardown_timeout() implements
the priority chain and is called at stack.callback registration time in all
three backends (macos_container, docker, firecracker).
2026-07-20 18:33:03 -04:00