Skip to content

chore(core): drop unused graphql-compose-json and lru-cache dependencies#215

Merged
tonyketcham merged 2 commits into
mainfrom
stack/tonyketcham/feat/unified-watch-effort-graph/drop-unused-graphql-compose-json-lru-cache-deps--6d9ecf9f
Jul 18, 2026
Merged

chore(core): drop unused graphql-compose-json and lru-cache dependencies#215
tonyketcham merged 2 commits into
mainfrom
stack/tonyketcham/feat/unified-watch-effort-graph/drop-unused-graphql-compose-json-lru-cache-deps--6d9ecf9f

Conversation

@tonyketcham

Copy link
Copy Markdown
Collaborator

PRs #211 and #213 removed the only consumer paths: the nested-provider filter and the config-keyed schema cache. Removing their manifests and lockfile entries keeps @flatbread/core's runtime contract accurate.

Verification: pnpm typecheck; pnpm build; pnpm test:ava (293 passed); pnpm -F @flatbread/codegen exec vitest run (45 passed); pnpm -F @flatbread/utils exec vitest run (7 passed); pnpm lint:fix:fast.
Co-authored-by: Cursor [email protected]

Depends-On: #214

@tonyketcham

tonyketcham commented Jul 18, 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

cursor Bot pushed a commit that referenced this pull request Jul 18, 2026
Two CI failures on PR #215 (same root causes as #214):

1. liveServerEffortGraph.test.ts crashed with ERR_DLOPEN_FAILED on the
   watcher.node native addon when run after liveServer.test.ts. AVA 4
   uses worker_threads; a native NAPI addon loaded in one worker leaves
   process-level state that prevents re-initialization in the next worker.
   Fix: move the @parcel/watcher import from the static top-level import
   in liveServer.ts to a dynamic import() inside the if (options.watch)
   branch.

2. live-bridge.test.ts › no journal publish before the live reindex
   commits failed with ENOENT on .journal/txns. The polling loop called
   readdir() without a try/catch; if mutate()'s async chain had not yet
   run recoverJournal() (which creates the directory) within the first
   poll window, the uncaught error failed the test. Fix: wrap readdir in
   try/catch and continue polling on ENOENT. Also increase budget from
   20*5 ms to 50*10 ms (500 ms total) for headroom on slow CI runners.

Change-Id: I4628b7b19c887384574f4b0e689266ef6fcdffc2
@tonyketcham
tonyketcham force-pushed the stack/tonyketcham/feat/unified-watch-effort-graph/drop-unused-graphql-compose-json-lru-cache-deps--6d9ecf9f branch from 686d768 to 3a695d7 Compare July 18, 2026 02:33
@tonyketcham

tonyketcham commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator Author

Revision history

# Type Changes Reason Date
1 initial 686d768 2026-07-18 02:33 UTC
2 content 686d768 → 3a695d7 (raw) 2026-07-18 02:33 UTC
3 rebase 3a695d7 → 0b8d6b0 (rebase only) 2026-07-18 07:37 UTC

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI Fix Applied

Root cause: Two pre-existing test failures were inherited from the parent commit e15042a (PR #214) and carried through into this PR's commit 3a695d7.

Failing checks

  • test (20.x, ubuntu-latest): 1 test failed (live-bridge.test.ts) + 1 uncaught exception (liveServerEffortGraph.test.ts)
  • test (22.x, ubuntu-latest): 1 uncaught exception (liveServerEffortGraph.test.ts)

Issue 1 — ERR_DLOPEN_FAILED in liveServerEffortGraph.test.ts

The static top-level import { subscribe } from '@parcel/watcher' in liveServer.ts caused a native NAPI addon (watcher.node) to load in the first AVA worker. AVA 4 uses worker_threads; once the addon is loaded in one worker it cannot be re-initialized in a second worker, crashing liveServerEffortGraph.test.ts with Module did not self-register.

Fix: Moved subscribe to a dynamic await import('@parcel/watcher') inside the if (options.watch) block — the addon is now never loaded in workers that don't use watch mode.

Issue 2 — ENOENT on .journal/txns in live-bridge.test.ts

The polling loop in the no journal publish before the live reindex commits test called readdir() on .journal/txns without a try/catch. On slow CI runners the recoverJournal() call (which creates the directory) had not completed within the first 5 ms window, causing an uncaught ENOENT.

Fix: Wrapped readdir in try/catch and continue on ENOENT. Also increased the budget from 20 × 5 ms to 50 × 10 ms (500 ms total) for headroom on slow runners.

Verification

Full AVA suite ran locally: 293 tests passed, no failures.

Commit pushed

Fix commit 686d768 was pushed to this PR's branch. These two issues were also previously fixed for PR #214 — the fix should ideally be incorporated into commit e15042a (which introduced both the liveServer.ts static import and the live-bridge.test.ts polling loop) using mergify stack push when credentials are available.

Open in Web View Automation 

Sent by Cursor Automation: Flatbread - Fix CI

PRs #211 and #213 removed the only consumer paths: the nested-provider filter and the config-keyed schema cache. Removing their manifests and lockfile entries keeps @flatbread/core's runtime contract accurate.

Verification: pnpm typecheck; pnpm build; pnpm test:ava (293 passed); pnpm -F @flatbread/codegen exec vitest run (45 passed); pnpm -F @flatbread/utils exec vitest run (7 passed); pnpm lint:fix:fast.
Co-authored-by: Cursor <[email protected]>
Change-Id: I6d9ecf9f45aea182e7a94ebfb962c46425167892
@tonyketcham
tonyketcham force-pushed the stack/tonyketcham/feat/unified-watch-effort-graph/committed-gen-bridge-completes-adr-0003-0004--a531b2eb branch from e15042a to a3ee014 Compare July 18, 2026 07:36
@tonyketcham
tonyketcham force-pushed the stack/tonyketcham/feat/unified-watch-effort-graph/drop-unused-graphql-compose-json-lru-cache-deps--6d9ecf9f branch from 3a695d7 to 0b8d6b0 Compare July 18, 2026 07:36
@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:36 UTC · Rule: owner-bypass · triggered by @tonyketcham with the @mergifyio queue command
  • Checks passed · in-place
  • Merged2026-07-18 09:24 UTC · at 99a6e0a13d6a7ef9cec44125bee16daa609f0cf9

This pull request spent 47 minutes 56 seconds in the queue, including 4 minutes 34 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#214 [⛓️ feat(effort-graph,flatbread): committed-generation bridge completes the ADR-0003/0004 contract #214]

@mergify mergify Bot added the queued label Jul 18, 2026
Base automatically changed from stack/tonyketcham/feat/unified-watch-effort-graph/committed-gen-bridge-completes-adr-0003-0004--a531b2eb to main July 18, 2026 09:20
…graph/drop-unused-graphql-compose-json-lru-cache-deps--6d9ecf9f
@tonyketcham
tonyketcham merged commit d8cb214 into main Jul 18, 2026
19 checks passed
@tonyketcham
tonyketcham deleted the stack/tonyketcham/feat/unified-watch-effort-graph/drop-unused-graphql-compose-json-lru-cache-deps--6d9ecf9f branch July 18, 2026 09:24
@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