Skip to content

feat(core,cli): unified watch with incremental reindex and live schema swap#206

Merged
tonyketcham merged 2 commits into
mainfrom
stack/tonyketcham/feat/unified-watch-effort-graph/unified-watch-incremental-reindex-live-schema-swap--e2519e41
Jul 18, 2026
Merged

feat(core,cli): unified watch with incremental reindex and live schema swap#206
tonyketcham merged 2 commits into
mainfrom
stack/tonyketcham/feat/unified-watch-effort-graph/unified-watch-incremental-reindex-live-schema-swap--e2519e41

Conversation

@tonyketcham

Copy link
Copy Markdown
Collaborator

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]

Depends-On: #205

…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
@tonyketcham

tonyketcham commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 docs(effort-graph): add Effort Graph glossary and ADRs 0001-0007 #205
2 feat(core,cli): unified watch with incremental reindex and live schema swap #206 👈
3 feat(effort-graph): journaled semantic writer for the Effort Graph #207
4 refactor(config): loadConfig returns an initialized LoadedFlatbreadConfig #208
5 refactor(core): single Record-production module owns file→Record and path classification #209
6 refactor(effort-graph): per-mutate snapshot + Decision lifecycle module #210
7 refactor(core): collection query executor owns filter/sort/paging with copy-on-output #211
8 refactor(core,cli): unified watch coordinator behind one seam, two adapters #212
9 refactor(core): per-build schema composer; delete the config-keyed schema cache #213
10 feat(effort-graph,flatbread): committed-generation bridge completes the ADR-0003/0004 contract #214
11 chore(core): drop unused graphql-compose-json and lru-cache dependencies #215
12 test: raise AVA concurrency now that the global-composer pin is obsolete #216
13 docs(agents): define orchestrator-executor operating model #217

@mergify

mergify Bot commented Jul 18, 2026

Copy link
Copy Markdown
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
@tonyketcham

Copy link
Copy Markdown
Collaborator Author

@Mergifyio queue

@mergify

mergify Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-07-18 08:35 UTC · Rule: owner-bypass · triggered by @tonyketcham with the @mergifyio queue command
  • Checks passed · in-place
  • Merged2026-07-18 08:40 UTC · at cc97eee543fd20238e59939ffa34e558d10a24c9

This pull request spent 4 minutes 30 seconds in the queue, including 3 minutes 37 seconds running CI.

Required conditions to merge
  • author = tonyketcham
  • check-success = build (20.x, ubuntu-latest)
  • check-success = build (22.x, ubuntu-latest)
  • check-success = integration-nextjs (20.x, macos-latest)
  • check-success = integration-nextjs (20.x, ubuntu-latest)
  • check-success = integration-nextjs (20.x, windows-latest)
  • check-success = integration-nextjs (22.x, macos-latest)
  • check-success = integration-nextjs (22.x, ubuntu-latest)
  • check-success = integration-nextjs (22.x, windows-latest)
  • check-success = integration-sveltekit (20.x, macos-latest)
  • check-success = integration-sveltekit (20.x, ubuntu-latest)
  • check-success = integration-sveltekit (20.x, windows-latest)
  • check-success = integration-sveltekit (22.x, macos-latest)
  • check-success = integration-sveltekit (22.x, ubuntu-latest)
  • check-success = integration-sveltekit (22.x, windows-latest)
  • check-success = lint (20.x, ubuntu-latest)
  • check-success = lint (22.x, ubuntu-latest)
  • check-success = test (20.x, ubuntu-latest)
  • check-success = test (22.x, ubuntu-latest)
  • depends-on = FlatbreadLabs/flatbread#205 [⛓️ docs(effort-graph): add Effort Graph glossary and ADRs 0001-0007 #205]

@mergify mergify Bot added the queued label Jul 18, 2026
…graph/unified-watch-incremental-reindex-live-schema-swap--e2519e41
@tonyketcham
tonyketcham merged commit 51f7ad1 into main Jul 18, 2026
19 checks passed
@tonyketcham
tonyketcham deleted the stack/tonyketcham/feat/unified-watch-effort-graph/unified-watch-incremental-reindex-live-schema-swap--e2519e41 branch July 18, 2026 08:40
@mergify mergify Bot removed the queued label Jul 18, 2026
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