feat(delivery): wire ack, success and call sites into the delivery engine (PR 2 of the plan) - #2212
Draft
semen-flamingo wants to merge 1 commit into
Draft
semen-flamingo wants to merge 1 commit into
semen-flamingo wants to merge 1 commit into
Conversation
…gine Second PR of the plan, on top of openframe-machine-delivery: - ScriptExecutionAcknowledgeMessage gains type/targetId; the listener routes any type to DeliveryTracker.acknowledge (PENDING -> ACKED) and keeps the script path for legacy/SCRIPT_SCHEDULE acks. - InstalledAgentService completes TOOL_INSTALLATION rows on installed-agent, AgentUninstallService completes CLIENT_UNINSTALL on /api/agents/uninstall. - ToolInstallationService and ForceClientUninstallService dispatch through DeliveryDispatcher with the specs' Seeds. Still behind openframe.delivery.enabled; with the flag off every call site behaves exactly as today. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BnYUpYgKvuMw6hB5VZSimY
semen-flamingo
force-pushed
the
feature/delivery-usage
branch
from
September 16, 2026 12:56
1a0c905 to
7516657
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.
Draft, stacked on #2200. Base is the
feature/delivery-spec-skeletonbranch; the diff shows only the usage of the engine that #2200 introduces. Retarget tomainonce #2200 merges.Still behind
openframe.delivery.enabled: with the flag off (every environment today)NoopDeliveryRecorderandNoopDeliveryTrackerare selected, so every call site behaves exactly as before. Transport is still JetStream — the core-NATS switch is PR 4.What this PR wires
Ack (PENDING → ACKED).
ScriptExecutionAcknowledgeMessagegainstypeandtargetId, both nullable.ScriptExecutionAcknowledgeListenerroutes:type+targetIdpresent →DeliveryTracker.acknowledge(type, targetId, machineId);typenull (legacy agents) orSCRIPT_SCHEDULE→ the existingScriptExecutionAcknowledgeServicepath, unchanged.One ack subject for every delivery type; old agents keep working.
Success (→ DONE). No new subject; the signals the agent already sends close the row:
InstalledAgentService.addInstalledAgent→complete(TOOL_INSTALLATION, agentType, machineId)—agentTypeis thetoolAgent.getKey()the spec published with;AgentUninstallService.uninstall→complete(CLIENT_UNINSTALL, machineId, machineId)on the DELETED transition.Dispatch (→ PENDING + publish).
Neither service injects a spec or a publisher any more; the seed's type selects the spec.
Tests
ScriptExecutionAcknowledgeListenerTest(legacy ack, typed ack, script-schedule ack hits both, malformed left unacked),InstalledAgentServiceTest,AgentUninstallServiceTest,ForceClientUninstallServiceTest.ToolInstallationServicehas no unit test becauseopenframe-tool-agent-nats-installationhas no test infrastructure at all.Verification
mvn -pl openframe-machine-delivery,openframe-data-nats,openframe-client-core,openframe-api-service-core -am test -Dtest='Delivery*Test,*DeliverySpecTest,*DeliveryRecorderTest,ScriptExecutionAcknowledgeListenerTest,InstalledAgentServiceTest,AgentUninstallServiceTest,ForceClientUninstallServiceTest,MongoDeliveryTrackerTest,MachineOnlineStatusTest'— 48 tests, build green on JDK 21.🤖 Generated with Claude Code
https://claude.ai/code/session_01BnYUpYgKvuMw6hB5VZSimY