boot: reconcile fast-forward does not re-open the store snapshot, so in-memory state is built from the pre-reconcile tree
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- git, typescript
調査の方向性
buildApp の store → reconcile → services の登録から始め、reloadInMemoryStateAndFts と比較してください。apps/api/tests/internal-reload.test.ts を読み、特に再インポートテストと、その起動前の fetch workaround を確認してください。再利用された clone に、services の初期化前に reconcile によって導入されたレコードを含むインメモリ状態と FTS が生成されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What
buildApp registers the plugins in this order: store (opens the gitsheets public store; each Sheet caches a dataTree snapshot at open time) → reconcile (fetch + fast-forward/rebase against origin/<CFP_DATA_BRANCH>) → services (builds InMemoryState + FTS from fastify.store.public).
When the local bare clone is behind origin at boot, reconcile fast-forwards the branch, but nothing calls Store.swapPublic afterwards. services then builds the in-memory state from the Sheet snapshots captured before the fast-forward. Records that arrived in the fast-forward are invisible until the next hot-reload webhook or a restart.
The hot-reload path (reloadInMemoryStateAndFts) already handles this correctly by re-opening the public store after reconcile. The boot path skips that step.
Why it hasn't bitten
Production pods bare-clone the data repo on every boot (emptyDir volume), so the clone is in sync with origin by the time reconcile runs and the outcome is in-sync. The gap only shows when a clone is reused across boots: local dev, and tests that seed the remote after creating the rig (see the re-import test in apps/api/tests/internal-reload.test.ts, which works around it with an explicit git fetch origin main:main before boot).
Fix sketch
In the reconcile plugin (or a small step between it and services), when the outcome is anything other than in-sync/fetch-failed, re-open the public store and fastify.store.swapPublic(freshPublic) before services reads it. Or reorder so the store opens after reconcile; reconcile only needs the repo path and the lock, not the Sheet handles.
Found while working on the hot-reload stale-indices fix (fix/hot-reload-stale-indices); out of scope there.
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 1
- 平均マージ
- 11分
- マージ済み PR(30日)
- 22
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeForPhilly/codeforphilly-ng のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
CodeForPhilly/codeforphilly-ng#178 ·
メンテナーはふだん 1 日以内に返信
-
MarkdownEditor toolbar: use Radix Toolbar from radix-ui instead of the hand-rolled roving tabindexオープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
CodeForPhilly/codeforphilly-ng#169 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
CodeForPhilly/codeforphilly-ng#89 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
CodeForPhilly/codeforphilly-ng#87 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
CodeForPhilly/codeforphilly-ng#50 ·
メンテナーはふだん 1 日以内に返信
CodeForPhilly/codeforphilly-ng の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
rohitg00/agentmemory#1428 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
boxlite-ai/boxlite#1729 ·
メンテナーはふだん 1 日以内に返信
-
detectors enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
SM260845/readme-gen#1 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
angular/angularfire#3774 ·
メンテナーはふだん 2 日以内に返信