3.2 KiB
Lessons: Operate / Provision / Release pass
Internal. Not the product spec — that is fleet-products.md.
Mistakes
-
Coded before the product existed. Harbor 401, two bots, then kubectl scripts, then a CLI, then the three doors. Each layer papered the last. Reviewers saw a cut, not a 1.0 surface.
-
Wrong tenant for the work. Device upgrade was implemented as a DX shell script, then as a Harmony bin that still thought like kubectl. Customers must not reimplement in-cluster ops.
-
Mixed identities in one process.
release.shbuilt images, pushed Harbor, deployed a tenant crate, and patched Devices.build-push-operator-and-agent.shinvoked that from the tenant repo. DX bot pushedharmony/*. -
Guessed OpenBao paths and JWT roles.
harmony/harmony-fleetand defaultnationtech-cloud-tenantswere invented in code. Coordinates are product data, not filler. -
--contextas a homonym. Operate: OpenBao namespace. Provision: compiledContextname. Same flag, two types. -
Agent pin as three strings. Release prints
artifactUrl,maxBytes,sha256; Operate parses them independently. A mismatched triple is representable. Digests were scraped fromRUST_LOGstdout with awk. -
Operate is kubectl folklore.
Api<Device>+ JSON merge-patch, not a Score. ADR-023 exception was assumed, not decided. -
Junk-drawer crate.
harmony-fleet-deployholds Scores, Release (harmony-fleet-release), Operate (harmony-fleet), and provision helpers. The Operate bin does not use the lib. -
No tests on the path that replaces a privileged agent binary:
validate_upgrade, merge-patch shape,release.shrejecting tenant flags,provision.shargs. -
Cross-compile honesty. aarch64 artifacts are not
--version-checked on an x86 host. x86 check is an unanchored glob (0.6.8matches0.6.80). -
Docs lagged SETUP.md and leftover
harmony-fleet-publish/--tag --pushclap. -
Shipped the door shape and asked reviewers to bless 1.0. They correctly said no.
-
Committed and pushed when the user was asking a question. Supervisor failed the loop.
Corrections imposed (this pass)
These are the ones that actually changed the crate. Do not reverse them.
- Three jobs, three identities. Operate / Provision / Release. One process, one key.
--tenantis an OpenBao path, not provision--context. - Domain in the library, clap is a switchboard. Flags in,
printlnout. No tag grammar, digest triples, or patch JSON inmain.rs. - Types map the problem, they are not SOLID costumes.
Pinis the Harbor object. Catalog mints it from--version/--arch. NoArtifactCatalogtrait with one impl. No twinPublishedOperator/PublishedCallout.ResolvedVersionsis the chosen images, not a pairing invariant. - Simple engineering that maps the space. Getters, row-beans, and fake ports are fuss. Public fields + constructors +
FromStr. Run the reviewers; do not infer MERGE. Do not commit when the user is asking. - Operate UX is the product. This bin defaults to
warnand keepscli_logger. Junk Harbor tags are silent. Upgrade stdout includes the pin. List tables have headers (UPGRADEis the agent-upgrade phase, not reachability).