1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages

Add deterministic incremental adapter assembly

This commit is contained in:
Andraxion 2026-07-27 16:01:40 -04:00
parent 09c09300b1
commit cd54cae71d
6 changed files with 224 additions and 38 deletions

View file

@ -64,6 +64,25 @@ Each `AdapterSourceProjection` owns:
Ownership must be deterministic. Two sources may not produce the same primary node or the same
function logic projection.
Some language tools emit overlapping raw evidence before ownership can be resolved. An incremental
loader may additionally implement:
```python
def assemble_projection(
manifest: AdapterManifest,
contributions: tuple[AdapterSourceProjection, ...],
) -> AdapterAssembly: ...
```
DocForge caches and invalidates the source contributions normally, then passes the complete current
contribution set to this pure assembly step. The assembler must deterministically select or merge
overlapping evidence and return one valid final graph and Logic set. It may not read hidden source
state or create a second extraction cache. The final identity, revision, and source hash must match
the manifest exactly.
Without an assembler, the stricter default remains in force: two contributions may not publish the
same primary node or Logic owner.
## Invalidation
DocForge invalidates a source when:

View file

@ -123,6 +123,7 @@ All frontends emit the same DocForge contracts:
- `AdapterManifest` inventories fingerprinted extraction units and dependencies.
- `AdapterSourceProjection` owns nodes, relationships, and optional function Logic for one unit.
- `AdapterProjection` provides the deterministic complete rebuild.
- `AdapterAssembly` optionally resolves overlapping raw evidence into the single published graph.
Language metadata may differ. Graph publication, indexing, querying, visualization, and MCP
behavior do not.
@ -130,6 +131,11 @@ behavior do not.
Done when repeated extraction produces the same stable identities without inferred or guessed
facts.
When compiler or language tooling repeats shared declarations across extraction units, use the
optional assembly contract. Cache the raw source contributions through DocForge, then
deterministically select or merge ownership from the complete contribution set. Do not hide a
second extraction cache inside the project adapter.
### 5. Build-system evidence
#### C and C++