Skip to content

M7-S4 — Package, review and hand over the capability

Section titled “M7-S4 — Package, review and hand over the capability”
ModuleM7 — Extend through documented extension points (extension strand)
After this session you canShip the capability as a versioned package to your lab release, judge it against the extension map, and hand it over with what a package cannot carry.
Time60 min with a facilitator · about 60 min on your own
Before you startM7-S3 (the capability, proved, on Larkspur Dev), M6-S3 (import sessions and overrides) and M1-S2 (Larkspur’s promotion path). Larkspur Dev and Larkspur Lab; the Larkspur Release token for the lab as REL; the package contract card.
Go deeperEnvironments and promotion · The import API · Functions in a multi-tenant deployment

◆ Orientation (1 min) — From a working space to a product

Section titled “◆ Orientation (1 min) — From a working space to a product”

The capability works in Larkspur Dev and a builder has proved it. It is still one environment’s configuration. In this session you turn it into a version that can be installed anywhere Larkspur runs, install it in Larkspur Lab the way a release pipeline would, and write down, honestly, what did not travel. Then you judge the whole design one last time against the map from M6-S4, which is exactly what a reviewer will do to your capstone in M11.

▤ Concept (5 min) — What travels, what does not, and what the version means

Section titled “▤ Concept (5 min) — What travels, what does not, and what the version means”

The package holds the design of the capability: the Condition Monitoring module, its two entities and two proxies, its views and pages, the reactions (Evaluate reading, Store level, Flag evaluation problem, Raise alarm work order, Tell the CMMS of alarm, Warn the planners) and the Function record reading-evaluator with its source ZIP. It depends on Asset Maintenance (the proxies’ sources and the work orders it creates), which must exist in the target and is mapped at install. You learned the version’s mechanics in ACE M8-S1: Create version freezes a snapshot; a published version installs as an installation that later versions update.

A version number is a promise about the contract. For this capability the contract is the Function’s parameters, its three level words, the fields readings must carry for the feed, and the views the feed writes through. Use the version to say what changed in it:

ChangeVersion stepWhy
A threshold rule, a notification text, a new reaction a builder addednone: that is data or the target’s own configurationIt is not part of the package’s contract
A fourth level word added, a new optional parameterNew featuresExisting readers keep working
A level word renamed, a parameter removed, a field the feed writes renamedBig changeEvery reaction, report or feed that uses it breaks
A bug fix inside the Function with the same contractSmall fixNothing a reader depends on changes
ItemWhy it does not travelHow it reaches the target
The Function’s runtimeA package carries the record and the ZIP; building and deploying needs a function builder in the targetThe target’s provisioner builds it on install; with no provisioner, the record stays unprovisioned, silently (M6-S1)
Threshold rules, assets, readingsRecords never travelPlanners enter the rules, or a script loads the agreed starting set through the API
Larkspur Telemetry and its tokenUsers never travelCreated per environment, with its three view grants; the token goes to the feed’s secret store
The feed adapterIt lives at the plant, outside the platformConfigured per environment with the target’s address and token
The CMMS address and receiver keyThey are values inside a reaction, and the key is a secretAn override at install sets them per environment; the key is rotated with the CMMS team
Who may edit rulesView access names groups, which are remapped, not createdCheck Maintenance Planners exists and holds the access after install

The table is the capability’s promotion plan. It is also its threat surface: four of the six rows are credentials or the places credentials are set.

The last step of the strand is a review of your own design, as a reviewer would do it: each part on the extension map, the alternative you rejected and why, and each test of the guarantee with its evidence. A design is justified when every rung above configuration has a reason a sponsor could accept, and when every test is proved, not applicable with a reason, or declared.

⛏ Lab (45 min) — Version 1.0.0, installed in the lab

Section titled “⛏ Lab (45 min) — Version 1.0.0, installed in the lab”

Goal. Publish larkspur-condition-monitoring 1.0.0 from Larkspur Dev, install it in Larkspur Lab with its lab values set by override, list what did not travel, and judge the design.

Before you start. In Larkspur Lab, Asset Maintenance exists (the seed); Condition Monitoring does not.

Publish

  1. In Larkspur Dev, open Packages › Build › Packages and create the package larkspur-condition-monitoring containing the module Condition Monitoring.

  2. Read its Contents: Modules, Referenced records (the group Maintenance Planners), Depends on, and the External dependencies on Asset Maintenance. Leave them external. Screenshot pending The package's Contents tab in Larkspur Dev with the module, the referenced group Maintenance Planners and the external dependencies on Asset Maintenance What to notice: every external dependency is a promise the target must keep; the referenced group is matched, not created.

  3. Create version: New features, version 1.0.0, release notes stating the contract (parameters, level words, feed fields, intake view). Download the file as lcm-1.0.0.zip.

  4. Read the file: unzip -p lcm-1.0.0.zip manifest.json | jq '{schemaVersion, package}'. The schemaVersion is 1.3 or 1.4, and package carries the name and the version.

  5. List resources/Function/ and files/: the function record and its ZIP are there.

