Skip to content

Unify acquired graph reads and operation-scoped configuration - #11

Merged
hlubek merged 11 commits into
mainfrom
codex/acquired-graph-views
Sep 7, 2026
Merged

Unify acquired graph reads and operation-scoped configuration#11
hlubek merged 11 commits into
mainfrom
codex/acquired-graph-views

Conversation

@hlubek

@hlubek hlubek commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

External adapters need graph content, configuration and attachments to come from the same selected revision throughout a read operation. Unify acquisition across application reads, add branch-aware attachments, and reuse workflow dependency configuration per operation while checking authorization independently.

Preserves existing local configuration precedence and write validation/retry behavior. Includes adapter adoption guidance and regressions for concurrent branch changes and source cleanup.

Validation: full tests including the nested example, focused race tests, vet, lint and build passed.

Greptile Summary

This PR consolidates graph, configuration, dependency, search, workflow, and attachment reads around operation-scoped acquired snapshots.

  • Adds branch-aware read acquisition and forwards session branch selection through MCP.
  • Applies acquired configuration to operation-local runtime clones while preserving authorization checks.
  • Adds source cleanup handling and regression coverage for branch advancement and acquisition failures.
  • Moves local attachment path ownership to the selected source, though the current retained-snapshot path can diverge from its immutable content.

Confidence Score: 4/5

The PR should not merge until local attachment paths are guaranteed to identify the same revision-fixed bytes returned by the acquired source.

Retained attachment reads serve content from an immutable in-memory snapshot but return a path into the mutable live checkout; once an apply advances that checkout, local clients can read a different revision through the advertised path.

Files Needing Attention: pkg/local/read_snapshot.go

Important Files Changed

Filename Overview
pkg/application/read_snapshot.go Introduces unified snapshot selection, operation-local acquired configuration, legacy-store compatibility, and centralized release handling.
pkg/application/application.go Migrates application read APIs to acquired snapshots and branch-aware attachment and information reads.
pkg/application/workflow.go Reuses materialized graph views and effective configuration within each workflow operation.
pkg/local/read_snapshot.go Adds source-provided attachment paths, but derives them from a mutable checkout while serving immutable snapshot bytes.
pkg/mcpapp/tools.go Forwards session branches into information and attachment reads and exposes source-provided paths to local clients.
cmd/sdd/serve.go Composes branch-aware local snapshot acquisition without using mutation acquisition.
Prompt To Fix All With AI
### Issue 1
pkg/local/read_snapshot.go:36
**Local Path Can Drift**

The attachment content is read from the immutable snapshot filesystem, but `LocalPath` is built from the mutable live checkout directory. If a concurrent or later apply replaces that file before the local MCP client follows the path, the client reads bytes from a different revision than the content returned by this operation. Only return a path that remains tied to the acquired snapshot, or omit it when that cannot be guaranteed.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (2): Last reviewed commit: "sdd: signal tactical Should local MCP at..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

… an entry ...

SDD-Mutation: entry-20260906-231136-s-tac-ynt
…round one acquired, ...

SDD-Mutation: entry-20260906-234056-d-tac-bae
SDD-Mutation: wip-start-20260906-234150-christopher
…ves current write ...

SDD-Mutation: entry-20260906-234852-d-tac-vdu
Implements 20260906-234056-d-tac-bae and 20260906-234852-d-tac-vdu.
…s with authoritative ...

SDD-Mutation: entry-20260907-102247-s-tac-0br
Comment thread pkg/application/application.go Outdated
Comment thread pkg/mcpapp/tools.go
Comment thread pkg/local/read_snapshot.go
…tability of ...

SDD-Mutation: entry-20260907-114132-s-tac-r25
SDD-Mutation: summary-20260907-114132-s-tac-r25-c391eeebf95e63ca
@hlubek
hlubek merged commit 7761966 into main Sep 7, 2026
3 checks passed
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