GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — mcpx: owner-only elicitation broker store (0700/0600) with migration on open (#1676) by dezren39 · Pull Request #1724 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: ace892baa0
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| for _, suffix := range []string{"", "-wal", "-shm"} { | ||
| src, dst := legacyPath+suffix, dest+suffix |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Serialize migration before exposing the destination database
When a legacy store has uncheckpointed WAL data (for example, after a daemon crash), concurrent daemon and CLI opens can permanently lose pending questions. This loop publishes elicit.db before moving its -wal and -shm files; another OpenAt then sees the destination, skips migration, and calls Open(dest), which initializes the database without the legacy WAL. Moving the sidecars afterward does not repair that connection and can result in their contents being discarded on close. I reproduced this interleaving with SQLite: a committed pending row disappeared and remained missing after reopening. Protect migration and destination opening with a shared cross-process lock, and only expose a complete, consistent migrated store.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| return nil, err | ||
| } | ||
| return elicit.Open(filepath.Join(dir, "elicit.db")) | ||
| return elicit.OpenAt(a.Paths.State, filepath.Join(dir, "elicit.db")) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Update the e2e seeder to use the relocated store
TestElicitationsCanBeListedAndAnsweredFromTheCommandLine and TestACredentialQuestionIsRoutedToAHuman initialize the store with elicit list, then call seedElicitation in internal/e2e/e2e_test.go:2443–2457. That helper still opens state/logs/elicit.db, whereas this call now initializes only state/elicit/elicit.db. Consequently, both tests fail during seeding because the legacy directory or its elicitations table does not exist, before reaching their assertions. Update the helper to resolve the database through elicit.StorePath; the full test suite run by .github/workflows/mcpx.yml includes these tests.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…t-store # Conflicts: # pkgs/mcpx/docs/spec/conformance-matrix.md
…ed e2e via StorePath (#1676) Codex review on #1724: (P1) concurrent daemon+CLI opens could see the destination DB before its WAL sidecar moved and lose questions that live only in the legacy WAL - OpenAt now holds an flock on the store directory across migration and first open, with a regression test racing concurrent opens against an uncheckpointed-WAL legacy store. (P2) the e2e elicitation seeder still opened state/logs/elicit.db, failing both elicitation e2e tests in CI - it now resolves the store through elicit.StorePath.
|
🤖 Agent note · fixes pushed (queue task 1893, lane B resume) Addressing both Codex findings + the merge conflict, in
Local (laptop) verification: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: badb3628d2
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if err := migrateStore(legacyPath, dest); err != nil { | ||
| if _, derr := os.Stat(dest); derr != nil { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve the complete store when a migration step fails
If migrating the main database succeeds but copying its WAL fails—for example, because a cross-filesystem destination runs out of space—dest already exists, so this branch suppresses the migration error and proceeds to open an incomplete store. Committed questions present only in the WAL can then disappear, and subsequent opens skip migration because the destination exists. Reproducing an interrupted WAL copy with SQLite produced a destination that opened successfully but contained no pending rows, including after reopening. Preserve a recoverable complete source and only open the destination after every required migration step succeeds; destination existence alone does not establish success.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…t-store # Conflicts: # pkgs/mcpx/docs/spec/conformance-matrix.md
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.