Skip to content

feat(os-update): delivery type for the install command CU-17tkuw67mjh - #3352

Merged
semen-flamingo merged 2 commits into
mainfrom
feat/os-update-install-delivery
Dec 4, 2026
Merged

semen-flamingo merged 2 commits into
mainfrom
feat/os-update-install-delivery

Conversation

@semen-flamingo

@semen-flamingo semen-flamingo commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

What

The delivery type that carries the "install these OS updates" command to the agent (Windows). Transport only: no sender, no domain status, no config here.

  • DeliveryType.OS_UPDATE_INSTALL.

  • OsUpdateInstallMessage (the body the agent gets):

    Field Meaning
    delivery the engine's block (type, targetId, dispatchId, sequence), copied back by the agent in its result
    requestId the id of the install request
    identifiers OsUpdate.identifier of every update the device has to install by this command
  • OsUpdateInstallDeliverySpec: subject machine.<machineId>.os-update-install; everything else is the default of DeliverySpec (no wireForm, the default deliverable statuses, not for every machine).

  • OsUpdateInstallDeliverySeed: machineId, requestId, identifiers; targetId = requestId, so the row of machine_delivery is one per device and request.

Contract with the agent

  • One command per device and request, with the whole list of updates.
  • The agent answers on machine.<machineId>.delivery.result: DONE once it has written the command down, not once the updates are installed. FAILED + error = the command could not be taken.
  • The outcome of each update is not a result of the delivery: it comes later as its own message, per update.
  • The same command may arrive more than once (re-publish until the result): the agent drops a repeat by delivery.dispatchId.

Not here

  • The sender (Install Now, Update All, a policy run), the "installing" state of an update on a device and the per-update result.
  • Config. The type is off until openframe.delivery.enabled.OS_UPDATE_INSTALL is set; its policy (openframe.delivery.types.OS_UPDATE_INSTALL: max-attempts: 5, result-timeout-seconds: 30, reconnect-window-seconds: 86400) goes into the tenant configs together with the lib bump, because a service on an older lib does not know the enum value.

Tests

OsUpdateInstallDeliverySpecTest (type, subject, request, wire form). The unit run of data-nats, machine-delivery and client-core with their dependencies is green.

Change-Set: feat-os-update-install-delivery

🤖 Generated with Claude Code

https://claude.ai/code/session_01EnBSFTsNdA8c4yRH3Lehi4

Change set flamingo-stack/feat-os-update-install-delivery: 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

  • …and 1 linked item not shown here

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

OS_UPDATE_INSTALL carries one command per device and request with every
update the device has to install. The engine is transport only: the agent
answers DONE once it has written the command down; the outcome of each
update is not a result of the delivery.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EnBSFTsNdA8c4yRH3Lehi4
@flamingo

flamingo Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

🦩 flamingo Code Review

1 finding: 🔴 0 action required · 🟠 0 recommended · 🔵 1 informational

Advisory: findings do not block the merge.

Rules cited: OPENFRAM-001-6

Files Lines 🔴 Action required 🟠 Recommended 🔵 Informational
5 +187 / -1 0 0 1

🔵 Informational (1)

# Where Finding Flagged by
1 OsUpdateInstallMessage.java:14 OsUpdateInstallMessage data carrier uses @‍Getter/@‍Setter instead of the required Lombok quad (Minor) OPENFRAM-001-6

✅ What this change does well

  • OsUpdateInstallDeliverySpec follows the existing DeliverySpec/DeliverySeed pattern exactly (same @‍Component + @‍ConditionalOnProperty("spring.cloud.stream.enabled") gating and subject template approach as ToolUninstallDeliverySpec).
  • OsUpdateInstallDeliverySpecTest covers the type/subject contract, the request mapping and the actual on-the-wire JSON shape including the delivery ref block.
  • OsUpdateInstallMessage documents the non-obvious DONE semantics of the agent's delivery result in a single why-comment rather than restating the field names.

Inline comments: 1 new

1 possible problem checked and ruled out
  • openframe-data-nats/src/main/java/com/openframe/data/nats/delivery/OsUpdateInstallDeliverySpec.java:13 OsUpdateInstallDeliverySpec duplicates an existing definition: OsUpdateInstallDeliverySpec is a per-delivery-type implementation of the DeliverySpec interface (getType/getPayloadClass/request/subject); every sibling spec repeats this thin shape by design, so the 'duplication' is convention boilerplate, not logic implemented twice.
🤖 Prompt for AI agents: fix every finding
Address these code-review findings on pull request #3352 of flamingo-stack/openframe-oss-lib, most important first.
For each one, make the minimal change that resolves it and do not refactor unrelated code.
If you can show a finding is wrong, skip it and say why.

1. [Informational] openframe-data-nats/src/main/java/com/openframe/data/nats/rmm/model/OsUpdateInstallMessage.java:14 OsUpdateInstallMessage data carrier uses @Getter/@Setter instead of the required Lombok quad
   OPENFRAM-001-6 requires every document/DTO/model class to carry @Data, @Builder, @NoArgsConstructor and @AllArgsConstructor. The new wire model declares only @Getter and @Setter, so there is no builder and no explicit all-args constructor, and it also drifts from the sibling model in the same package (openframe-data-nats/.../rmm/model/MachineOsUpdatesMessage.java:11 uses @Data). The spec has to build it field by field (OsUpdateInstallDeliverySpec.java:31-33) exactly because no builder exists.

Next: commit a suggestion, or hand a comment's prompt to your coding agent. React 👍 on a finding that helped and 👎 on one that is wrong: the reviewer learns from both.

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 14:55 UTC · reviewed from Semen Lisak's machine

@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
5 +187 / -1 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 14:58 UTC · reviewed from Semen Lisak's machine

…gs CU-17tkuw67mjh

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EnBSFTsNdA8c4yRH3Lehi4
@semen-flamingo
semen-flamingo added this pull request to the merge queue Dec 4, 2026

@yevhenii-flamingo yevhenii-flamingo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small follow-ups on the Java conventions.


import static java.lang.String.format;

// One command per device and request, with every update the device has to install by it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use short class Javadocs for the seed, spec, and message? That would keep the one-command-per-device-and-request contract and the meaning of DONE where callers can find them.

private final JsonMapper mapper = new JsonMapper();

@Test
void typePayloadAndSubject_installCommandOfOneMachine() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use the three-part test name here, e.g. deliverySpec_forOneMachine_usesOsUpdateInstallContract? That makes the single-machine condition and expected result clear in the test list.

Merged via the queue into main with commit 8effdfc Dec 4, 2026
20 checks passed
@semen-flamingo
semen-flamingo deleted the feat/os-update-install-delivery branch December 4, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants