Skip to content

fix(container): gracefully handle missing on_wake column#2410

Merged
gavrielc merged 1 commit into
mainfrom
fix/on-wake-graceful-degrade
May 11, 2026
Merged

fix(container): gracefully handle missing on_wake column#2410
gavrielc merged 1 commit into
mainfrom
fix/on-wake-graceful-degrade

Conversation

@gavrielc

Copy link
Copy Markdown
Collaborator

Summary

  • Container opens inbound.db read-only — it can't ALTER TABLE to add the on_wake column
  • If the host hasn't restarted (and run migrateMessagesInTable) after pulling the on-wake PR, the container query crashes on the missing column, causing a restart loop
  • Detects the column via PRAGMA table_info (cached) and conditionally includes the filter clause

Test plan

  • Existing on_wake filtering tests pass (28 tests)
  • Verify container starts cleanly against a pre-migration session DB

🤖 Generated with Claude Code

…tion session DBs

The container opens inbound.db read-only, so it can't ALTER TABLE.
If the host hasn't run migrateMessagesInTable yet (e.g., container
rebuilt before host restart), the on_wake column won't exist and
the query crashes, causing a restart loop.

Detect the column via PRAGMA table_info and conditionally include
the filter clause.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@gavrielc gavrielc requested a review from gabi-simons as a code owner May 11, 2026 08:09
@gavrielc gavrielc merged commit 9dfd68d into main May 11, 2026
2 checks passed
carstenf pushed a commit to carstenf/nanoclaw that referenced this pull request May 11, 2026
Brings in 66 upstream commits including:
  - fix(container): gracefully handle missing on_wake column in pre-
    migration session DBs (nanocoai#2410)
  - feat(db): container_configs table — per-group runtime config moves
    from groups/<folder>/container.json into the central DB, materialized
    to the file at spawn time. One-time backfill on startup migrates
    existing container.json content.
  - feat(cli-scope): scopeField on groups, sessions, destinations,
    members; hardens ncl cross-scope operations.
  - chore: rename remaining qwibitai/nanoclaw references → nanocoai/nanoclaw
  - CI workflow guards + docs cleanup + version bumps to 2.0.56

Conflict resolution in src/group-init.ts: kept upstream's
`ensureContainerConfig(group.id)` + our local `ensureHindsightWired`
call. Rewrote src/group-init-hindsight.ts to use the DB layer
(getContainerConfig / updateContainerConfigJson) instead of the
file-based readContainerConfig / writeContainerConfig that upstream
removed.

Build + 341 host tests pass on the merged tree.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
zenmindhacker pushed a commit to zenmindhacker/nanoclaw that referenced this pull request May 26, 2026
…egrade

fix(container): gracefully handle missing on_wake column
tamasPetki pushed a commit to tamasPetki/nanoclaw that referenced this pull request Jun 4, 2026
…egrade

fix(container): gracefully handle missing on_wake column
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant