feat(core,cli): unified watch with incremental reindex and live schema swap#206
Merged
Conversation
…a swap Implements the "Draft unified watch design" from docs/local-dev-loop.md and the ADR-0003 live-reindex dependency (closes the gap tracked in #65). - core: buildContentGraph/patchContentGraph build an indexed snapshot of the content graph and patch it from changed paths only (re-reading changed files plus ref-affected neighbors); createLiveSchemaReloader serializes reloads, publishes monotonic generation tokens, exposes waitForGeneration and a ReindexBarrier seam, and keeps the prior schema on any validation failure; generateSchema accepts a prebuilt content graph and a schema-cache bypass for live mode - source-filesystem: fetchPaths reads only requested files with capture metadata parity against the directory-walk path - codegen: watch-pattern derivation factored into exported deriveFlatbreadWatchPatterns/flattenFlatbreadWatchPatterns - flatbread: startGraphqlServer keeps one Express listener and atomically swaps a delegating Apollo middleware per committed generation, draining in-flight requests against the old schema; @parcel/watcher + picomatch drive content/config/document classification; `flatbread start --watch` threads through the CLI runner as FLATBREAD_WATCH - tests: reloader unit suite over a fake source, fetchPaths suite, watch-pattern suite, and liveServer integration tests including the two promised in docs/local-dev-loop.md (stale-until-restart without watch; edit-to-live-update with watch on one port) Co-authored-by: Cursor <[email protected]> Change-Id: Ie2519e41d8f064eca3d05fa98209f09e4adf9e1b
Collaborator
Author
|
This pull request is part of a Mergify stack:
|
This was referenced Jul 17, 2026
Merged
Merged
Contributor
|
Queued — the merge queue status continues in this comment ↓. |
Base automatically changed from
stack/tonyketcham/feat/unified-watch-effort-graph/add-effort-graph-glossary-adrs-0001-0007--6cb5cefc
to
main
July 18, 2026 08:34
Collaborator
Author
|
@Mergifyio queue |
Contributor
Merge Queue Status
This pull request spent 4 minutes 30 seconds in the queue, including 3 minutes 37 seconds running CI. Required conditions to merge
|
…graph/unified-watch-incremental-reindex-live-schema-swap--e2519e41
tonyketcham
deleted the
stack/tonyketcham/feat/unified-watch-effort-graph/unified-watch-incremental-reindex-live-schema-swap--e2519e41
branch
July 18, 2026 08:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the "Draft unified watch design" from docs/local-dev-loop.md and
the ADR-0003 live-reindex dependency (closes the gap tracked in #65).
content graph and patch it from changed paths only (re-reading changed
files plus ref-affected neighbors); createLiveSchemaReloader serializes
reloads, publishes monotonic generation tokens, exposes waitForGeneration
and a ReindexBarrier seam, and keeps the prior schema on any validation
failure; generateSchema accepts a prebuilt content graph and a schema-cache
bypass for live mode
metadata parity against the directory-walk path
deriveFlatbreadWatchPatterns/flattenFlatbreadWatchPatterns
swaps a delegating Apollo middleware per committed generation, draining
in-flight requests against the old schema; @parcel/watcher + picomatch
drive content/config/document classification;
flatbread start --watchthreads through the CLI runner as FLATBREAD_WATCH
watch-pattern suite, and liveServer integration tests including the two
promised in docs/local-dev-loop.md (stale-until-restart without watch;
edit-to-live-update with watch on one port)
Co-authored-by: Cursor [email protected]
Depends-On: #205