Repository navigation
HERD v0.5.0
HERD v0.5.0
Release gate: a clean make everything at the tagged commit.
[0.5.0] - 2026-09-15
- Shipped first-class Layer 3 routing intent end to end (ADR 0014, issue #34, phases 1
to 4): routes declared on a Layer 3 switch node in the topology editor, validated at
save against the switch's config with fourteen refusal reasons, resolved into
fork_l3_routeson activation and save, and driven by the execution service in
precedence over config-version routes. The three follow-ups closed too: virtual
routers reach the driver contract behind asupports_vrfcapability (#755), attachment
is checked at the interface, not just the switch (#756), and a non-admin's canvas is
redacted to their visible devices before validation and pathfinding (#763). - Shipped the emulated-gear test tier (ADR 0010, phases 0 to 3b): a checked-in NOS lab
(FRRouting and Nokia SR Linux, images pinned by digest), the first two real driver
packages,frr_l3(Layer 3 Switch) andsrl_l2(Layer 2 Switch), a binding driver
contract that a device rejection is a failure, and two CI tiers (issue #785): the
dialect suites on every PR and insidemake everything, the via-stack feature suites
nightly. - The reservation assistant can consult documentation (ADR 0015, issue #31):
search_docs
andread_docover the built-in manual, operator corpora, and allowlisted https
sources, advertised only when a source is enabled and refused at the dispatch boundary
otherwise. - Wiring retry hardening: retry failure writes are by row identity (#814), the two retry
channels claim a row before driving it so a driver is never called twice for one row
(#817, a seventh retry outcomein_progress), and the nightly uploads per-test e2e
artifacts on failure (#813). - Seeding moved into the
seedtoolspackage with a subcommand CLI (full,acl,frr,
nos; issue #791), replacing the root script and both shell wrappers. - Purpose classification gains an admin per-reservation trigger,
POST /admin/purpose-review/{id}/classify(#808), the operator's retry for one row
without a global backfill. - Consolidations and fixes from the 2026-09-12 review of the driver batch (#778 to #784),
GET /connectionson the shared visibility helper (#809), and the frontend test runner
on vitest 5 with a temporary jest-dom type shim (#806).
Delivery detail
Layer 3 routing intent
- Layer 3 routing intent is now checked at the INTERFACE, not just the switch
(issue #756, ADR 0014 addenda X-J and X-K). ALayer 3 Switchconfig's
interfacesentries take two optional fields,kind(physical, the
default, orlogical) andport(the HERD inventory port name a physical
interface maps to, defaulting to the interface's own name). A route out of a
physical interface whose port carries no resolved hop is refused with a new
reason,l3_interface_unwired, at the fork save gate, at topology and
reservation-create validation, and again at execution's drive-time
re-validation, all through the one sharedherd_common.l3_validation. A
logicalinterface (a loopback, an SVI, a dummy interface enslaved to a
virtual router) is exempt and the switch-levell3_switch_unattachedcheck
is unchanged. Existing configs are read the strict way, every interface
physical with its port equal to its name, so a switch whose OS interface
names differ from its HERD port names needsportdeclared. - Virtual routers now reach the Layer 3 driver contract (issue #755, ADR 0014
addenda X-G, X-H, X-I).configure_routeandremove_routetake a
virtual_routerkeyword, and a driver opts in by declaringsupports_vrfin
itsdriver_metadata.json; execution passes the keyword only to a declaring
driver, because every Layer 3 signature ends in**_and a non-declaring one
would swallow it in silence and install the route in the default table.
A switch whose driver does not declare it still has its VRF routes refused
withl3_vrf_unsupportedand no driver call. A route's virtual router is now
validated against the switch's config (l3_unknown_virtual_router,
l3_interface_outside_virtual_router,l3_interface_bound_to_virtual_router),
by one sharedherd_common.l3_validationthe cabling save gate and execution's
drive-time re-validation both import instead of the two hand-synced copies they
carried.drivers/frr_l3renders the VRF form and now reports a route FRR
accepted but never installed as a failure;drivers/mock_l3records the VRF;
and the checked-in FRR lab node boots with a real VRF fixture so the live
suites can prove the success case, not just the refusal. - Shipped phase 1 of first-class Layer 3 routing intent (ADR 0014, issue #34):
cabling migration 0011 addsfork_l3_routes, a canvas parser reads
data.l3.routeson Layer 3 Switch device nodes, both fork write paths (fork
save and fork-on-activation) reconcile the resolved route set under the
existing fork row lock, and/topologies/{id}/validateand/validate/internal
gain aninvalid_routespass with ten refusal reasons (malformed shape, not a
router, unconfigured, unattached, duplicate route, and five per-route IP/interface
checks), fail-closed with a 503l3_config_unavailableon an inventory outage.
Reservations' create-time gate folds route problems into its existing
unreachable-topology error, and the fork's resolved routes ride the internal
and user-facing fork GET. Inventory gained an internal batch device-type
lookup (POST /internal/devices/batch) to serve the validation pass.
Editor and execution-side consumption are phases 2 and 3, shipped below. - Shipped phase 2 of first-class Layer 3 routing intent (ADR 0014, issue #34):
the topology editor's canvas contract gainsdata.l3on a device node
(L3RouteIntent[], persisted through fork commit, autosave, and restore
preview like any other node data), a new Routing panel that appears when a
single Layer 3 Switch device node is selected (add/edit/remove routes,
import the switch's latest device-config routes with a confirm-to-replace
when rows already exist), a route-count badge on the canvas node that turns
red on a validation problem, and the editor's first call to
POST /topologies/{id}/validate, fired after a plain topology save when the
canvas carries any routing intent. Fork-save (409l3_intent_invalid/422
l3_intent_malformed/503l3_config_unavailable) and reservation-create
(422topology_routing_intent_invalid) refusals render the same per-node
badge and per-row reasons. The fork version diff reports a route-set change
on an otherwise-unchanged device node ("Routing changed on : +A
routes, -B routes"), comparing destinations in the server's canonical form
so a canonicalization-only difference is never reported as a change nobody
made. Execution-side consumption (phase 3) shipped below. - Shipped phase 3 of first-class Layer 3 routing intent (ADR 0014, issue #34):
execution now consumes a fork's resolved routing intent instead of always
reading a switch's latest config version. Precedence is per switch: intent,
when the fork carries it, IS the route list; otherwise the pre-phase-3
config-version fallback is unchanged. A switch that stays adjacent across a
fork save now reconciles its route-set DELTA against changed intent (removes
before adds, one login/logout, the pin advancing only on full success), the
one deliberate exception to the "pinned, never re-derived" rule; an
inter-switch trunk hop that the adjacency derivation would otherwise skip
still counts when either end carries intent. Before any intent-driven route
drives, it is re-validated against the switch's CURRENT config when its
validation stamp is missing or stale, and any route naming avirtual_router
refuses the whole switch until the driver contract gains VRF support (issue
#755): either way the switch lands a FAILED pin with the refusal reason and
no driver call, never a partial drive. The retry channel drives a
still-adjacent switch's CURRENT intent, not a stale FAILED row's own routes,
when intent is present. The four-field route identity packing moved to
herd_common.l3_route_identity.route_identity_key(issue #757, closed),
shared byte-identical between cabling'sfork_l3_routes.route_keyand
execution's fork-route-to-pin comparisons.tests/load/locustfile.pygained
aRoutedTopologyValidatoruser class exercising the L3 validate pass under
load. No schema change on the execution side. - Fixed issue #758:
fork_l3_routes.route_keywasString(400), which legal
routing intent could overflow (a 64-character non-ASCIIvirtual_routerand
the defaultjson.dumpsescaping inflated past 400 characters), 500ing a
fork save and, on activation, stranding the reservation with no fork at any
layer.route_keynow packs withensure_ascii=Falseand the column widens
toText(cabling migration 0012). - Fixed issue #759: the reservations-to-cabling fork SAVE forward used the
default 10s timeout while cabling's L3 save gate may run up to its own 12s
deadline, so a save could time out on the reservations side and 503 the user
while cabling went on to commit it. The save forward now uses a 20s budget,
matching the headroom already given to the validate forward. - Docs and manual for phase 4 of first-class Layer 3 routing (ADR 0014, issue
#34): with all three delivery phases merged,PLANNED_FEATURES.md's entry
flips fromPartialtoShippedwith a phase-by-phase summary and PR
numbers, andFEATURES.mdgains a Topology-section bullet describing the
Routing panel (route table, Import from device config, the route-count
badge) plus a corrected one-sentence precedence statement (fork routing
intent, else the switch's latest config version) on the existing Layer 3
provisioning bullet.docs/ARCHITECTURE.mdhad one stale "not yet built"
sentence left over from when phases 2 and 3 were still in flight, corrected
to say both shipped. The published manual'suser-topology.htmlgains a
Routing panel mockup in the wiring section,user-live-editing.html#fork
gains one sentence on the fork-diff "Routing changed" line, and
glossary.htmlgains a Routing intent term.
Emulated-gear tier and drivers
- Wired the NOS lab dialect tier into
make everything(Lane's decision,
2026-09-12): it now runsmake nos-test-dialectas its own phase, after the
live LDAP auth phase and before frontend coverage, so a full local gate also
proves the real SR Linux and FRR dialects.make masteris unchanged and
does not run it; the via-stack feature tier stays nightly-only either way.
tests/unit/test_nos_lab_ci_wiring.pypins both sides of the asymmetry. - Split the NOS lab suites into two CI tiers (issue #785). The four dialect
suites, which drive one driver against one lab node with no HERD stack, run
on every pull request from ci.yml's new advisorynos-dialectjob; the two
via-stack feature suites, which drive a real SR Linux and a real FRR node
through HERD's own reservation path, run in nightly after the seed step and
before the load test. Both go through new Makefile targets,
make nos-test-dialect(boots the lab if it is not already up, tears down
only what it started) andmake nos-test-feature(attaches the lab, seeds
it, always detaches), so a workflow and a local run share one recipe.
tests/unit/test_nos_lab_ci_wiring.pyfails if a new file under
tests/nos_lab/belongs to neither tier. Neither target is wired into
make masterormake everything. - Tightened the two
tests/nos_lab/via-stack feature tests so they prove what
they claim (issue #782). The FRR Layer 3 test now runs a fork SAVE with a
CHANGED route set, which is the only path that exercisesgate_l3_intent,
the stagedreservation.wiring_changed, and execution's route-set delta
reconcile, and it verifies both halves of that delta on the real router; its
rejection test pins the device's own% Unknown command:wording instead of
any non-empty error string; every destination assertion now matches the FULL
prefix (the oldsplit("/")[0]form matched a leaked neighbouring prefix);
and a non-200 fromGET /execution/runsnow fails loudly instead of being
swallowed into "the route was never configured". The SR Linux Layer 2 test
now activates over an edgeless canvas and adds the edge in the fork save, so
the membership is attributable to the save; its device baseline is taken
before the reservation exists and scoped to the two ports and the allocated
VLAN rather than "no mac-vrf anywhere"; and its device cleanup checks its
exit status and reports thesr_clistderr. Both files now probe their
preconditions from a session-scoped fixture, so collection touches neither
the network nor docker. - Closed four rejection-classification gaps in the FRR drivers (issue #779)
and the sharedHERD_portparsing defect (issue #780).drivers/frr_mgmt
anddrivers/frr_l3now anchor the benign "already absent" carve-out at the
START of the device's line instead of testing for it anywhere in the line:
FRR quotes the offending command back inside% Unknown command: ..., so a
config line containing that phrase had its genuine rejection reported as
success (verified live on the NOS test lab node).frr_mgmt.configure()now
classifies itswrite memoryoutput instead of assuming it worked, since a
failed save prints no%line and exits 0; it requires a
configuration saved to ...line and reports{"success": False}with the
offending save line otherwise, and its failure payload calls the commands
attemptedrather thanapplied.frr_l3gotfrr_mgmt's
collect-and-partition scanner, soremove_routereports the first GENUINE
line and treats a response asalready_absentonly when every%line in
it is benign. Both drivers now parseHERD_portin_connect()rather than
the constructor, treating blank or missing as 22 and raising
DriverError("HERD_port must be an integer")otherwise, so a device with a
present-but-emptyportfield degrades to{"reachable": False}instead of
failing the sandbox before any method runs.docs/DRIVERS.mdgained the
anchoring and persist-classification rules, the Hypervisor
create_instance/destroy_instanceexception to "an absent key stays
success", and a note thatfrr_l3deliberately does not persist its
reservation-scoped routes. - Fixed
drivers/srl_l2applying part of a batch it reported as failed, and
committing configuration staged by an earlier call that died (issue #778). SR Linux
stages everyset/deletein a per-user private candidate that onlycommit stay
applies, and that candidate outlives the SSH session: netmiko keeps sending after a
rejected line, so the old unconditionalcommit()applied the valid PREFIX of a
rejected batch (proven live:admin-state enablelanded on a port HERD believed
untouched while the driver returnedsuccess: False), and any exception path left
lines staged for the next call's commit to pick up through the device._applynow
discards the candidate at entry, returns failure on a set-time rejection before it
ever commits, discards on a commit refusal, and discards in afinallyon exception
paths. The module docstring's "shared session" rationale is replaced with the
persistent-candidate fact (the sandbox runs one process per action, so there is no
shared session) and gains the best-effort limitation blockdocs/DRIVERS.md
requires. Also (issue #780,srl_l2only) an optionalHERD_portthat is blank now
means 22 instead of raisingValueErrorfrom the constructor, and a non-integer
raisesDriverError("HERD_port must be an integer")from_connect, sostatus()
still degrades to{"reachable": False}for health polling. New live regression
tests intests/nos_lab/test_srl_l2_driver_live.pyverify the device independently
through a separatedocker exec nos-test-srl sr_clisession. - Pinned the NOS lab and Selenium images by digest (issue #783): SR Linux
(26.7.2-519), the FRR base image (no matching version tag; digest only),
andselenium/standalone-chrome(4.43.0-20260404), plus the FRR
Dockerfile'sapk add opensshversion; added--wait-timeout 120to the
Seleniumup --waitrecreate; tightened the Makefiledown-line test
regex to catch@/-/VAR=value-prefixed and conditional spellings;
madenos-detachreport per-container attachment and exit non-zero on a
real disconnect error; fixedscripts/seed_nos_lab.sh's misleading
SEED_NOS=1message on its default--nos-onlypath; hardened
infra/nos-test/frr/start.sh(set -e, an sshd-up check) and extended the
FRR healthcheck to also probe port 22. - Shipped phase 3b of the emulated-gear test tier (ADR 0010), the Layer 2
counterpart of phase 3a's Layer 3 proof:tests/nos_lab/test_srl_l2_via_stack_live.py
proves HERD derives a Layer 2 VLAN membership from a reservation's wiring and
configures it on the REAL Nokia SR Linux node entirely through HERD's own API,
execution service, and driver sandbox (drivers/srl_l2), not by calling the driver
directly. It reuses the seedednos-lab-dut-1/nos-lab-dut-2/nos-lab-srl
devices and cabling (scripts/seed_nos_lab.sh), wires the two DUTs together on a
topology canvas with no switch node (cabling's pathfinder resolves it through the
real switch'sethernet-1/1/ethernet-1/2ports), activates a reservation over
it, and saves the fork to drive the connection-driven L2 reconcile (ADR 0009).
It reads the VLAN id HERD allocated from the reservation's own
GET /reservations/{id}/wiring-statussurface instead of assuming a number,
independently verifies on the real device (a separatedocker exec nos-test-srl sr_clisession, never the driver's own session) that themac-vrf
network-instance exists AND both subinterfaces are bound into it, cancels the
reservation, and independently verifies both the port bindings and the VLAN
definition are gone, cross-checking HERD's own ledger (RELEASED) against the
device at each step.delete_vlanruns in its own driver session shortly after
the membership ledger flips RELEASED, so the teardown-side device check polls
rather than asserting once. Same gating and cleanup discipline as
test_frr_l3_via_stack_live.py; see docs/NOS_LAB.md. - Shipped phase 3a of the emulated-gear test tier (ADR 0010): the checked-in
NOS test lab can now be wired into a running HERD stack so HERD drives the
real devices through its OWN execution service and driver sandbox, not by
calling a driver directly. New Makefile targetsnos-attach/nos-detach
connect/disconnect the lab containers (nos-test-srl,nos-test-frr) to
the dev stack's Docker network, so the execution service reaches them by
CONTAINER NAME over Docker DNS (container IPs are not stable across a
recreate; container names are).seed_devices_public.pygained
seed_nos_lab(gated bySEED_NOS=1, mirroringseed_frr_demo's
SEED_FRR=1shape): it registers the realdrivers/srl_l2and
drivers/frr_l3packages, one device template each, the two lab devices
withfield_data.ipset to the container name, two placeholder DUT
devices, and cabling to the SR Linux node'sethernet-1/1/ethernet-1/2
ports, laying the groundwork for a later phase to derive an L2 VLAN
membership from recorded L1 hops (ADR 0009); a new--nos-onlyseed-script
mode andscripts/seed_nos_lab.shwrapper mirror the existing--acl-only/
seed_frr_demo.shpattern.tests/nos_lab/test_frr_l3_via_stack_live.py
is the end-to-end proof: it drives a real static route onto the real FRR
node entirely through HERD's API (a reservation whose fork carries L3
routing intent, ADR 0009/0014), independently verifies the change via
docker exec ... vtysh, removes it via reservation cancellation, and
proves a device-rejected route lands as a FAILED execution run with the
device's own error text, not a false success.tests/unit/test_seed_nos_lab_driver.py
pins the new driver-zip-from-disk helper. Opt-in, needs both the lab
(make nos-up) and a stack with the lab attached (make up,
make nos-attach); not part ofmake test,make master, or
make everything. Seedocs/NOS_LAB.md. - Made "a driver must report a device rejection as a failure" a binding
contract (issue #771):docs/DRIVERS.mdgains a section beside "Dry-run
support" laying out the rule, since both are binding requirements with a
stated consequence, return{"success": False}on a device rejection
rather than raising, put the offending line inerrorsince that is what
lands in a wiring assignment'slast_errorcolumn, and never verify a
driver's own work through its own read path.drivers/frr_mgmt.configure()
is the fix: it classifies every%line in the config output, reports
{"success": False}with the device's own offending line on any genuine
rejection, and counts a batch as clean only when every%line found is a
recognized benign marker, surfaced underbenign_warningsinstead of
masked as a plain success. User-visible consequence: a config apply whose
batch includes an idempotent removal (% Refusing to remove a non-existent route) now succeeds withbenign_warningsrather than
failing. New opt-in coverage intests/nos_lab/test_frr_mgmt_driver_live.py
drives the real driver against the FRR node and independently verifies the
rejection case installs nothing. - Added
drivers/frr_l3/, the first real Layer 3 Switch driver package: SSH-to-vtysh over the same FRRouting node and netmikocisco_iostransport asdrivers/frr_mgmt, implementinglogin/logout/configure_route/remove_route/statusper the Layer 3 Switch contract (docs/DRIVERS.md).configure_routesendsip route <destination> <next_hop>, orip route <destination> <interface>whennext_hopisNone(an interface route);remove_routesends the same line prefixed withno.supports_dry_run: trueis honored on every mutating method (no session opened, transcript still recorded). Verified live against the checked-in NOS test lab's FRR node (docs/NOS_LAB.md) that bothconfigure_routeandremove_routeare idempotent under redelivery: FRR silently no-ops a duplicate route install, and a duplicate removal answers a benign CLI warning rather than an error, so this driver treats both as success, matching the redelivery guarantee the Layer 2 contract states explicitly forcreate_vlan.tests/unit/test_frr_l3_driver.py(stack-free, netmiko mocked) andtests/nos_lab/test_frr_l3_driver_live.py(opt-in,HERD_TEST_NOS_REQUIRED=1) cover it; see docs/DRIVERS.md's new "FRR reference driver" section and docs/NOS_LAB.md. - Added phase 0 of the emulated-gear test tier (ADR 0010): a checked-in,
license-free network-OS lab (infra/nos-test/) with two nodes, Nokia SR
Linux (Layer 2, netmikonokia_srl) and FRRouting over SSH-to-vtysh
(Layer 3 / Cisco dialect, netmikocisco_ios), modeled on
infra/ldap-test/'s stateless, seed-on-boot shape. SR Linux needs a small
checked-in CLI baseline (infra/nos-test/srl/baseline.cli) applied and
saved on every boot to clear a factory-fresh device's[FACTORY]
config-prompt tag, which otherwise breaks netmiko 4.7.0's
nokia_srl.check_config_moderegex. New Makefile targetsnos-up,
nos-down,nos-status,nos-logs,nos-reset(opt-in only, not part of
make test,make master, ormake everything);tests/unit/test_nos_lab_compose.py
pins the compose file's stateless shape and port non-collision with the
dev/gate stacks;tests/nos_lab/test_nos_lab_live.pyis an opt-in live
suite (HERD_TEST_NOS_REQUIRED=1, mirroring the LDAP live-suite
convention) that creates and independently verifies a VLAN on SR Linux
and a static route on FRR. Seedocs/NOS_LAB.md. - Added
drivers/srl_l2/, HERD's first real (non-mock) Layer 2 Switch
driver: Nokia SR Linux over SSH via netmiko'snokia_srlplatform,
modeled structurally ondrivers/frr_mgmt/(HERD_-prefixed connection
params, dry-run gating,record_command,DriverErroron missing
connection params) but mapping VLANs onto SR Linux's mac-vrf
network-instance model instead of Cisco's flatvlan <id>object: a
VLAN is anetwork-instance vlan<id> type mac-vrf, and a port joins it
through a tagged-or-untagged bridged subinterface plus a binding. Every
mutating command is issued as an absoluteset /ordelete /path, a
load-bearing detail: SR Linux's candidate-mode CLI otherwise carries a
"current context" across commands in the same session that an
unqualified command can silently inherit.create_vlanand
delete_vlanare idempotent by construction (SR Linux treats a
redefinition or a delete-of-missing as a no-op commit), proven live, not
merely asserted, in the newtests/nos_lab/test_srl_l2_driver_live.py.
tests/unit/test_srl_l2_driver.pypins the exact command text for the
tagged and untagged forms and the commit-per-mutating-op invariant with
netmiko mocked. Seedocs/DRIVERS.mdanddocs/NOS_LAB.md.
AI orchestrator
- The reservation assistant can now consult documentation instead of answering
from training data (issue #31, ADR 0015). Two read-only tools,search_docs
andread_doc, search and page through named sources: the published HERD
manual, which now ships inside the ai-orchestrator image, plus any corpus an
operator mounts throughAI_DOCS_CORPUS_DIRS, plus allowlisted https URLs
whenAI_DOCS_WEB_ENABLEDis on (off by default). The tools are advertised
only when at least one source is enabled and refused at the dispatch
boundary otherwise; a web fetch must match an allowed prefix, resolve
entirely to public addresses, survive re-validation at each of at most three
redirects, declare a text content type, and stay under a byte cap. Results
go through the same per-tool size cap and untrusted framing as every other
tool result.
Wiring retry and execution
- The two wiring retry channels can no longer drive the same FAILED row at once
(issue #817). The manual endpoint and the background tick both load
hardware-retryable FAILED ledger rows and drive them through the same applies;
issue #814 stopped a late failure write from corrupting the ledger, but
nothing claimed a row before it was driven, so one connection could get two
concurrent driver calls, from two execution processes even, since the tick
runs in every replica. Each retried row is now claimed by a compare-and-swap
on a new nullableclaimed_untilcolumn immediately before that row's own
driver call, and a row the other channel holds is skipped with no driver call
and no ledger write. The claim is taken at drive time rather than at
selection because one batch is driven sequentially behind a per-switch login,
so the last row of a batch can reach its driver call minutes after the batch
was selected. Its budget is derived from the driver-call timeout and the
in-line attempt count rather than a new setting, every record path clears the
stamp, and a stamp left behind by a process that died mid-drive expires by
itself, so there is no reaper and no heartbeat. The retry outcome vocabulary
gains a seventh value,in_progress, for a row the other channel was already
driving: reporting it beats omitting it, since an absent row reads as one that
was already fixed. The L1 and L2 FAILED-to-ACTIVE success flips also moved to
the same SQL compare-and-swap L3 already used, so all three layers share one
flip discipline. - A wiring retry no longer resurrects rows that were released while it was
running (issue #814). Both retry channels (the manual endpoint and the
background tick) now record a driver failure against the ROW they loaded,
under a compare-and-swap on (id, status FAILED), instead of upserting by
(reservation, switch, port/pair). The upsert matched only non-RELEASED rows,
so a retry whose rows were flipped ACTIVE by the manual channel and then
released by a fork save during its driver call found nothing and INSERTED a
fresh FAILED row, leaving zombie build-direction failures for wiring the
reservation no longer intends (four L2 membership rows where two were
correct). The stale write is now a logged no-op at all three layers; the
fresh-build path keeps its upsert, since a build after a release is a
legitimate re-add.
Purpose classification
- An admin can now classify one reservation's purpose on demand instead of waiting for
the background sweep to reach it (issue #808).POST /admin/purpose-review/{reservation_id}/classifyruns the sweep's own single-row
classifier synchronously for exactly that reservation and returns its outcome (ok,
timeout,transient,failed, orforbidden, all still 200;feature_off
answers 503 instead, matching how other AI-gated endpoints respond when
unconfigured); 404 for an unknown reservation, 409not_eligiblebefore the
reservation reaches a terminal state, 409already_suggestedonce a suggestion
already exists. It deliberately ignorespurpose_classify_max_attempts, so it
doubles as a way to retry one exhausted row without running the global backfill, and
the sweep's oldest-first fairness is unchanged. The single-row classifier moved from
the expiration task topurpose_service.classify_purpose_oneso the new router does
not import fromtasks/; the sweep reconciler now calls it from its new home. Fixes
the reused-stack flake intest_purpose_review_flow.py(the test now triggers its
own reservation directly instead of waiting on the sweep's backlog), and the
now-unusedclassify_sweep_firstpytest marker and its collection-reordering hook
are removed.
Seeding, CI, and tooling
- Nightly now uploads the per-test e2e artifact directory on failure (PR #813): the
workflow setsHERD_E2E_ARTIFACT_DIRinto the workspace so the failure upload carries
each failed test's screenshot, page HTML, console log, and traceback alongside the
compose logs;tests/unit/test_nightly_e2e_artifacts_wiring.pypins the wiring. - Moved the frontend test runner to vitest 5 and
@vitest/coverage-v85 (PR #806,
superseding Dependabot #796 and #800, which each failed alone on a peer conflict).
jest-dom 7.0.1 augments vitest'sAssertionwith one type parameter and vitest 5's
has two, so every matcher vanished from the type system (1220tscerrors);
frontend/src/test/vitest-jest-dom.d.tsis a temporary shim that re-augments the
two-parameter shape until jest-dom ships a compatible release (upstream
testing-library/jest-dom#738). Runtime was never affected: the same 1372 tests pass
before and after. - Moved seeding into a
seedtools/package with a subcommand CLI and retired
the root module and both shell wrappers (issue #791).seed_devices_public.py
(2,637 lines),scripts/seed_frr_demo.sh, andscripts/seed_nos_lab.share
gone;python -m seedtools full | acl | frr | nosreplaces them, with
--fullonfrrandnoslayering a demo onto the whole population the way
the wrappers did, andmake seed,make seed-frr, andmake seed-nosas
the front doors. Credential resolution lives once inseedtools/client.py
(SEED_, then SUPERADMIN_ from the environment, then SUPERADMIN_* read from
.env, then a generic placeholder), so the Makefile recipe and the two
wrappers no longer each re-implement it, and the personal default address the
root module carried is gone. Behavior is otherwise unchanged: the same
section headers print, every subcommand is still re-runnable, and SEED_FRR=1
/ SEED_NOS=1 still layer the demos ontofull. The four seed unit tests now
import the package instead of loading a file by path. - Fixed
pick_dut_template's last fallback tier inseed_devices_public.py
(issue #781, follow-up to #775): it returneditems[0]even when no
template declared the seed fields, guaranteeing a create that fails
inventory validation. It now returnsNonein that case, which the caller
already handled by skipping ACL fixture seeding. Also hardened
template_field_keysto skip fieldless entries and gave the
get_or_create_devicefield-key assert a message. - Fixed
make seedfailing with "Unknown fields: ip, login, password"
when an integration-suite-seeded template (int-seed-template-*,
Management-backed but declaring onlymodel) sorts ahead of a template
that declares the fieldsget_or_create_devicesends (issue #775).
pick_dut_templatenow only considers templates that declare every key
the seed will send, preferring a Management-backed one among those, then
any usable one, then the previous fallback; the required key set lives in
one constant,SEED_DEVICE_FIELD_KEYS, whichget_or_create_device
asserts against so the two cannot drift apart.
tests/unit/test_seed_pick_dut_template.pycovers the exact ordering
from the bug. - Fixed the stack-lifecycle Makefile targets so a
make everythinggate cannot be
blocked by a leftover e2e Selenium container: every composedown(down,clean,
clean-data,gate-clean,_clean-images,_master-stack-down) now enables the
e2eprofile, since a profile-gated service that is not enabled is neither active
nor an orphan and survived a plaindownholding host port 4444. The e2e recreate
now uses--waitagainst a new Grid healthcheck on the Selenium service, so the
first Playwright page load no longer races the new container's network setup
(net::ERR_NETWORK_CHANGED, the recurring first-test login timeout). Pinned by
tests/unit/test_makefile_stack_lifecycle.py.
Visibility and security
- Internal refactor, no behavior change:
GET /connections(issue #719) now
resolves its non-admin visibility filter through the shared
resolve_caller_visibilityhelper (issue #763) instead of an inline copy of
the admin-check/fetch/503 sequence, the same helper the topology validate
and pathfind routes already use. Status codes, detail text, the admin
bypass, and the empty-visible-set short circuit are unchanged; the only
observable difference is the warning logged on an unanswerable inventory
lookup, which now carries the shared event keycaller_visibility_unavailable
instead of the route-localconnections_visibility_unavailable, matching
the other two consumers. - Device visibility now gates the topology validate route and both pathfind
routes (issue #763, hardening). For a non-admin caller, a canvas node naming
a device outside their device-group visibility is reported as
missing_deviceand is excluded from the reachability and Layer 3 passes, so
POST /topologies/{id}/validateno longer answers interface and subnet
questions about gear the caller cannot see; a pathfind pair naming such a
device is refused with the same404 Device not foundan unknown id gets
(the batch route reports it per pair through a newerrorfield), and a
transit hop through one comes back redacted:PathHop.device_idis now
nullable, with a newhiddenflag and no port names. Hop counts,
reachability and the topology editor are unaffected, admins are not filtered
at all, and an unanswerable visibility lookup fails closed with a 503. The
openGET /topologies/{id}stays open by decision, recorded in
docs/ROLES.md.