Skip to content

feat(effort-graph): journaled semantic writer for the Effort Graph#207

Merged
tonyketcham merged 2 commits into
mainfrom
stack/tonyketcham/feat/unified-watch-effort-graph/journaled-semantic-writer-effort-graph--4bd555ef
Jul 18, 2026
Merged

feat(effort-graph): journaled semantic writer for the Effort Graph#207
tonyketcham merged 2 commits into
mainfrom
stack/tonyketcham/feat/unified-watch-effort-graph/journaled-semantic-writer-effort-graph--4bd555ef

Conversation

@tonyketcham

Copy link
Copy Markdown
Collaborator

New package @flatbread/effort-graph implementing ADRs 0002-0006: the
standalone write surface for the Effort Graph, independent of core's
read-only GraphQL layer.

  • thirteen v1 semantic mutations (ADR-0005) as a Zod discriminated union,
    validated against a committed index (targets exist, lifecycle transitions
    legal, same-Effort edges)
  • hybrid IDs (ADR-0006): kind prefix + kebab slug (<=48 chars) + 16-char
    lowercase Crockford-base32 80-bit suffix
  • forward-canonical edges with materialized back-edge projections written in
    the same save group (ADR-0004); canonical frontmatter key order and sorted
    edge arrays for merge-friendly YAML
  • write-ahead journal (ADR-0004): fsync-ordered intent record with
    before/after images, same-directory temp-file+rename applies with writer
    lock verification before each rename, committed/published markers,
    atomically published generation counter, idempotent crash recovery
    (uncommitted -> rollback, committed -> complete + reindex + publish)
  • per-graph writer lock with lease expiry and stale-lock reclamation
  • injectable EffortGraphIndexer seam for the future live-reindex bridge;
    no-op default keeps the writer standalone
  • effortGraphContent() preset exposing the six collections under
    .flatbread-efforts/ (polymorphic edge fields intentionally left out of
    refs until union refs land in core)
  • 33 AVA tests: ids, schemas + transformer-markdown round-trip, per-mutation
    file expansion, journal crash recovery, lock contention, preset shape

Co-authored-by: Cursor [email protected]

Depends-On: #206

New package @flatbread/effort-graph implementing ADRs 0002-0006: the
standalone write surface for the Effort Graph, independent of core's
read-only GraphQL layer.

- thirteen v1 semantic mutations (ADR-0005) as a Zod discriminated union,
  validated against a committed index (targets exist, lifecycle transitions
  legal, same-Effort edges)
- hybrid IDs (ADR-0006): kind prefix + kebab slug (<=48 chars) + 16-char
  lowercase Crockford-base32 80-bit suffix
- forward-canonical edges with materialized back-edge projections written in
  the same save group (ADR-0004); canonical frontmatter key order and sorted
  edge arrays for merge-friendly YAML
- write-ahead journal (ADR-0004): fsync-ordered intent record with
  before/after images, same-directory temp-file+rename applies with writer
  lock verification before each rename, committed/published markers,
  atomically published generation counter, idempotent crash recovery
  (uncommitted -> rollback, committed -> complete + reindex + publish)
- per-graph writer lock with lease expiry and stale-lock reclamation
- injectable EffortGraphIndexer seam for the future live-reindex bridge;
  no-op default keeps the writer standalone
- effortGraphContent() preset exposing the six collections under
  .flatbread-efforts/ (polymorphic edge fields intentionally left out of
  refs until union refs land in core)
- 33 AVA tests: ids, schemas + transformer-markdown round-trip, per-mutation
  file expansion, journal crash recovery, lock contention, preset shape

Co-authored-by: Cursor <[email protected]>
Change-Id: I4bd555ef4e13a2d7d5933f1abb9e538fa04e5237
@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

@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:46 UTC · at d07f62947780ad4533b64ed2aed1d831f2454a07

This pull request spent 10 minutes 45 seconds in the queue, including 5 minutes 35 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#206 [⛓️ feat(core,cli): unified watch with incremental reindex and live schema swap #206]

@mergify mergify Bot added the queued label Jul 18, 2026
Base automatically changed from stack/tonyketcham/feat/unified-watch-effort-graph/unified-watch-incremental-reindex-live-schema-swap--e2519e41 to main July 18, 2026 08:40
…graph/journaled-semantic-writer-effort-graph--4bd555ef
@tonyketcham
tonyketcham merged commit 884b2de into main Jul 18, 2026
19 checks passed
@tonyketcham
tonyketcham deleted the stack/tonyketcham/feat/unified-watch-effort-graph/journaled-semantic-writer-effort-graph--4bd555ef branch July 18, 2026 08:46
@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