Title: mcpx(daemon): task-store Open failure silently falls back to in-memory — durability claimed by PR #1575 can vanish with no log line · Issue #2007 · developing-today/code · GitHub
Open Graph Title: mcpx(daemon): task-store Open failure silently falls back to in-memory — durability claimed by PR #1575 can vanish with no log line · Issue #2007 · developing-today/code
X Title: mcpx(daemon): task-store Open failure silently falls back to in-memory — durability claimed by PR #1575 can vanish with no log line · Issue #2007 · developing-today/code
Description: Finding daemon.Server.taskStore() (pkgs/mcpx/internal/daemon/ops.go, current main 77918e0f) opens the durable SQLite task store and drops the error unconditionally: if s.paths.State != "" { dbPath := filepath.Join(s.paths.State, "tasks.d...
Open Graph Description: Finding daemon.Server.taskStore() (pkgs/mcpx/internal/daemon/ops.go, current main 77918e0f) opens the durable SQLite task store and drops the error unconditionally: if s.paths.State != "" { dbPath ...
X Description: Finding daemon.Server.taskStore() (pkgs/mcpx/internal/daemon/ops.go, current main 77918e0f) opens the durable SQLite task store and drops the error unconditionally: if s.paths.State != ""...
Opengraph URL: https://github.com/developing-today/code/issues/2007
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx(daemon): task-store Open failure silently falls back to in-memory — durability claimed by PR #1575 can vanish with no log line","articleBody":"## Finding\n\n`daemon.Server.taskStore()` (`pkgs/mcpx/internal/daemon/ops.go`, current main `77918e0f`) opens the durable SQLite task store and **drops the error unconditionally**:\n\n```go\nif s.paths.State != \"\" {\n dbPath := filepath.Join(s.paths.State, \"tasks.db\")\n if store, err := tasks.Open(dbPath); err == nil {\n s.tasks = store\n }\n}\nif s.tasks == nil {\n s.tasks = tasks.New() // in-memory fallback, no log, no record\n}\n```\n\nThere is no log call anywhere in the function. The daemon has a logger and uses it for exactly this kind of degradation elsewhere (`pkgs/mcpx/internal/daemon/server.go`: `opts.Logger.Printf(\"elicitation disabled: %v\", berr)`), but a failed task-store open is completely silent. Because creation is `sync.Once`, the fallback is also **sticky for the life of the process**: a transient failure at first use downgrades the daemon permanently, with no retry.\n\n## Evidence\n\n- PR: https://github.com/developing-today/code/pull/1575 (merged, commits `508fb8be`, `516df392`) — \"one durable task store across MCP and /v1, Phase 1 of #1554\". It wired this store into the MCP surface (`internal/cli/root.go`: `a.daemonStore = srv.TaskStore()`, called eagerly at daemon startup; `internal/cli/serve.go`: `srv.TaskStore = a.daemonStore`) and **closed the conformance gap** `ext-tasks-durable-before-response` in `pkgs/mcpx/docs/spec/conformance-matrix.md` on the strength of this store (\"the task store is an in-memory map; a task does not survive the daemon\" → now marked tested via `TestInjectedStoreKeepsMCPTasksAcrossReopen`).\n- `tasks.Open` (`pkgs/mcpx/internal/tasks/tasks.go:148-166`) returns real errors: `os.MkdirAll` failure on the state dir, `initDB` schema-exec failure, and `loadTasksFromDB` query failure — i.e. an unwritable state directory or a **corrupt `tasks.db`** both reach the silent branch.\n- Verified on current main `77918e0f` (2026-10-28): the function is byte-identical; no logging, no metric, no status surface records the fallback. Deduped against open + closed issues 2026-10-28: no issue covers this fallback (the silent in-memory fallback for `/v1` predates #1575; #1575 is what extended it to MCP tasks and based a conformance closure on it).\n\n## Why it matters\n\nWhen the open fails, three things go wrong at once, all invisibly:\n\n1. Every task already persisted in `tasks.db` becomes unreachable — the daemon never opened the file, so MCP and `/v1` both report those tasks as unknown.\n2. Every new task is memory-only and evaporates on daemon restart — precisely the failure the conformance matrix now says is covered.\n3. Nobody can diagnose it: no log line names the path or the error, so the symptom (\"tasks disappeared\") has no on-box evidence trail.\n\n## Acceptance criteria\n\n- [ ] A failed `tasks.Open` in `taskStore()` is logged once via the daemon logger (`s.logger`), naming the db path and the underlying error, before the in-memory fallback is installed.\n- [ ] A regression test pins it: a daemon server whose `tasks.db` cannot be opened (e.g. corrupt file contents or an unusable state path) falls back **and** emits the log line; the successful-open path stays silent-or-unchanged and still returns the one shared store instance.\n- [ ] The fallback remains a fallback (daemon keeps serving) — this issue asks for visibility, not a hard failure.\n- [ ] Existing task-store tests keep passing (`internal/daemon/taskstore_shared_test.go`, `internal/mcpserver/tasks_shared_store_test.go`).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-28T23:55:50Z","url":"https://github.com/developing-today/code/issues/2007"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2a4a0e13-5ebb-a960-9ade-7d146302433b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E59C:1D51B:37504F:4F11F0:6B064EB3 |
| html-safe-nonce | f39514db96d87ec95916c0ecc852004babcd950855f3044a465b6f3f8071c092 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTlDOjFENTFCOjM3NTA0Rjo0RjExRjA6NkIwNjRFQjMiLCJ2aXNpdG9yX2lkIjoiMTQ2MzI4Mjk4NTc0MTk5NTY5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f3d2f9874efc1114957bf6f0281afb119dbafcdff779260aa20df9c54644124c |
| hovercard-subject-tag | issue:6089744792 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/2007/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8c9205f4c7fa9851b85307e5c337bc159519fbcd3bfc29a49c547697dec8bf3f/developing-today/code/issues/2007 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8c9205f4c7fa9851b85307e5c337bc159519fbcd3bfc29a49c547697dec8bf3f/developing-today/code/issues/2007 |
| og:image:alt | Finding daemon.Server.taskStore() (pkgs/mcpx/internal/daemon/ops.go, current main 77918e0f) opens the durable SQLite task store and drops the error unconditionally: if s.paths.State != "" { dbPath ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 772b6997ca4daa0428dd49a25d76052e765555ae560fe9c88517eb828bbd861e |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f1f9a08f7c769a37f1dfc18ad43d463c222a7eea |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width