Release 0.4.0
The fourth tagged release of HERD, kept as the record of what 0.4.0 shipped: lab purpose classification end to end, 21 code-review findings closed, millisecond event delivery, and AI-proposed network elements. The release after it is 0.5.0. The rest of this manual documents the current release, named in the header of every page.
Source of record: the v0.4.0 release notes and CHANGELOG.md.
Some of the things you might expect to find are not missing by accident. The Known boundaries section below lists what 0.4.0 deliberately does not do yet. Check it first.
The short version
What 0.4.0 is
0.3.0 widened the platform. 0.4.0 makes it accountable: lab purpose classification runs end to end, so a reservation carries a confirmed purpose from a closed taxonomy, the AI suggests one at booking time and again when the reservation ends, admins review the suggestions on a dedicated page, and utilization reporting breaks down by purpose at device and user level, transit gear included.
Under the floor, a full multi-pass code review closed 21 findings, several of them visible as tighter visibility rules; the transactional outbox now wakes on write, so an event publishes within milliseconds instead of waiting for a relay tick; and the fork write paths are serialized so two concurrent saves can never claim the same physical port.
The contents
What shipped
Lab purpose classification
ADR 0013, end to end: a closed taxonomy of lab purposes per reservation, an AI-suggested category at booking time and again when the reservation ends, an admin Purpose Review page to accept or dismiss suggestions, and purpose reporting at device and user level that counts transit gear on a reservation's paths, with CSV downloads. Purpose review → Purpose reporting →
21 code-review findings closed
A full multi-pass code review of the codebase closed 21 findings. The ones you can see: a fork commit can no longer wire a device that is not part of the reservation (the editor adds it to the reservation first; an error names the devices), group member details are admin-only, a device's config-version history follows device visibility, and the cabling list shows a non-admin only connections touching devices they can see. Committing → Groups → Config versions → Cabling →
Events publish within milliseconds
The transactional outbox now wakes on write instead of waiting for its relay tick, so provisioning, notifications, and webhooks start right after the change that caused them. Notifications →
AI-proposed network elements
The topology generator can place VLAN segments, subnets, external clouds, and patch trunks and attach devices to them. They appear as ghost nodes for review like devices, and committing keeps them. Reviewing proposals → Network elements →
Fork integrity under concurrency
More failure paths that cannot eat wiring, this time the concurrent ones: two saves can no longer claim the same physical port, a restore racing a save can no longer lose the restore, and the activation snapshot honors the same port exclusivity as a save. Port conflicts →
Scheduled applies re-check authority
A scheduled config apply re-checks authority when it fires: a job whose creator has since lost manage rights or the active reservation on the device resolves as skipped instead of applying, and a job cannot be scheduled more than 30 days out. Scheduled apply →
Also in this release
- The purpose classifier runs on its own background task, so a slow AI provider never delays reservation activation or expiry, and a rate limit no longer counts against a reservation's classification attempts.
- Download CSV for every purpose reporting section.
- Reporting no longer truncates at 500 devices.
- The superadmin account can no longer be deactivated from the Users page.
- Uploads to the AI generator are rejected the moment they cross the file count or size cap, before the upload is read.
- Provider and internal error text no longer leaks into AI error responses.
- The Traefik dashboard is bound to the host's loopback address only.
- Fixed: cancelling or releasing a reservation whose device was deleted in the meantime now completes instead of retrying forever.
The architecture is unchanged from 0.1.0: twelve FastAPI services behind Traefik, one PostgreSQL schema and migration chain per service, NATS JetStream with transactional outboxes for events. The 0.1.0 architecture section still describes it.
What it was tested against
Quality bar
Measured at the tagged commit by the full make everything run:
- 4,837 backend unit tests across the 13 suites plus the repo-root suite; backend line coverage 96.9% with every service at 95% or higher.
- 1,297 frontend tests via vitest, 90.2% line coverage.
- 12 OpenAPI contract snapshot suites.
- 204 cross-service integration tests (194 run, the rest gated on LDAP mode or an AI provider).
- 163 end-to-end browser tests, run twice: 128 on the unseeded stack (35 device-gated skips) and 159 again on the seeded stack with no unexpected skip allowed (4 exempt).
- 41 live-LDAP tests against the checked-in
infra/ldap-testdirectory, hard-required in the gate. - Four Postgres-live suites against the gate database, hard-required: the LDAP sync reconciler, advisory locks, the fork restore-versus-save race, and the new two-session fork port-claim race.
- Load: 20 simulated users for one minute, 692 requests, 0 failures, median 10 ms, p95 230 ms.
The release gate is unchanged: a clean full validation run (lint, format check, every unit suite with coverage, frontend build, contract snapshots, integration, end-to-end, and load, against a rebuilt ephemeral stack) at the tagged commit, plus the same branch-protection ruleset on main described on the 0.1.0 page. The ruleset also covers release/* branches.
The honest part
Known boundaries
These are limits of 0.4.0, not bugs. If you hit one, the answer is "not yet", not "file a ticket".
- Network element provisioning (anchored VLANs) is a later phase. Elements are canvas objects today: they attach, save, validate, and diff, but nothing is provisioned from them.
- Manual wiring retry is not exposed through the external API. The
/api/v1wiring-status passthrough is deliberately read-only; retrying a failed connection is an interactive, owner-gated action. - A failed VLAN removal is logged, not blocked on. If
delete_vlanfails on last-free, the allocation is already released and the empty definition lingers on the switch until an operator removes it. Bounded lingering is the accepted trade. - AI recipe authoring is dark by default. Unchanged from 0.1.0: it stays behind
AI_RECIPE_AUTHORING_ENABLED. - Driver packages are trusted code. Unchanged from 0.1.0: POSIX
setrlimitcaps and a subprocess boundary are resource bounding, not OS-level isolation. - Purpose classification is off by default. It needs a configured AI provider and
AI_PURPOSE_CLASSIFICATION_ENABLED. A suggestion never writes the confirmed category by itself; an owner or an admin does. - Config-version history for a device outside your groups now answers "Device not found". The same answer as the device page gives. That is the visibility rule catching up, not a missing device.
Some manual pages describe screens that only appear when a feature is configured, for example the AI Assistant tab, the Use AI button, the LDAP Sync page's actions, and the Purpose Review queue. On an install where the feature is off, those surfaces are hidden or inactive. That is the feature gate, not a broken deployment.
Version and docs
Reading the manual against this release
This manual is published from the repository and describes the current release, named in the header of every page; this page is kept as the record of 0.4.0. The 0.3.0 page remains as the record of the release before it. If your deployment still runs 0.4.0, read the manual pages alongside the known boundaries above, since the current pages describe surfaces 0.4.0 does not have.
Full release notes, the tag, and the changelog live in the repository: github.com/vendrabuck/HERD releases/tag/v0.4.0.
HERD User Manual · Release 0.4.0