Repository navigation
fix(ai): discover persistence from native capability captures - #313
Merged
ice-black-tea merged 4 commits intoNov 15, 2026
Merged
Conversation
ice-black-tea
marked this pull request as ready for review
November 15, 2026 01:29
ice-black-tea
deleted the
fix/custom-capability-discovery-230-20261114
branch
November 15, 2026 05:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current delivery · 2026-11-15
The discovery fixes and their ownership evidence are complete for this PR. The recovery section in
domain-composition.mdmaps ordinary retry, imported retry, same-execution deferred continuation, seed receipts, and native callback ownership to existing tests, without adding a new API or mechanism. On the combined source with master18165a4, the focused suite passed 45 tests; independent review found no remaining must-fix item in this slice. Latesta11dc7d0is Ready; natural CI is pending at publication. This does not complete #230 or establish general cold-process recovery.Scope
Refs #230. Fix custom native capability-tree persistence discovery without changing public APIs, commit policies, resource ownership, or callback lifetimes.
Confirmed failures
On master
776caf18b1c11d1e2f2122e79748521863c0c217, a valid custom container exposing the nativeapply/visit_and_replacecontract had two gaps:CapabilityPersistenceleaf was captured and later bound, but the second, built-in-container-only discovery pass omitted its partition. A real Runtime execution failed withKeyError('custom.note')andINTERNAL_ERROR.Change
Reuse the leaves visited by the existing declaration capture. Validate custom persistence participants at capture and derive partitions from the existing captured revision map; validate persistence-domain uniqueness against the same captured leaves, including the default Execution declaration. No new registry, owner, API, or compatibility path.
The original implementation slice changed two files:
runtime/_feature_policy.py(+8/-8) and one regression module.Verification
3b02f3ab93825a164c300bb18b63b88739057f77passed the existingmanage.py check linktools-aientry with a narrow test selection: 18 passed / 13 deselected, architecture and Ruff passed, 17.093 seconds total. Python 3.12, Pydantic AI 2.68.0 / Harness 0.68.0.for_agent/for_runcallback ownership; completed-run writer sealing for sync and terminal policies; identity bounds.Native container owner documentation
The documentation now traces declaration capture, nested participant identity and revision, run-local binding, native replacements, the original callback retained by accepted writes, and seal/close ownership. The source and existing test definitions were rechecked; documentation-only, no new production behavior. The broader ownership evidence was then completed above. Exact-head natural CI is tracked separately.
Per-resource ownership matrix
domain-composition.mdnow distinguishes owned and borrowed Persistence, Asset, StepStore, and external SQL resources, including close-failure ownership. This is documentation against current production source and existing test definitions, not additional runtime verification. Exact-head natural CI is tracked separately.