Install in the lab

  1. Upload the file to Larkspur Lab’s storage and open an import session with $REL, as in M6-S3. Read the report: an install, every resource new, and the external dependencies listed.
  2. Open the same session in the lab’s Packages › Import screen and map each external dependency to the lab’s Assets, Asset Classes and Work Orders. Keep the referenced group Maintenance Planners (it exists in the lab).
  3. Back in the API window, read Tell the CMMS of alarm’s payload and write an override setting the lab stub’s address and the lab’s receiver key.
  4. Execute and poll until completed. Read the result: created counts, no errors, no cascade skips.
  5. In the lab’s designer, open Condition Monitoring: the entities, proxies, views and reactions are there, and Tell the CMMS of alarm points at the lab stub.

What did not travel

  1. Open Applications › Functions in the lab: reading-evaluator exists, but its status never becomes Provisioned, because the lab release has no function builder. Record it.

Screenshot pending The reading-evaluator function record in Larkspur Lab after the install, with its initial status and no Function URL What to notice: no error is shown; the record travelled, the runtime did not.

  1. Open Threshold Rules in the lab: empty. Load the agreed starting rules with a short script through the lab’s API (the six rules of the two seeded classes), or enter them as a planner.
  2. Note that Larkspur Telemetry does not exist in the lab; write the steps to create it, from M7-S2.
  3. Create one reading by hand in the lab: Evaluate reading fails, because the function is not provisioned; Flag evaluation problem does not run, because the action itself failed this time. Read the run’s error.
  4. Write the capability’s promotion plan: the six rows of what a package cannot carry, each with its owner and the step that completes it in the target.

Judge the design

  1. Fill a table with one row per part of the capability: rung on the map, the alternative you rejected, and the reason.
  2. Add the ten tests with the evidence from M7-S3, and the version rule you would apply to three future changes: a fourth level, renaming rule_unit, a faster sort inside the Function.
  3. Write the handover note for Larkspur’s operations: who owns the Function’s source, where the telemetry token and the CMMS key are kept and when they are rotated, and what to re-run after a platform upgrade. (You will turn it into an operations plan in M9-S2.)
  4. Remove the readings you created in the lab.
  5. Keep lcm-1.0.0.zip and your notes: the capstone builds on them.
  6. Compare your judgement table with the worked solution.
  7. Record one thing you would design differently next time, and why.

Check.

  • Version 1.0.0 exists in Larkspur Dev with release notes that state the contract.
  • The install in the lab completed with no errors and no cascade skips.
  • Tell the CMMS of alarm in the lab points at the lab stub, set by override.
  • The unprovisioned Function in the lab is recorded as a promotion-plan item, not as a bug.
  • The promotion plan has six rows, each with an owner and a completing step.
  • The judgement table covers every part, with a rejected alternative and a reason.
  • The three future changes have the right version step.

Pass condition. The lab holds the installed capability with lab values, your promotion plan explains everything that did not travel, and your judgement table gives each rung above configuration a reason.

If something goes wrong

What you seeWhat to do
The import refuses to execute with an unmapped dependencyStep 7 was not completed for every external dependency; map them in the import screen and reload the session.
TARGET_INSTALLED in the reportAn earlier attempt installed part of it; work in a fresh lab space, or remove the earlier installation first.
The override is refused with 400You changed more than the reaction’s options; compare with the packaged payload.
The function becomes Provisioned in the labYour lab has a function builder; then step 14 succeeds, and the plan’s first row is complete. Record that instead.
Model answer

The judgement table. Readings in: the API through a create-only view and Larkspur Telemetry (rung 5), rejected alternative a scheduled import of files, reason latency and a lost safe retry. The model: configuration (rung 1), rejected nothing. Evaluation: a parameterised Function (rung 4), rejected an expression, reason a growing rule (units, dead band, plausibility) is better held once, tested. Acting on a level: reactions (rung 3), rejected doing it in the Function, reason tests 4, 8 and 10. The CMMS: Call API with a redacted key and an idempotency key (rung 6), rejected a body signature, reason no secret store for a Function on 1.10. Shipping: a package with overrides, rejected a hand-built file, reason the platform’s own artifact. Not chosen: a Meter reading field type (rung 7), reason it is a platform decision; the source strand builds it.

The three changes. A fourth level word is New features; renaming rule_unit is a Big change, because every mapping of it breaks; a faster sort with the same contract is a Small fix.

