refactor: converge extension ownership and runtime boundaries - #130
Open
M09Ic wants to merge 389 commits into
Open
refactor: converge extension ownership and runtime boundaries#130M09Ic wants to merge 389 commits into
M09Ic wants to merge 389 commits into
Conversation
fix(web): harden scan lifecycle and runtime integrity
…er-deps refactor: enforce unidirectional layer deps (core ← pkg ← cmd)
…er-deps refactor(config): centralize env and provider protocols
The engine already records the exchange on the operator result (protocols/http/request.go sets Request/Response), and the SDK's own TemplateResult copies both out. neutronResult dropped them, so every consumer of the JSON output saw a bare matched=true/false with no reviewable evidence of what was actually sent. Cairn's reproduce flow is the visible casualty: it parses request and response from this output and only stores an evidence exchange when one of them is present, so reproduction traffic was always empty in the UI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Move resource ownership into app, session and run execution into runtime, terminal lifecycle into console, and stdio/inline transport into host. Update entrypoints and add lifecycle and dependency checks. Record remaining callback, duplicate execution, and queue debt in the architecture audit. Relevant race tests and AOP tests pass; full suite retains the known Katana browser E2E failure.
Document the concrete TUI to Console merge, single Runtime execution path, queue and cancellation semantics, event-driven output, and follow-up App ownership work. Relax the source/test mapping rule for intentional cross-cutting lifecycle tests.
…runtime Separate lifecycle owners from borrowed capabilities, move the session host into exts, and consolidate registry and observation boundaries. Remove obsolete runtime/plugin/dependency facades and update composition sites, tests, CI, docs, and the AOP submodule. Add guards against restoring the legacy session package or exposing host lifecycle methods through borrowed session and loop capabilities. Existing Agent state and derived-session execution remain outside this cleanup.
M09Ic
force-pushed
the
master
branch
2 times, most recently
from
September 14, 2026 13:14
992d94a to
ad015e7
Compare
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.
Summary
core/extension.Setper profile, with atomic load rollback, admission, cancellation, drain, retryable close, and reverse dependency shutdownpkg/extsand remove the legacy runtime, registrar/registration, service-location, filetools/workspacefiles, toolgroup, Borrow/Handle, and duplicated observation pathspkg/toolset.Registryandpkg/commands.Registryas separate executable domains backed by the sharedcore/registry.Store[T]lifecycle kernelpkg/profile.Profilea concrete host object that owns one Set and publishes only App, Sessions, and resource namespaces; remove Application, Assembly, IsNil, and aiscanProfile wrapperspkg/exts/agentinto the admitted Agent Loop owner andpkg/exts/sessioninto the Session/Run/Inbox/history/protocol owner, connected only by constructor injection and Set dependency orderOwnership model
The AIScan product graph now expresses the relevant lifetime chain as:
Agent Loop -> App and registries -> Session RuntimeShutdown runs in reverse, so Session work drains before App resources and the Agent Loop are released. Extensions do not import or close one another.
Scope
This PR contains the complete Issue 127 migration chain rather than only the final Agent/Session split. Relative to
master, it intentionally changes 463 files across 23 commits. The commits retain the staged boundary migrations to keep reviewable architectural checkpoints.Validation
Passed:
go build -mod=readonly ./...go test -mod=readonly -tags full ./... -run '^$'go test -mod=readonly -count=1 ./...passes except the environment-dependent Katana browser reuse E2E (TestE2EHeadlessReusesDiscoveredBrowser), where the local browser did not reach the authenticated workspace. No test was skipped or relaxed to hide it.Closes #127