Skip to content

feat(engine): write graph-wide receipt to ~/.enola/receipt.json - #76

Merged
dejo1307 merged 2 commits into
mainfrom
feat/global-graph-receipt
Jul 8, 2026
Merged

feat(engine): write graph-wide receipt to ~/.enola/receipt.json#76
dejo1307 merged 2 commits into
mainfrom
feat/global-graph-receipt

Conversation

@dejo1307

@dejo1307 dejo1307 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Add a global receipt describing the CURRENT multi-repo "graph of graphs": which repositories compose it, each repo's git commit/ref/dirty state, when each entered the graph and how long it has been a member, and what the graph consists of right now (fact/insight counts, cross-repo services and edges, coverage). Complements the existing per-repo /.enola/receipt.json.

  • New GraphReceipt/GraphRepoEntry types (internal/facts/model.go)
  • Engine.WriteGlobalReceipt(): per-repo git capture across every repo in the graph, merge-forward of added_at (preserved across regenerations; a moved commit keeps added_at and stamps commit_changed_at), atomic temp-file+rename write, graceful degradation when $HOME is unavailable (internal/engine/global_receipt.go)
  • service_count / cross_repo_edge_count describe the graph-of-graphs topology (edges counted from service-node depends_on relations, not total dep facts)
  • Store.CountByRepo() for O(1) per-repo fact counts (internal/facts/store.go)
  • Wire into CLI --generate and the MCP generate_snapshot handler (non-fatal)
  • Unit tests: merge-forward, commit-change, departed-repo, single-repo fallback, atomic write/read, cross-repo edge count

dejo1307 added 2 commits July 8, 2026 11:33
Add a global receipt describing the CURRENT multi-repo "graph of graphs":
which repositories compose it, each repo's git commit/ref/dirty state, when
each entered the graph and how long it has been a member, and what the graph
consists of right now (fact/insight counts, cross-repo services and edges,
coverage). Complements the existing per-repo <repo>/.enola/receipt.json.

- New GraphReceipt/GraphRepoEntry types (internal/facts/model.go)
- Engine.WriteGlobalReceipt(): per-repo git capture across every repo in the
  graph, merge-forward of added_at (preserved across regenerations; a moved
  commit keeps added_at and stamps commit_changed_at), atomic temp-file+rename
  write, graceful degradation when $HOME is unavailable
  (internal/engine/global_receipt.go)
- service_count / cross_repo_edge_count describe the graph-of-graphs topology
  (edges counted from service-node depends_on relations, not total dep facts)
- Store.CountByRepo() for O(1) per-repo fact counts (internal/facts/store.go)
- Wire into CLI --generate and the MCP generate_snapshot handler (non-fatal)
- Unit tests: merge-forward, commit-change, departed-repo, single-repo
  fallback, atomic write/read, cross-repo edge count
@dejo1307
dejo1307 merged commit 49e8afb into main Jul 8, 2026
4 checks passed
@dejo1307
dejo1307 deleted the feat/global-graph-receipt branch July 18, 2026 06:54
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