The handover. The Function’s source is owned by Larkspur’s integration team in their repository; the telemetry token lives in the plant gateway’s secret store and is renewed before its expiry; the CMMS key is held by the CMMS team and set by override at each install; after a platform upgrade, re-run the M7-S3 proof and the five local cases of the evaluator.

◇ Worked scenario (2 min) — Version 1.1.0 meets a renamed field

Section titled “◇ Worked scenario (2 min) — Version 1.1.0 meets a renamed field”

Six months later the integration team ships 1.1.0 with a Plausible maximum (M7-S2’s scenario). In the lab, the install’s validation reports a mapped-field decision for Meter Readings and the feed starts failing in production right after the update. Decide at each step before you read on.

Step 1. What broke the feed? The feed writes Taken at. In 1.1.0 a builder in Dev had renamed it Measured at, thinking it a cosmetic change, and the package carried the rename. The field’s stored name, part of the feed’s contract, changed, so every post is refused with a validation error.

Step 2. Which version step should it have been? A field the feed writes is in the contract table: renaming it is a Big change, version 2.0.0, with the feed changed first. It was published as New features, so nobody planned the feed change.

Step 3. Repair. You do not rename the field back in production by hand: the installation would drift from its package. You publish 1.1.1 from Dev, restoring the field’s stored name and keeping the new label, install it, and the feed recovers. The plausible-maximum change is kept.

Step 4. Prevent. You add to the program’s standard: the package’s release notes list every contract item, the release pipeline compares the new version’s contract with the previous one and refuses a New features version that removes or renames any of them, and labels may change freely while stored names may not.

The lesson: a version number is only as good as the contract it protects; write the contract down and check it on every release.

✓ Practice (6 min) — Check your understanding

Section titled “✓ Practice (6 min) — Check your understanding”
PracticeChoose one answer.

After installing the package in a new tenant, every reading’s evaluation fails. The function record exists and its status has never changed. What is the most likely reason?

  1. Explanation for A

    ✗ Incorrect

    Not this one: the Function record and its source travel; the record would not exist otherwise. See what a package cannot carry.

  2. Explanation for B

    ✓ Correct

    Correct: a package carries the record and the ZIP, not a runtime; with no provisioner, creating the record does nothing. See what a package cannot carry.

  3. Explanation for C

    ✗ Incorrect

    Not this one: missing rules leave readings without thresholds, which the evaluator reports; they do not stop the function from running. See what a package cannot carry.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

Which change to the capability needs a Big change version?

  1. Explanation for A

    ✗ Incorrect

    Not this one: a new reaction adds behaviour without changing what existing readers depend on. See the package.

  2. Explanation for B

    ✗ Incorrect

    Not this one: existing mappings keep working, so it is a new feature. See the package.

  3. Explanation for C

    ✓ Correct

    Correct: every reaction, report and reader that tests warn breaks, so the contract’s major part changes. See the package.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

PracticeChoose one answer.

Where should the CMMS receiver key for each environment be set?

  1. Explanation for A

    ✗ Incorrect

    Not this one: one key everywhere means a leak in the lab is a leak in production. See what a package cannot carry.

  2. Explanation for B

    ✓ Correct

    Correct: an override sets a value per environment without forking the package. See M6-S3: overrides.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the Function does not make the call, and a key in source travels with every copy. See M7-S2: out through an authenticated call.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

A reviewer asks why the capability uses a Function at all, when a calculated field could compare a value with two thresholds. What is a justified answer?

  1. Explanation for A

    ✗ Incorrect

    Not this one: speed is not the reason given in the design, and it is not evident here. See judging the design.

  2. Explanation for B

    ✓ Correct

    Correct: a rung above configuration needs a reason a sponsor accepts; a growing, testable rule is one. See judging the design.

  3. Explanation for C

    ✗ Incorrect

    Not this one: that is not the reason the design gives, and the choice must rest on the rule’s nature. See judging the design.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

Which item belongs in the capability’s promotion plan rather than in the package?

  1. Explanation for A

    ✓ Correct

    Correct: users and their tokens never travel; they are created per environment and the plan says who does it. See what a package cannot carry.

  2. Explanation for B

    ✗ Incorrect

    Not this one: reactions are design and travel in the package. See the package.

  3. Explanation for C

    ✗ Incorrect

    Not this one: entities and their fields are the package’s core. See the package.

Check your answer

The correct answer is A. Open the explanation under each option to see why.

↺ Recap (1 min) — Shipped, and honest about it

Section titled “↺ Recap (1 min) — Shipped, and honest about it”

You shipped the capability as a version whose number protects a written contract, installed it in the lab with its own values, and wrote down everything that did not travel and who completes it. You judged the design rung by rung. After this module you can build, prove and ship a new capability through Functions, the API, events and packages, with no change to the platform. Next, M9-S1: the program at scale, where the engines you have opened, and the capability you added, meet real load.