Guard long-running adapter implementations
This commit is contained in:
parent
bb13258861
commit
1ef76f0271
11 changed files with 541 additions and 11 deletions
|
|
@ -296,6 +296,34 @@ The incremental path is:
|
|||
Missing, incompatible, or corrupt cache data is a cache miss. It must never become a partial graph
|
||||
or replace the last valid index.
|
||||
|
||||
### Declare the process-stable adapter implementation boundary
|
||||
|
||||
An adapter object is loaded once when its project-bound process starts. Source synchronization can
|
||||
refresh the graph, but it cannot safely replace already imported adapter code in place.
|
||||
|
||||
`AdapterProject` automatically fingerprints a project-local Python package containing the loader
|
||||
class and a declared descriptor file. Declare a broader or non-Python boundary explicitly when the
|
||||
adapter uses helpers, configuration, schemas, or templates outside that inferred package:
|
||||
|
||||
```python
|
||||
settings = AdapterProjectSettings(
|
||||
implementation=AdapterImplementation(
|
||||
roots=(project_root / "docforge_adapter",),
|
||||
files=(project_root / ".docforge" / "project.toml",),
|
||||
suffixes=(".py", ".toml"),
|
||||
),
|
||||
)
|
||||
```
|
||||
|
||||
The boundary is confined to the project root and limited to 4,096 files and 64,000,000 bytes.
|
||||
DocForge fingerprints relative paths and bytes. An added, changed, deleted, missing, or symlinked
|
||||
implementation file produces `adapter_restart_required` before another MCP operation. Restart the
|
||||
project-bound server; do not use Python module reloading to mutate a live adapter graph.
|
||||
|
||||
The manifest remains a current source snapshot, not a Git-index snapshot. A Git-backed adapter must
|
||||
omit a deleted source whether its deletion is unstaged or staged. Staging is never a required
|
||||
DocForge synchronization step.
|
||||
|
||||
## Step 9: keep the complete path independent
|
||||
|
||||
The full rebuild must not read the incremental extraction cache. Otherwise equivalence compares
|
||||
|
|
@ -344,7 +372,9 @@ An adapter is not complete until these cases pass:
|
|||
| Shared header/module change | Every reverse dependent reparses |
|
||||
| Added source | New contribution appears without stale duplicates |
|
||||
| Renamed source | Old contribution disappears and new identity follows policy |
|
||||
| Deleted source | Owned nodes, relationships, and Logic disappear |
|
||||
| Unstaged and staged deleted source | Owned nodes, relationships, and Logic disappear identically |
|
||||
| Adapter implementation edit/add/delete | `adapter_restart_required` before synchronization |
|
||||
| Adapter descriptor/configuration edit | `adapter_restart_required` before synchronization |
|
||||
| Build flags/features change | Affected units invalidate |
|
||||
| Extractor version change | Old contributions invalidate |
|
||||
| Corrupt cache | Clean recovery without partial publication |
|
||||
|
|
@ -445,4 +475,3 @@ For every such change:
|
|||
- [ ] Session composition and family isolation are proven.
|
||||
- [ ] Viewer, query, context, and Logic retrieval are proven.
|
||||
- [ ] Performance, graph shape, unsupported facts, and version rules are recorded.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue