Skip to content

refactor(delivery): no per-machine admits in the delivery spec, the engine stays domain-agnostic CU-17tkuw67reb - #3353

Open
hryhorii-chuhuievets wants to merge 1 commit into
mainfrom
refactor/delivery-spec-without-admits
Open

hryhorii-chuhuievets wants to merge 1 commit into
mainfrom
refactor/delivery-spec-without-admits

Conversation

@hryhorii-chuhuievets

@hryhorii-chuhuievets hryhorii-chuhuievets commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

ClickUp task: CU-17tkuw67reb Stop installing Fleet on Macs below macOS 13 and report it as unsupported

Change-Set: refactor-delivery-spec-without-admits

What

openframe-oss-lib#3138 added DeliverySpec.admits(Machine, payload), a per-machine hook the rollout asked before dispatching. It put a device rule (the machine's OS version) into the delivery engine, which is meant to stay domain-agnostic. This PR takes it out again:

All four files are back to their state before #3138.

Why nothing is lost

A tool update below an agent's minimum OS version is still refused, by the client: minOsVersion stays in the tool-update message, and the client from openframe-oss-lib#3151 checks it before anything else and answers the delivery DONE with NOT_SUPPORTED, without downloading or touching the tool. The removed filter only ever acted on machines with a known OS version, and only that client reports one.

Unchanged and outside the engine: the install gate (ToolInstallationService), the single-machine force update (ForceToolAgentUpdateService), TOOL_UNINSTALL, the withheld agents and the sweep.

The only difference: a Mac below the minimum with a current client receives the update message and closes it as DONE.

Tests

🤖 Generated with Claude Code

https://claude.ai/code/session_018CWVXmitg5ndDrJgbb7zwP

Change set flamingo-stack/refactor-delivery-spec-without-admits: this pull request is the only one in it so far. Another pull request joins by naming this one in a Depends-On line, or by carrying the same Change-Set line.

Linked work

Linked by the Depends-On / Change-Set lines in these descriptions; this block is maintained by the hub.

…engine stays domain-agnostic CU-17tkuw67reb

DeliverySpec.admits(Machine, payload) put a device rule (the OS version of the machine) into the delivery engine.
It is removed together with the rollout filter, its metric and ToolUpdateDeliverySpec's override. A tool update
below an agent's minimum OS version is refused by the client itself (DONE with NOT_SUPPORTED), which every client
that reports an OS version already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018CWVXmitg5ndDrJgbb7zwP
@hryhorii-chuhuievets hryhorii-chuhuievets added the build Run the PR builds and publish snapshots (Java, npm preview); stays on until removed label Dec 4, 2026
@flamingo

flamingo Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

🦩 flamingo Code Review / security

✅ No findings on the current head.

Advisory: findings do not block the merge.

Files Lines 🔴 Action required 🟠 Recommended 🔵 Informational
7 +1 / -261 0 0 0

Review again. New commits are not reviewed until you ask:

  • Security-check the new commits: only what was pushed since this security review
  • Security-check the whole diff again: everything, including what was already checked

Or comment @flamingo-review security (new commits) or @flamingo-review security full (everything). Add the flamingo-security-review-always label to security-review every push.

Updated 2026-12-04 16:43 UTC · reviewed from Hryhorii Chuhuievets's machine

@flamingo

flamingo Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

🦩 flamingo Code Review

✅ Tests and checks passed on this commit (3 lanes).

✅ No findings on the current head.

Advisory: findings do not block the merge.

Files Lines Languages Tests Checks 🔴 Action required 🟠 Recommended 🔵 Informational
7 +1 / -261 Java (1 Maven lane) ✅ 4406 / 4406 green (441 skipped) ✅ 1 / 1 passed 0 0 0

✅ What this change does well

  • Removing admits from DeliverySpec also deletes its only override and the now-dead recordRolloutNotAdmitted metric in DeliveryMetrics, leaving no orphaned hooks behind.
  • The OS-minimum gate is not lost: openframe-data-mongo-sync/src/main/java/com/openframe/data/service/ToolOsSupportService.java and the client-side gate (clients/openframe-client/src/services/tool_os_gate_tests.rs) still enforce minOsVersion, so DeliveryRolloutService simplification does not drop the invariant.
  • Tests for the removed behaviour were deleted along with the code instead of being left as dead or lenient stubs (DeliveryRolloutServiceTest, ToolUpdateDeliverySpecTest).
  • DeliverySpec, DeliveryRolloutService, DeliveryMetrics and ToolUpdateDeliverySpec are back to their state before the device rule was added, so the delivery engine holds no domain logic again.
3 possible problems checked and ruled out
  • openframe-machine-delivery/src/main/java/com/openframe/delivery/metrics/DeliveryMetrics.java:134 recordRolloutBelowFloor duplicates an existing definition: DeliveryMetrics.java:134-137 vs 152-155 are three-line micrometer counter wrappers with different metric names; every method in the file has this shape, convention boilerplate.
  • openframe-machine-delivery/src/main/java/com/openframe/delivery/metrics/DeliveryMetrics.java:141 recordUnreachable duplicates an existing definition: recordUnreachable (line 141) matches recordFailed (line 63) only in the generic tagValue+counter.increment pattern shared by all methods in DeliveryMetrics; thin wrapper boilerplate.
  • openframe-data-nats/src/main/java/com/openframe/data/nats/delivery/ToolUpdateDeliverySpec.java:14 ToolUpdateDeliverySpec duplicates an existing definition: ToolUpdateDeliverySpec is a per-type DeliverySpec implementation; similarity to ClientUpdateDeliverySpec is interface-conformance boilerplate (type, payload class, subject template), not duplicated logic.

🧪 Tests and mutation

Tests per lane

Language Project Command Status Counts Time
Java (Maven) . mvn -B test -pl openframe-data-nats,openframe-machine-delivery -am ✅ passed audit 348 · core 271 · core-crypto 68 · data-kafka 55 · data-mongo-common 115 · data-mongo-sync 3377 (405 skipped) · data-nats 235 (4 skipped) · event-publishing 103 (32 skipped) · exception 9 · graphql-relay 73 · machine-delivery 156 · security-core 37 · 0 failures 32.9 s

Checks

Check Kind Language Project Status Time
OpenGrep security Java (OpenGrep) . ✅ passed 15 s

Java lane: 4847 tests, 0 failures; the change only removes code, so no new lines to mutate.

Mutation testing

This build has no PIT plugin, so each module is mutated from the command line with pit-adhoc.sh, changing nothing in the repository.

Module Classes Whole classes New lines only Time
openframe-machine-delivery DeliveryRolloutService 28 mutants, 27 killed (96%), 1 survived, test strength 96%, line coverage 100% none on added lines 18 s

Review again. New commits are not reviewed until you ask:

  • Review the new commits: only what was pushed since this review
  • Review the whole diff again: everything, including what was already reviewed

Or comment @flamingo-review (new commits) or @flamingo-review full (everything). Add the flamingo-review-always label to review every push.

Updated 2026-12-04 16:38 UTC · reviewed from Hryhorii Chuhuievets's machine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Run the PR builds and publish snapshots (Java, npm preview); stays on until removed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant