Repository navigation
HERD v0.7.0
Release gate: a clean make everything at the tagged commit.
[0.7.0] - 2026-11-08
- A hardening release. The 177 entries under Delivery detail are 115 fixes, 31 test
changes, 18 documentation changes, 4 behavior changes, 4 additions, 1 security change, 3
list-page features, and the upgrade note for the Traefik change. - Token settings are checked when a service starts. Every service that checks access
tokens validatesAUTH_SECRET_KEYandAUTH_ALGORITHMas its settings load, so a blank
or placeholder key, or one that cannot serve as an HMAC secret, stops the service with a
message naming the variable instead of signing tokens with it. Tokens are signed and
verified with PyJWT instead of python-jose, through one helper,
herd_common.jwt_codec.decode_access_token, which passes exactly one algorithm and a 10
second leeway (#1186). Non-admin template reads now mask password-field defaults the way
device reads mask password values. The settings check and the template masking are the
fixes for the two security advisories addressed by this release. - Untrusted input is bounded earlier. A driver package's files no longer run in the
sandbox child before its resource limits apply: the child starts in Python's isolated
mode and puts the package on its path only after the limits are set (#1180). An uploaded
tar whose pax extended header or GNU long name is over 1 MiB is refused at the header
block, before any of the record is read; the earlier per-read bound did not hold on
Python 3.13.18, which reads such a record in 1 MiB chunks (#1279). The e2e Selenium
container publishes its WebDriver and noVNC ports on 127.0.0.1 only (#964). The buffered
reservation assistant route answers 502 without the exception's text when a turn fails
with an exception class it does not name, where it used to answer a plain 500 (#1280). - A stack shares its host more safely.
HERD_GATEWAY_BINDpublishes the gateway on one
host address (#1256). Each stack's Traefik now discovers only its own compose project's
containers, andmake up,make dev, andmake prodrefuse to start while another
compose project publishes port 80 or 443; recreate Traefik after pulling, as the upgrade
note below says.make certswrites a self-signed gateway certificate valid for ten
years, so a fresh clone is no longer served Traefik's built-in certificate, and the TLS
store names that pair as its default (#1239). Auth boots on a stack upgraded in place
beforemake migratewhen the new release adds a column tousers(#1261).make everythingruns the ci.yml checks it used to skip, among themuv lock --check, the
frontend suite underTZ=America/Los_Angeles, and thepackage-lock.jsonsync check. - Accounts have profiles, and the list pages have a filter panel. Every account has a
required display name and an optional contact email and phone number, which the account
edits on Settings and an admin edits from Admin > Users (#1252). List pages share a left
filter panel (#957). The Topologies page gains search, an Owner filter, sortable
columns, and multi-select delete (#958), and the Reservations page can be searched and
filtered by Status, Category, and Period, with the choices saved per user (#959). - Webhook subscriptions can be paused, and several interface defects are fixed. An admin
can pause and resume a webhook subscription withPATCH /api/v1/webhooks/{id}, keeping
its delivery ledger; a paused subscription receives no event and nothing is replayed on
resume (#1078). Modal dialogs open centred again; Tailwind 4's base styles had pinned
them to the top-left corner in every release through 0.6.0 (#979). Toasts appear at the
bottom centre, where they no longer cover the topology editor's Save button (#942), and
the Settings page scrolls again (#1260). - Reservation edits follow the rules create follows (#994 to #1000). A device edit commits
under a status guard, so a PATCH that races a cancel, release, auto-complete, or
activation keeps nothing and answers 409, and inventory is written only for anACTIVE
reservation (#994). An edit can no longer stretch a reservation past
RESERVATION_MAX_DURATION_SECONDS(#995), and a device added to aPENDINGreservation
is judged by the window conflict check (#999). Both provisioning backstops time from a
newprovision_started_atstamp, so a purpose edit no longer restarts the timeout
(#997). The calendar answers 503 to a non-admin when device visibility cannot be
verified, instead of showing every user's reservations (#1000). - Wiring and dynamic instances recover from failures that used to strand them. VLAN
numbers are unique across everything reachable through the current cabling, transit
switches included, so a cable change no longer lets two reservations share a number in
one fabric (#1003). The background wiring retry no longer stalls on a ledger whose
oldestFAILEDrows it will never drive (#1190), and one reservation's failed upstream
read no longer stops the retry for every other reservation in that layer (#1204).
Execution no longer reads a 401 or 403 from inventory as a missing device or template,
so during anINTERNAL_API_TOKENrotation a live switch's wiring rows are retried
instead of pinnedFAILED(#1203), and a reservation lifecycle event refused the same
way is retried instead of dropped (#1215). Ending a reservation runs a keyed destroy for
a dynamic instance whose create never reported a handle, and the #896 compensation path
uses it too; existing Hypervisor recipes must acceptinstance_ref=None(#937). A
ledger write that loses the FAILED-to-ACTIVE compare-and-swap returns the winner's row
instead of raisingMissingGreenlet(#1152). - Tests prove what they claim. A test-effectiveness sweep read every test file in the
repository, verified 75 high-severity findings by mutation, and landed the fixes (#1134
to #1148, #1158); it also found the ledger defect above (#1152). Three Playwright tests
order their read-backs by the HTTP response of the action they wait on instead of a
toast an earlier action left on screen (#1169). The assistant integration tests that
judge the local model's own tool choices carry anai_modelmarker and run in a
separate invocation after every deterministic integration test, so one model miss no
longer leaves the rest of the suite unrun (#1270). The NOS lab's SR Linux healthcheck
waits for an SSH banner (#1263), and the FRR image builds again with its openssh pin
moved to the version Alpine 3.16 still carries (#1268).
Delivery detail
-
Fixed: an uploaded tar with an oversized pax extended header or GNU long name is refused again on Python 3.13.18 (#1279). The bound from #1179, #1180, and #1192 was a per-read limit,
herd_common.bounded_tar.BoundedTarStreamrefusing any single read overMAX_TAR_READ_BYTES(1 MiB), which worked because tarfile on 3.12 reads such a header's whole record in one call. Python 3.13.18 reads it in 1 MiB chunks (tarfile's_safe_read, gh-151497), every chunk passed the bound, and a driver package or AI generate tgz declaring an 8 MiB record was read into memory in full instead of being refused, and in the GNU long-name case extraction started. The bound is now a header check:BoundedTarInforefuses an extended header (paxxandg, SolarisX, GNULandK) whose record, rounded up to its 512-byte block, is overMAX_TAR_READ_BYTES, at the header block and before any of the record is read, whatever size of reads tarfile makes. Every uploaded tar is opened through one helper,open_bounded_tar, which passes that class (ai-orchestrator's_BoundedTarInfonow extends it) and keeps the per-read bound as the second line; the refusals are unchanged: execution'sPackageLimitError, inventory's 422, and ai-orchestrator's 400, each with the same detail. HERD's images and CI run 3.12, which was not affected; the five tests per service that failed on 3.13.18 pass on both. -
Added:
make certsgenerates the gateway's TLS certificate, so a fresh clone is no longer served Traefik's built-inTRAEFIK DEFAULT CERT(#1239). The repository never trackedinfra/traefik/certs/server.key, so the tracked chain could not load anywhere but a host that had supplied its own key, anddynamic.ymlset no default certificate, so a client connecting by IP address (no SNI) got Traefik's own even there.make certs(scripts/make_certs.sh) writesserver.keyand a self-signedserver-chain.crtvalid for ten years, naminglocalhost,127.0.0.1, theHERD_GATEWAY_BINDaddress, and anyCERT_SANSentries, only when the key is absent: with both files present it changes nothing, with the key present and the certificate missing it issues a certificate for that key, andCERT_FORCE=1regenerates both.make up,dev,prod, and the gate's stack start run it first, and CI's integration job and nightly, which start their stacks with a baredocker compose up, run it as a step before that;dynamic.ymlnames the pair as the default certificate too, so a pair that does not load now means no TLS handshake at all rather than the built-in certificate. The tracked root, intermediate, and leaf certificates are removed (no consumer; their key was never public), andinfra/traefik/certs/README.mdkeeps the directory. Trusting the certificate stays a manual step (FRESH_SETUP.md step 3).tests/unit/test_make_certs_wiring.pypins it through realmakein scratch checkouts; spec rule OPS-GUARD-5. -
Fixed: the buffered reservation assistant route (
POST /reservations/{id}/assistant) no longer answers FastAPI's plain 500 when the turn fails with an exception class it does not name (#1280). It now does what the streaming route already did: before any write tool landed, the turn is rolled back, its spent tokens are metered, and the route answers 502Assistant call failed; after a write landed, the turn is kept and answered 200 withincomplete: "ai_error". Neither the response nor the stored rows carry the exception's text; the failure is logged once asai_assistant_unexpected_errorwith its class and traceback, as the streaming route logs it (spec rule AI-TURN-9). -
Fixed: one miss by the local model in an assistant integration test no longer stops the rest of the integration suite and the gate (#1270).
make everythingfailed on 2026-11-06 when the 9B model behind the host's vLLM bridge answeredtest_assistant_answers_a_herd_how_to_from_the_manualfrom itssearch_docsresults without theread_docthe test asserts, andmake test-integrationruns pytest with-x, so every later integration test went unrun. The three tests that judge the model's own tool-call choices (test_assistant_loop_response_shape_against_live_stack,test_assistant_write_flow_discovers_schema_first, and the docs-lookup test) now carry a registeredai_modelmarker;make test-integrationruns-m "not ai_model"and keeps-x, and the newmake test-integration-airuns-m ai_modelwithout-xright after it in bothmasterandeverything, so a model miss still fails the gate but only after every deterministic test has reported. The docs-lookup test also asks its question once more when, and only when, the first turn searched the documentation without error and did not read the manual page; a second miss in a row fails, and a non-200, a turn with nosearch_docscall, or an erroring tool still fails on the first turn.tests/unit/test_ai_model_marker_wiring.pyrequires the marker on every integration test that callsai_provider_configuredand readstool_calls, and pins the registration, both pytest commands, and both gates' calls. nightly.yml runs the whole directory with no-mand is unchanged. -
Docs: three new developer guides,
docs/specs/DEVELOPMENT.md(install, run, gates, git and CI, migrations, releases),docs/specs/TESTING.md(writing and running tests at every level, the test effectiveness rules, the e2e and integration gotchas, the pg-live suites), anddocs/specs/CONVENTIONS.md(how the code is organized per area, the one helper for each job, what must not be reintroduced). They carry the operating rules that until now lived only in an untracked local file, so every clone has them. They live beside the specifications but are not specifications: they have no template sections and no rule identifiers, and the spec drift guard (tests/unit/test_spec_references.py) checks only their repository paths and relative links.docs/specs/ai-features.mdlists #1280 (the buffered assistant route's plain 500) and the tgz CPU-time limit,device-configuration.mdthe driver loader's pax-header bound,inventory.mdthe outage-order asymmetry of three older reads, andtopology.mdthe label-only node decision. -
Fixed: the NOS lab FRR image builds again (#1268).
infra/nos-test/frr/Dockerfilepinnedopenssh=9.0_p1-r5, and Alpine 3.16's repository (the pinned frrouting/frr base image is Alpine 3.16.2) now carries onlyopenssh-9.0_p1-r6, so every fresh build failed withopenssh-9.0_p1-r6: breaks: world[openssh=9.0_p1-r5]andmake nos-upstopped there; the advisorynos-dialectjob and the nightly NOS lab feature tests failed with it, while hosts with a cached image never rebuilt the layer. The pin is nowopenssh=9.0_p1-r6, the version an unpinned install resolves to on the same base image, as the Dockerfile's bump procedure says. -
Fixed: auth boots on an upgraded-in-place stack before
make migratewhen the new release adds a column tousers. The startup seed's existence check,superadmin_exists, selected the wholeUsermodel, so on a schema stamped at the previous release (startup never runscreate_allthere, #419) it named the columns revision 0009 added (full_name,contact_email,phone), the SELECT failed withcolumn users.full_name does not exist, auth exited at startup, andmake upended with the auth container unhealthy; undermake prodthe container crash-looped, somake migrate-auth(adocker compose exec) raced the restarts. The seed's three existence checks now select the id only:superadmin_exists(withLIMIT 1), the newemail_registeredfor the configured superadmin email, and the newgroup_name_existsfor the "Not Grouped" group, so no column a later release adds is read at boot.docs/OPERATIONS.mdnow states the column case and themake prodremedy,docker compose -f docker-compose.yml run --rm <svc> alembic upgrade head, anddocs/TROUBLESHOOTING.mdlists the symptom (#1261). -
Fixed: the first SR Linux test of the advisory
nos-dialectjob no longer fails with an SSHConnectionResetErrorduring the banner exchange right after the lab boots (#1263). The SR Linux healthcheck proved the baseline landed but never opened an SSH connection, somake nos-up(docker compose up --wait) could return while sshd still reset new connections. The healthcheck now also runsinfra/nos-test/srl/ssh_ready.sh, which must read anSSH-banner from port 22, and every test-side netmiko session undertests/nos_lab/opens through one helper,tests/nos_lab/_lab_ssh.py'sopen_lab_session, which retries a transport failure at most three times two seconds apart (an authentication failure is never retried) and names the attempt count and the last exception class when it gives up.tests/unit/test_nos_lab_ssh_readiness.pypins both healthchecks' SSH probes, runs the probe against fake servers, and pins the helper. -
Fixed: the Settings page scrolls again (#1260). The app shell clips every page (
AppLayoutputs the page inflex-1 overflow-hidden), so a page scrolls only when its own outermost element is a scroll container; SettingsPage had none, which was harmless until #1258's Profile section pushed the Notifications section below the fold, where its event toggles and Save button could not be reached by wheel, scrollbar, or keyboard (the three Selenium settings round trips failed withElementNotInteractableException). The page now wraps its content inh-full overflow-y-auto, and a vitest source scan,src/test/pages/pageScrollContainer.test.tsx, fails any page the route table renders underAppLayoutwhose main render is not anh-fullscroll container, with an exact, commented allowlist (the three full-screen pages outside the layout, and the topology editor, whose canvas owns its scrolling). -
Fixed: a 401 or 403 from reservations no longer drops a reservation lifecycle event unrun. Execution corroborates every
reservation.created,.updated,.cancelled,.completed,.failed,.provision_requested, and.wiring_changedagainst reservations'GET /internal/{id}before it runs the handler, and_verify_reservation_eventread any answer below 500 that was neither 200 nor 404 as not corroborated, soprocess_reservation_messageACKed the message and skipped the handler with no NAK and no dead letter. Reservations answers a wrong internal token with 403, so during anINTERNAL_API_TOKENrotation areservation.cancelled,.completed, or.failedwas silently discarded, leaving the reservation's wiring rowsACTIVEand its dynamic instances running after it ended. Only a 404 (reservation not found) and a 200 whose status does not corroborate the event are still ACKed unrun asnats_event_unverified; the corroboration rule itself is unchanged. Every other answer (a 401, 403, 409, a 422 for a malformed id, a 5xx) raisesTransientUpstreamErrorwith the textverify reservation event: upstream <status>(the 404-only status check is now one function,_internal_record_found, which the #1203 device and template reads share), so the event is NAKed with backoff and runs once reservations answers, and a misconfiguration that outlasts the five deliveries (about 81 seconds at the defaults) is dead-lettered and can be replayed. The same check inside a dynamic create (the re-read after theCREATINGrow is committed) now NAKs on such an answer instead of abandoning the event as if the reservation had ended (#1215). -
Fixed: a 401 or 403 from inventory or the secrets service on execution's latest-config, hypervisor, or secret read no longer reads as missing.
_fetch_latest_config,_fetch_hypervisor, and_fetch_secret_valuereturnedNonefor any answer below 500 other than 200, and both services answer a wrong internal token with 403, so during anINTERNAL_API_TOKENrotation a dynamic-instance teardown left the row live withrecipe_config_missingand never destroyed the VM, a dynamic-instance create was dead-lettered on its first delivery as a missing hypervisor or secret (the reservationFAILEDinstead of retried), an L3 switch with no routing intent was skipped as having no routes while the fork version was stamped (its routes never installed), and a switch whose intent needed re-validation was recordedFAILEDwith the misleadingl3_switch_unconfigured. A 401 or 403 on any of the three now raisesTransientUpstreamErrorwith the textfetch latest config for device <id>: upstream 403(orfetch hypervisor <id>: ...,fetch secret <id>: ...), through one check,_raise_if_token_refused, so the event is NAKed and driven again once the service answers: the dynamic instance's ledger row and the refused switch's route row are left unchanged and the fork version unstamped. As with a 5xx, what the same wiring pass did before the read stays as it was left (the L1 and L2 layers, another L3 switch already settled, a stale build row already parked for release, which the retry channels remove). Every other answer keeps its reading by decision: a 404, 409, or 422 still means missing, since a misread on these reads degrades one connection rather than a whole desired set, unlike the device and template reads (#1203). In both wiring retry channels, a FAILED L3 row that records no routes and whose configured-routes read is refused is now skipped for that pass with every column unchanged instead of released as having no routes: the tick leaves it for a later tick, and a manual retry reports itstill_failedwhere it reportedreleased(#1216). -
Added:
HERD_GATEWAY_BINDpublishes the gateway on one host address (#1256).docker-compose.ymlpublishes Traefik's ports 80 and 443 on${HERD_GATEWAY_BIND:-0.0.0.0}, read from the shell environment or.env; the dashboard stays on127.0.0.1:8080. Set it to one address (for example the wired NIC of a host that also has wifi) and the stack answers there only, withlocalhostand every other interface refused. Unset keeps every interface, so CI, nightly, and other clones behave as before, with one difference: the explicit0.0.0.0publishes on IPv4 only, where the bare"80:80"and"443:443"also bound[::]. Nothing in the gates uses the IPv6 listener (curl https://localhostand Chromium fall back from::1to127.0.0.1). The Makefile reads the same value (the environment or command line first, else the lastHERD_GATEWAY_BIND=line of.env) and derives the host its harnesses address:localhostfor unset, empty, or0.0.0.0, otherwise the value. It exportsHERD_BASE_URL(https://<host>/api) andE2E_HOST_BASE_URL(https://<host>) as defaults, somake seed,test-integration,test-contract,test-e2e, andtest-loadfollow it while a value already in the environment wins, and the gate's health wait, its load phase, themake everythingbanner, themake logsnote, andscripts/check_gateway_ports_free.sh's remedies (given the host asHERD_GATEWAY_HOST) name it.make test-loadnow drops a trailing/apifromHERD_BASE_URLfor locust's--host.make gateway-urlprints the derived URL. A browser at a bound IP address warns about the certificate until #1239 lands. -
Added: every account has a profile (#1252): a required display name (
full_name, 1 to 200 characters, not unique), an optional contact email, and an optional phone number (digits, spaces,+,-,(,), at least one digit, at most 32 characters; stored and shown only, nothing calls or texts it). The account edits its own on Settings (PATCH /api/auth/me/profile), and an admin or the superadmin edits any account's, active or not, from Admin > Users (PATCH /api/auth/users/{id}/profile). That route is self or admin by the effective role: a user naming any id but their own gets 404User not found, byte-identical to an unknown id and decided before any read of the named account. Both routes accept only the three fields (any other key is 422), read an empty contact email or phone as clearing it, refuse a null or empty name with a 422 naming the field, record the caller inmodified_by, and log oneuser_profile_updatedline carrying the changed field names, never values.GET /api/auth/meandGET /api/auth/usersreport the three fields; the header shows the name; register takes an optional name, prefilled from the username, and stores the username when it is omitted. Auth migration 0009 adds the columns and backfills every existing account's name from its username. The internal contact route notifications calls answers the contact email when one is set, else the sign-in email, with its shape unchanged, so email notifications follow it within the 30 s contact cache. LDAP accounts edit the same fields; nothing is read from the directory for them. Specified as IAM-PROFILE-1 to IAM-PROFILE-11 indocs/specs/identity-and-access.md. -
Docs:
docs/USER_GUIDE.mdno longer says a password-change route exists; HERD has none (#1252). -
Fixed: a running stack is no longer changed by another compose project on the same host. Each stack's Traefik read every container on the shared Docker socket, so with the seeded gate stack a
make everythingleaves servinghttps://localhoststill up,make upadded the dev stack'sconfigandfrontendcontainers to the gate Traefik's routes, on a network it cannot reach, and about half of the page's requests hung. Traefik's static configuration is now thetraefikservice's command indocker-compose.yml(infra/traefik/traefik.ymlis gone, since Traefik ignores every other flag once a configuration file is given, which had also left the dev override's--log.level=DEBUGinert), with--providers.docker.constraintsadmitting only containers labelled with the stack's owncom.docker.compose.projectand--providers.docker.networknaming that project's network; both read${COMPOSE_PROJECT_NAME:?...}, so an empty project name refuses to render the file instead of matching nothing.make up,make dev, andmake prodnow refuse to start while another compose project publishes host port 80 or 443, naming it and, for a gate stack, the two ways out (use it, ormake gate-downthenmake up;scripts/check_gateway_ports_free.sh);make logssays which project is serving when the dev project has none, and theeverythingclosing banner saysmake upis refused while the gate stack runs.FRESH_SETUP.mdanddocs/OPERATIONS.mdno longer claim the repository's certificate chain works out of the box: its private key is not tracked (#1239). The guard compares against the project namedocker compose configreports, so a checkout directory with_or.in its name, or aCOMPOSE_PROJECT_NAMEin.env, never refuses its own stack, and it fails closed when compose cannot answer. A gate run (make master,make everything) runs the same check before it starts its stack, so it can no longer send its seed, integration, and e2e traffic into another checkout's serving stack. Docker Compose 2.27.1 or later is now required (it setsCOMPOSE_PROJECT_NAMEfor interpolation, compose-go #628). -
Upgrade note for the change above: after pulling it, recreate Traefik (
make up, ordocker compose up -d) before anything restarts it. A Traefik container created before the change still mounts the deletedinfra/traefik/traefik.yml; restarting it (docker compose restart, a Docker daemon restart, a reboot) fails with anot a directorymount error and leaves a root-owned directory at that path, whichsudo rmdir infra/traefik/traefik.ymlremoves.make restartnow recreates such a Traefik before it restarts anything. -
Changed: access tokens are signed and verified with PyJWT instead of python-jose (#1186). Every service verifies through one helper,
herd_common.jwt_codec.decode_access_token, which passes exactly one algorithm and a 10 sleeway(ACCESS_TOKEN_LEEWAY_SECONDS) for clock skew between the auth service and a verifying service: a token stays valid up to 10 s past itsexp, and aniatup to 10 s in the future verifies (PyJWT refuses a futureiat, python-jose did not).enforce_minimum_key_lengthstays off, so a key under 32 bytes still verifies tokens and PyJWT emitsInsecureKeyLengthWarning; startup still logs the short key. The three decode sites (make_auth_dependencies, auth'sverify_access_token, notifications'get_bearer_credentials) and the settings round trip inherd_common.auth_settingscall the helper, catchjwt.PyJWTError, and keep their 401Could not validate credentialsand thejwt_key_unusablelog line, now namingInvalidKeyError. Token format and claims are unchanged, so a session issued before the upgrade stays valid. One startup rule moved: a JSON-shapedAUTH_SECRET_KEY(an array, a string, or an object without aktymember) now loads as an ordinary HMAC secret, while a JSON Web Key (an object withkty) is still refused withAUTH_SECRET_KEY cannot be used as an HMAC secret; .... The other key shapes jose refused are still refused with that message: PyJWT refuses a complete PEM block and an ssh key at the start of the value, andherd_common.auth_settingsrefuses the partial shapes PyJWT would accept itself, before the round trip (_is_key_shaped: any value containing-----BEGIN, so a lone BEGIN line or a truncated block, and any value whose stripped form starts withssh-orecdsa-sha2-); a value that cannot be encoded as UTF-8 (a lone surrogate) gets the same message instead of a codec error. The repository guardtests/unit/test_jwt_settings_wiring.pynow reads PyJWT's spellings (jwt.decode,decode_complete,jwt.api_jwt,jwt.api_jws,PyJWT()andPyJWS()instances,get_unverified_header, the algorithm registry) and fails on a PyJWT decode anywhere but the helper and the config service's own session decode (DIRECT_DECODE_ALLOWED), each matched by file, qualified function path (outer.inner,Class.method), and the number of decode calls it holds. Dependencies:pyjwt>=2.15.0replacespython-jose[cryptography]in common, auth, and notifications and joins thedevextras of ai-orchestrator, cabling, integration, and secrets (which import it only in tests; herd-common brings it into every image), and acl, execution, inventory, reservations, and user-profile drop it;ecdsa,rsa,six, andpython-joseleaveuv.lock, whilecryptographystays for secrets, netmiko'sparamiko, andpdfminer-six. Test suites sign with a 64-character hex key, so no suite logs the short-secret warning any more. -
Fixed: a 401 or 403 from inventory no longer pins an existing switch's wiring rows as not found. Execution's
_fetch_deviceand_fetch_templatereturnedNonefor any answer below 500 other than 200, and every wiring layer reads thatNoneas a switch (or template) gone from inventory: it recorded the switch's rowsFAILEDwithrecorded hop unresolvable: switch <id> not foundand no attempt counted, a reason no retry channel drives, so a teardown or build that ran while inventory refused the internal token (anINTERNAL_API_TOKENrotation) left an existing switch's rows pinned for good, and on an ended reservation its connections possibly still live on the hardware. Both reads now judge inventory's answer through one function,_inventory_record_or_none: only a 404 means not found, and every other answer that is not 200 (a 401, 403, 409, 422, or 5xx) raisesTransientUpstreamErrorwith the textfetch device <id>: upstream <status>(orfetch template <id>: ...), as does a 200 whose body is not a JSON object (...: upstream answered with a malformed body). The event is NAKed with backoff and no row is pinned: awiring_changedrecords nothing for the switch and a terminal teardown leaves itsACTIVErows as they were. In the retry tick, the rows of a reservation whose apply hit the error are left unchanged and counted inskipped_upstream, and a build row whose endpoint read fails during the intent re-check reads backstill_failed; the manual retry answers 503. The rows are driven again once inventory answers, within the NAK window (five deliveries, about 81 seconds at the defaults; after that the event is dead-lettered and can be replayed). A dynamic instance's template read follows the same rule, so a 401 or 403 there is retried, where before a create dead-lettered the event as a missing template and a teardown left the instance's row live withrecipe_config_missing. The consumer's other reads (a switch's latest config, a hypervisor, a secret) are unchanged (#1203). -
Fixed: no driver package file runs in the sandbox child before the resource limits apply. The child is now started as
python -I -B _runner.py ...(Python's isolated mode, no bytecode written) with noPYTHONPATHorPYTHONDONTWRITEBYTECODEin its environment, and_runner.pyputs the package directory and then_depsonsys.pathitself (_put_package_on_path) only afterapply_rlimits, right after its own directory and ahead of the standard library, the orderPYTHONPATHgave. Before, the package directory was onPYTHONPATHfrom interpreter start, so a packagesitecustomize.pyran at startup and a packagejson.pyreplaced the standard library for the runner's ownimport json, both with no limit applied (a probe sawRLIMIT_AS(-1, -1)); a packagesitecustomize.pyis now never imported, and a packagejson.pyis never imported because the runner's standard libraryjsonstays insys.modules. The optionalrequirements.txtinstall runs aspython -I -B -m pip install ...for the same reason. A Python subprocess a driver starts itself no longer inherits the package path throughPYTHONPATH; the driver must pass it explicitly. A driver that imports a sibling module, alib.<module>, or a module vendored under_depsworks as before (#1180, item 1). -
Tests: device configuration is now driven in a browser and under load (#1100).
tests/e2e/test_device_config_apply_playwright.pyruns four Playwright journeys on a device it creates on the checked-indrivers/frr_mgmtpackage, each read back through the API: Apply now (the failed run is answered, shown asApply failed: <error>, and recorded as the version'slast_apply_run_id), Schedule (the job is stored pending at the chosen time and shown in the Scheduled applies panel until the scheduler fires it and records the run), Cancel from the panel (the job reads backcancelled, never fired), and the dry-run review (it waits for the real dry run, shows the run's transcript, and Confirm queues a pending real job that the test cancels at once). The device page offers no dry run, so its two pushes go to a device with noHERD_ip, which netmiko refuses before it opens a socket; the review is reached through the reservation assistant with its status and turn answered in the page, under either assistant build.tests/load/locustfile.pygainsDeviceConfigUser, which writes, reads, and diffs config versions, reads the driver's config schema through inventory, and lists apply jobs on one device of its own that it deletes at the end; it never applies or schedules. -
Fixed: one reservation whose inventory or fabric read fails no longer stops the background wiring retry for every other reservation in the same layer. A
TransientUpstreamErrorraised inside one reservation's apply (inventory's read of a switch or its template, the L2 fabric lookup while re-resolving an allocation, the L3 route apply) escaped the layer's retry, so the tick left every selected row of that layer unchanged, release rows and the reservations it had not reached yet included: 20 release rows on a switch whose inventory read failed hid a newer row on a healthy switch on every tick. Each of the three layer retries now catches that error per reservation: only that reservation's rows of the layer stay as they were, with no attempt counted and no claim left, and the rest of the batch is driven, in selection order. Thewiring_retry_ticklog line gainsskipped_upstream, the rows left unchanged this way across the three layers (also counted instill_failedandrows_retried), and each such reservation is logged once atWARNINGwith actionwiring_retry_reservation_upstream_failed(reservation_id,layer,error_class,rows_unchanged; the error's class name only, never its text). The L2 retry also catches that error from its release of the allocations its superseded rows left orphaned, after it has read back its rows, so the outcomes stand; that failure is logged once with actionwiring_retry_superseded_release_upstream_failed. An exception these catches do not take still drops the layer for the tick, and the manual retry still answers 503 for the same errors (#1204). -
Changed:
make everythingruns the ci.yml checks it used to skip:uv lock --checkbeforeuv sync(so a staleuv.lockfails the gate instead of being rewritten in place;make master-quick, and somake master, gains this check too), the frontend suite a second time underTZ=America/Los_Angeles(new targetmake test-frontend-tz), thepackage-lock.jsonsync check after the frontend build, and the image-versus-lock check on the freshly built ai-orchestrator image (new targetmake check-image-lock);tests/unit/test_gate_ci_parity_wiring.pypins each one.make master-cleannow builds the gate stack's own images with--no-cachetoo (before, only the dev-project build skipped the cache), and its image purge removes this checkout's dev and gate images by compose project label instead of everyherd-*image, so the NOS lab's built image and other checkouts' images are no longer deleted.make clean(and so the gates) no longer purges caches and coverage files under.claude/. -
Fixed: a
.tgzcontext file uploaded to AI generate can no longer drive the ai-orchestrator process to gigabytes of memory from inside the entry and byte ceilings. More than 64 KiB of pax extended headers and GNU long names in front of one member is refused with 400The tgz archive has more than 65536 bytes of pax extended headers and GNU long names in front of one member; nothing was extracted, more than 4 KiB of pax global headers in the archive with 400The tgz archive has more than 4096 bytes of pax global headers; nothing was extracted, and a sparse member of any GNU format with 400The tgz archive has a sparse member, which is not supported; nothing was extracted, each before the data that would have been held is read, and the walk no longer keeps every member it has passed. Before, a 250 KB upload of one pax global header of just under 1 MiB and 1,000 empty members peaked at 1.9 GiB resident (tarfile copies the global header's records into every member and kept them all), a 20 KB upload holding a GNU sparse 1.0 map of ten million numbers peaked at 976 MiB, and 2,000 small global headers in a 695 KB upload ran out of a 6 GiB address space; each is now refused in under a millisecond with no growth.git archiveoutput (one 52-byte global header), PAX archives with long UTF-8 paths, and GNU archives of 10,000 members still extract the same text. A text member that the character budget cuts inside a UTF-8 character now decodes as UTF-8 up to the cut; before, the whole member fell back to Latin-1. A non-integerGNU.sparse.realsize, which tarfile would convert with a bareint(), is refused as a sparse member rather than escaping as a 500. A tgz whose gzip stream is whole but whose tar header is bad where a member's own header should be still yields the members before it, as it always did; a bad header that follows a pax or GNU long-name header is the 400ReadError. Both header limits count each header's declared size rounded up to its 512-byte block, the bytes tarfile reads and parses (#1201). -
Fixed: the background wiring retry no longer stops for a whole ledger once that ledger holds a batch of
FAILEDrows it will never drive. The tick selected the oldestFAILEDrows under the attempts cap and only then set aside the ones with a pinned not-retryable reason and the build rows of ended (frozen) reservations; setting a row aside does not change it, soWIRING_RETRY_BATCH_SIZE(20) of them at the old end of a ledger filled every batch and no newer retryable row in that ledger was retried by any later tick. The two tests now sit in the three due queries as one shared predicate (wiring_due.tick_would_drive: the reason prefixes compared case-sensitively, an absent or empty reason retryable, a reservation with no wiring state row not frozen, release-direction rows of a frozen reservation still selected), so a batch holds no row those two rules set aside. A build row whose intent cannot be read while cabling or inventory is unreachable is still selected and left unchanged with no attempt counted, so until that upstream answers again it can delay newer rows in its ledger; that is a known limit by decision. No row is rewritten and there is no migration. Thewiring_retry_ticklog line gainsexcluded_not_retryableandexcluded_frozen, theFAILEDrows under the cap that the selects leave out across the three ledgers, and stays atINFOwhile either is above zero;skipped_not_retryableandskipped_frozenkeep their meaning (rows selected and then set aside by the same two rules, which now happens only to a reservation frozen after the select) and are normally 0. The manual retry and its outcomes are unchanged (#1190). -
Fixed: a
.tgzcontext file uploaded to AI generate is walked within two fixed ceilings, and the extraction of uploaded files runs in a worker thread instead of on the service's event loop. An archive of more than 10,000 members is refused with 400The tgz archive has more than 10000 entries; nothing was extractedat the member past the ceiling, and one the reader would have to read or skip past 100 MiB of, decompressed, with 400The tgz archive extends past 104857600 bytes uncompressed; nothing was extractedbefore the tar reader reads the data past the ceiling (the gzip layer decompresses up to its 8 KiB read buffer ahead of the position); the bound is on the decompressed stream position, so member data, skipped members, pax extended headers, and GNU long names all count. Before, an 894 KB upload of 400,000 empty members took 7.7 s and raised the ai-orchestrator process from 57 MiB to 226 MiB of resident memory, and a 1 MiB upload holding one skipped member of 1 GiB of zeros took 2.1 s, with every other request to the service waiting,/healthincluded; they now take 0.2 s and under a millisecond. A tgz with several hundred pax extended headers or GNU long names in a row, which makes Python's tar reader recurse past its limit, answers 400Failed to read tgz archive (RecursionError); before, a 1.8 KB upload of 400 consecutive pax headers was an unhandled 500. An archive under both ceilings yields the same text as before (#1195). A tgz member name that is not valid UTF-8 enters the extracted text with U+FFFD in place of each undecodable byte; before, the name carried a lone surrogate, the provider request could not be encoded, and the request answered 502AI returned no usable responsewithout reaching the provider (#1196). -
Fixed: a
.tgzcontext file uploaded to AI generate whose pax extended header or GNU long name is over 1 MiB is refused with 400The tgz archive has a tar header record over 1048576 bytes (a pax extended header or GNU long name); nothing was extractedbefore the header is read into memory. Before, a 65 KB upload declaring a 64 MiB header made the ai-orchestrator process allocate about 128 MiB, and any signed-in user could send one when a provider is configured. The extractor reads the archive throughherd_common.bounded_tar, as the two driver readers do, and reads each text member in 64 KiB chunks, so a member larger than 1 MiB still extracts and an honest archive yields the same text as before. A tgz that is truncated, holds corrupt compressed data, or carries a checksum the reader finds wrong now answers 400Failed to read tgz archive (ReadError), as a body that is not gzip always did; before, those three escaped as a 500 (#1192). -
Fixed: the driver upload reads
driver_metadata.jsonwithin a bound: an entry larger than 1 MiB, by its declared size or by what a capped read returns, is refused with 422driver_metadata.json is larger than 1048576 bytes; nothing was stored, and a.tar.gzwhose pax extended header or GNU long name is over 1 MiB is refused with 422 before the header is read into memory. Before, a small, highly compressible metadata entry or header expanded whole in the inventory process. Nothing is stored on a refusal, on create or on file replace. The bounded tar stream moved from execution intoherd_common.bounded_tar, which both services use; execution's refusals and their wording are unchanged (#1180, item 3). -
Fixed: a
driver_metadata.jsonthat is not UTF-8, or is nested deeply enough that the JSON parser raisesRecursionError, reads as no capability at load, as a malformed file already did, with a warning naming only the exception class; before, the error escaped the load as a transient failure, so a package that can never change was retried forever (#1189). -
Changed: every service that checks access tokens validates its token settings when its Settings model loads, through one shared module,
herd_common.auth_settings. AnAUTH_SECRET_KEYthat is blank (empty, white space, or only invisible characters such as a zero-width space) or a placeholder (any value that, trimmed, starts with<and ends with>, such as the.env.exampleline) is refused withAUTH_SECRET_KEY is unset, blank, or still a placeholder; set it in .env, or in the config UI if a configuration was saved there, to a random value, for example the output of openssl rand -hex 32; under compose a line missing from.envarrives blank and gets the same message, while a service process started outside compose with noSECRET_KEYat all fails with pydantic'ssecret_key Field required. A value jose cannot sign and verify an HS256 token with (a PEM public key, certificate, or ssh public key, or a JSON-shaped value) is refused withAUTH_SECRET_KEY cannot be used as an HMAC secret; set it in .env, or in the config UI if a configuration was saved there, to a random value, for example the output of openssl rand -hex 32. A value under 32 bytes starts and logs one warning giving its byte length.AUTH_ALGORITHMaccepts onlyHS256,HS384, orHS512(AUTH_ALGORITHM must be one of HS256, HS384, HS512); the RS* algorithmsdocs/ENV_VARS.mdlisted are no longer accepted. ai-orchestrator no longer carries a built-in secret default, and a Settings load error no longer prints the refused value. The config service's save (PUT /settings) and first-boot bootstrap refuse a blank or placeholderAUTH_SECRET_KEYand anotherAUTH_ALGORITHMwith the same messages and write nothing, since a savedconfig.jsonoutranks.env(OPS-CONFIG-23). The three token decode sites (make_auth_dependencies, auth'sverify_access_token, and notifications'get_bearer_credentials) answer 401 for any error jose raises, a key error included, and log a key error once at ERROR by class name (jwt_key_unusable). A repository guard,tests/unit/test_jwt_settings_wiring.py, checks that every jose decode passes exactly one algorithm with signature verification on, following names across the scanned modules, and that every service's Settings model uses the shared types (IAM-JWT-4, IAM-JWT-5). Upgrade note: a stack whoseAUTH_SECRET_KEYis unset, blank, still the placeholder, or not usable as an HMAC key now refuses to start, naming the variable; if a configuration was saved in the config UI, fix the value there.AUTH_ALGORITHMmust beHS256,HS384, orHS512. -
Tests: CI's
frontendjob runs the frontend unit suite a second time withTZ=America/Los_Angeles, a zone that observes daylight saving time, so a date bug that only shows outside UTC fails a pull request; the repository guardtests/unit/test_ci_frontend_tz_wiring.pyrequires that step to setTZin itsenv:to a non-UTC zone with daylight saving time and to run the same vitest command as the UTC step. -
Fixed: a
driver.pythe parser itself cannot get through (a very long or deeply nested expression, which raisesRecursionErrororMemoryErrorinsideast.parse) is a permanent load failure,driver load failed: DriverPackageError, like any other unparseabledriver.py. Before, it was classed as transient, so wiring retries and recipe redeliveries kept loading it, and each attempt left its extraction directory in the driver cache; a failed load now removes the directory whether a package check returns errors or raises (#1178). -
Fixed: a
.tar.gzdriver package whose pax extended header or GNU long name declares more than 1 MiB is refused withdriver load failed: PackageLimitErrorbefore the header is read into memory; before, a 389 KB upload declaring a 400 MB header raised the execution process's memory by about 500 MiB (#1179). -
Fixed: a driver's required method must be bound to something that could be callable:
status = None, a string, number, or container literal, an annotation with no value (status: object), and adefremoved by a laterdelno longer pass the load and then fail every health poll in the sandbox. A binding under a condition or in afortarget still passes by decision (#1179). -
Fixed: the recipe validator reads and parses each package file once, as bytes, so its structural and policy sections agree on a
driver.pywith a coding cookie, and an extraction failure reportsFailed to extract package: <ClassName>without the temporary path a tar filter error carried (#1179, #1180). -
Tests: the repository guards refuse inputs their Limits did not name (#1181). The integration teardown guard finds a device, port, or topology delete whose URL carries a query string or fragment, is built by
+=, is aforloop or comprehension target, or is unpacked from a tuple, or that goes through a name bound togetattr(client, "delete")or a lambda wrapper, and fails an exempt function whose count shrank as well as one whose count grew. The Postgres-live gate guard refuses anyexitorexecword in the recipe ahead of a suite or of a gate's call, an honest|| exit 1included; a;after afi,done, oresacthat closes around a suite; a variable assigned on a suite command other thanHERD_TEST_PG_REQUIREDandHERD_TEST_PG_DSN;PYTEST_ADDOPTSon any make-level line of the Makefile outside a comment; a target-specificSHELLfor the phase or a gate; and any assignment or-Con a gate's call. A recipe line with an unterminated quote fails with a message naming the line. The execution consumer start test pairsadd_consumerandpull_subscribeby durable name, so it fails when the durable bound is not the one created. The heartbeat guard counts anonlocalrebinding and amatchcapture as a second binding. The specification guard refuses a fixture namedtest_*, anit.failsortest.failstitle, and a call that starts inside a string or template literal. The compose guard's.env.examplecheck requires each activeAI_*key to be set on the same container key to exactly${KEY}or${KEY:-default}. Each guard's module docstring lists, under Limits, what its scan still cannot see, now including the teardown scan reading names without regard to statement order and its dropped-answer check seeing only a bare expression statement, and OPS-NATS-12 names theack_waitsettings the heartbeat scan reads. -
Tests: three Playwright e2e tests no longer wait on a toast an earlier action left on screen. The fork restore-then-save test orders its read-back by the save request's own HTTP response (
pw_click_for_responseintests/e2e/conftest.py) and asserts the fork save toast by its exact version. The config edit-and-restore test orders its read-back by the settings PUT response and, before saving a second time, waits for the earlierConfiguration savedtoast to clear (pw_toast_gone). The device config version cycle orders each version create by its POST response and waits for the earlierConfig version createdtoast to clear before the second create; its read-back after Restore is ordered by a poll until the version count reaches three. The fork test lost that race in the 2026-10-11 nightly withassert 2 == 3; the product had saved the version correctly (#1169). -
Tests: the dynamic-resources integration test for a failed keyed destroy reads the ledger row after an ordering anchor (a later dynamic reservation reaching
ACTIVE, which the one sequential consumer handles only after the teardown event) and no longer after a 3 second sleep, and checks that the failed destroy was not driven a second time (#1158). -
Tests: integration tests send every device and port a test deletes in its own teardown through the checked teardown helpers, which fail the test on a refused delete;
delete_devices_checkedanddelete_port_checkedjoindelete_device_checked, and four tests whose cleanup relied on the test body's own cancel now cancel the reservation first. A repository guard,tests/unit/test_integration_teardown_contract.py, fails on a device, port, or topology delete intests/integration/that bypasses the helpers, under the call and URL spellings its module docstring lists (it follows a URL through one local wrapper and does not resolve one built from data it cannot see), with a per-function allowlist for the tests whose subject is the delete's answer (#1158). -
Tests: the VLAN integration test for a cable change between two joins forces the collision: reservation A's stored allocation is moved onto reservation B's preferred number before B joins, and the two stored fabric ids are read back as different, so a rule that compares stored fabric ids fails it (#1158).
-
Tests: the wiring retry pollers of the L1, L2, L3, and ledger-teardown integration tests share one helper that, when the retry answer no longer names the row, accepts the row the test saw
FAILEDfrom wiring-status by id (ACTIVEorRELEASED), so the background retry tick converging it first no longer times the test out; a release that converged must also show aSUCCESSrun of its release action, so a row settled with no driver call is not taken for a driven release. The helper and the two teardown helpers are pinned stack-free intests/unit/(#1158). -
Tests: five more repo-root guards read the behavior they name instead of text near it. The Postgres-live gate guard counts a suite only when the
_gate-pg-live-testsrecipe holds a pytest command that names the file, runs in the suite's service directory, carriesHERD_TEST_PG_REQUIRED=1on that command, passes no argument outside a short list of options that cannot narrow or skip a run, and sits where its failure fails the recipe with noexitahead of it (a name in a comment, on a commented-out line, in anecho, or ahead of|| trueno longer counts); it also checks thatmasterandeverythingeach run the phase through$(MAKE),$(SUBMAKE), ormakewith no option that stops it or hides its failure. The consumer heartbeat guard requires a call to the sharedprocess_batch_with_heartbeatwithheartbeat_intervalof the configured ack wait, at least one place that setsack_wait, and the configured value at everyack_waitsetting its scan reads. The build-args guard requires eachARGonce and oneENVafter both in the stage that ships, and noRUN,COPY, orADDafter them. The compose settings guard requires a field's whole value to be exactly${VAR}or${VAR:-default}under its own variable or a recorded rename (DATABASE_URLmust interpolate its threePOSTGRES_*variables), not any${. The specification guard requires a cited Python test to be atest*function that pytest's default rules collect from atest_*.pyor*_test.pyfile, a cited frontend test to be the complete title of anit,test, ordescribecall in a*.test.*or*.spec.*file that is not commented out,.skip, or.todo, and an enforcing symbol to appear outside comments. Each guard's module docstring lists, under Limits, what its scan cannot see and what it refuses conservatively. Each false-pass spelling is a detector case, the current tree passes every scan, and one specification citation that named a title prefix is corrected (#1158). -
Tests: the notifications, integration, and execution consumer start tests read
add_consumerandpull_subscribefrom one ordered call log, so they fail when a durable is bound beforeensure_consumercreates or updates it, and the notifications and integration tests assert the stream each durable is created on; separate per-call lists passed in either order, and a membership check passed with the two streams exchanged (#1158). -
Docs: README.md states the measured backend unit test count (over 7,900 across the 13 services and the repo-root suite), OPS-NATS-6 cites the three consumer start tests that pin
ensure_consumerahead ofpull_subscribe, and the teardown guard entry above names the limits its module docstring states. -
Docs: OPS-NATS-12, AI-STREAM-5, and the #1070 entry describe the repository guards as #1145 widened them, ADR 0011 gains an as-built amendment for the sync-now concurrency test (#1134), and README.md and GAPS.md carry the current e2e, integration, and Postgres-live suite counts.
-
Tests: inventory tests whose input an earlier check refused now reach the rule they name: the template-validation HTTP tests send a port template valid except for the field under test and assert the exact 422 message, the non-admin device list test grants both devices so only the forced
dut_onlyhides the infrastructure one, and the two apply-scheduler gate tests stub the creator re-check and assertreservation not currently active(#1138). -
Tests: nine ai-orchestrator tests now fail under the regression they name: the tgz budget break, the apply-jobs renderer reading only count and names, the pathfind client failing closed on a transport error, a non-200, a non-JSON body, and a missing
resultslist (new client-level cases plus a route test through the real client), the buffered 504 leaving no conversation or message row, the JSON extractor's indent and key order, the committer refusing a non-booleanvalid, oldest-first history eviction, transcript truncation dropping the oldest turn, and the status probe recovering only after its cache window (#1143). -
Docs: the specifications say which spellings the heartbeat and cancel-scope guards match, that the login form stays enabled while the config status is loading or unreachable, and
docs/GAPS.mdlists the three suites no GitHub workflow runs (#1144). -
Tests: the frontend absence checks wait for pending work before asserting nothing happened, so the five "Cancel issues no delete" page tests (device group detail, device groups, grants, groups, inventory bulk delete) fail when Cancel also deletes, and
ConfirmDialog's own test pins that Cancel and Escape never callonConfirm. The AI assistant streaming test reads the live bubble mid-stream, the recipe panel close test reads every field back, the Routing panel anduseDeviceConfigVersionpin the lazy config fetch, the grants filter test checks a partial id is never sent, the stale routing problem test reuses the node id across topologies, the topology delete failure test reads the dialog'sopenstate, the fork restore test restores from inside a preview, the auth store tests import a fresh store, andgetWeekRangeasserts local calendar fields so it passes in every time zone (#1142). -
Fixed: a reservation that lands
FAILEDnotifies its owner on every channel they enabled: the message is titledReservation failedand names the reservation by its short id and device count, never a failure reason. The event is on by default, including for users whose saved preferences predate it, and the Settings page gains aReservation failedtoggle (#1077). -
Added: an admin can pause and resume a webhook subscription with
PATCH /api/v1/webhooks/{id}and the body{"is_active": false}or{"is_active": true}, keeping its delivery ledger; any other field is 422. A paused subscription receives no later event and nothing is replayed on resume (#1078). -
Fixed: the notifications webhook channel signs through
herd_common.webhooks, the helper integration's registered webhooks use, instead of a local copy; the bytes, headers, and signature a receiver sees are unchanged (#1079). -
Fixed: the test webhook sink, served only when
WEBHOOK_TEST_SINK_ENABLEDis on, refuses a POST that came through the gateway with 403, and its hit count requires an admin token, so it adds no unauthenticated route to/api/v1(#1107). -
Tests: the webhook ledger's dead-row retry, its concurrent-insert race, the subscription delete cascade (on Postgres and on SQLite with foreign keys on), and the preferences write that replaces
channelswhole are pinned (#1081). -
Tests: the reservations tests for the extension's non-exclusive skip, its inventory-failure fallback to all-exclusive, and the purpose reconciler's oldest-first drain now arrange a competing booking or a reversed insertion order that only the named rule resolves, and the Postgres PATCH race records an inventory write when it lands, so only the PATCH's own revert can leave the added device
AVAILABLE(#1136). -
Tests: the notifications channel-isolation test drives
handle_eventwith the production dispatchers and a transport error on email, chat, or webhook in turn, and the missingdevice_nametest checks the exact title and body (#1135). -
Fixed: a scheduled config apply that names a
reservation_idis refused with 422 unless that reservation isACTIVE, holds the device (reservations' internal by-device list), and, for a non-admin, belongs to the caller; an admin is exempt from ownership only. Before, a caller who owned any active reservation of the device could name an unrelated one, and the job's fire-time check then followed the wrong reservation. An unanswerable check is 503Could not verify the reservation; nothing was scheduled. Retry the request.(#1104). -
Tests: pins for device-configuration rules that had none: the write routes skip device visibility, the default restore label, no version delete or edit and the cascade from a device delete, the schedule's time checks first, the exact dry-run support refusal, a confirm that repeats no schedule-time check, and
POST /executepassing ports, arguments, and the dry-run flag as sent; plus an integration test that schedules a dry run ondrivers/frr_mgmt, waits for the scheduler to fire it, reads the simulated transcript, and confirms it. The dev and gate stacks run the apply scheduler every 2 seconds (#1100). -
Fixed: execution checks a driver package's
Driverclass and required methods by parsingdriver.py, never by importing it, so no package code runs in the execution process; the load path and the recipe validator share one check (driver_structure_errors).Drivermust be a plain top-level class statement (an assignment, an import, or a nested class is refused); methods inherited from a top-level base class indriver.pycount, and a method that could come from code the parser cannot read is left to the sandboxed call. Adriver.pywhose top-level code raises now fails its first driver call instead of the load (#1114); for a dynamic-resource recipe that islogin, so the event is retried and dead-lettered at the fifth delivery rather than the first (#279). The parse-based check is not the import-based one in either direction: it refuses a method that exists only because it was assigned onto a base class or added by rebinding the class (Driver = add(Driver)), and accepts a method bound only in code that never runs, a decorated orsetattrclass whose methods are missing, and adriver.pythat parses but does not compile, each of which then fails its first sandboxed call (#1179). -
Fixed: extracting a driver package refuses an archive with more than 10,000 entries or more than 100 MiB declared uncompressed before writing anything, for
.zipand.tar.gzalike, so a small, highly compressible upload can no longer fill the driver cache volume; the load records it asdriver load failed: PackageLimitError(#1115). The ceilings bound disk, not memory: a tar's pax or GNU long-name header was still read whole into memory until #1179. -
Fixed: the config login limits failed attempts. From a source address's third consecutive failure it waits before its next attempt (1 second, doubling to 60 seconds), and
CONFIG_LOGIN_MAX_ATTEMPTSfailures (default 20) from any sources withinCONFIG_LOGIN_LOCKOUT_SECONDS(default 300) make every source wait that long; a waiting login is answered 429 withRetry-After, a success clears the counts, and each wait that begins logs oneconfig_login_lockedline with the scope and source address. -
Fixed: the config page's
PUT /settingswrites only keysCONFIG_SCHEMAdeclares: a body naming any other key is 422Unknown settings: <sorted keys>and writes nothing;GET /settingsshows schema keys only, and a key placed inconfig.jsonby hand outside the schema is carried over unchanged by a save (#1109). -
Fixed: the config service's CORS policy keeps its wildcard origin and no longer allows credentials, so no origin is answered with
Access-Control-Allow-Credentials(#1111). -
Fixed: webhook destinations must resolve to public addresses. A
target_urlwhose host resolves to a loopback, link-local, private, shared, multicast, or unspecified address, or does not resolve, is refused at registration with 422target_url must resolve to a public addressand is checked again before every delivery (afailedledger row withdestination not allowed, nothing sent). The newWEBHOOK_ALLOWED_HOSTSsetting (hostnames or CIDRs, empty by default) admits named internal destinations. Redirects are not followed, the ledger'slast_errorcarries onlyupstream answered HTTP <status>ordelivery failed (<ClassName>), and the address predicate is shared with the assistant's documentation fetch throughherd_common.public_address. -
Fixed: the
/api/v1/reservations/{reservation_id}routes validate the id as a UUID, so a malformed id is a 422 from the facade and never reaches reservations as a different route; the published contractdocs/api/v1-openapi.jsongainsformat: uuidon the parameter (#1105). -
Fixed: a non-admin reservation owner's execution run list (
GET /runs?reservation_id=) and run transcript read (GET /runs/{id}/commands) include only runs on devices the caller can see under device-group visibility, resolved once per request from inventory with the caller's token; a run on any other device answers the transcript read exactly as an unknown run, and a lookup inventory cannot answer is 503 with no rows. Admins are unfiltered. -
Fixed: a driver method's keyword arguments reach the sandbox child through an owner-only temp file instead of the command line, and an execution run stores them masked (credential-named keys and the text after credential keywords such as
password,secret,community,key, andmd5in command strings). Inventory's apply paths send the config version id, and a retry of a masked run reads the configuration back from that version, refusing with 409 when the run names none or the version no longer matches. -
Fixed:
GET /device-health/{device_id}answers a non-admin with a device's snapshot only when the device is inside their device-group visibility; any other device answers byte for byte as an id with no snapshot, and an unanswerable lookup is 503 (#1108). -
Fixed: a manual
POST /executethat names areservation_idis refused with 422 before anything runs unless the reservation holds the device and, for a non-admin, belongs to the caller, so a run is never filed under a reservation that did not hold its device (#1112). -
Fixed: a non-admin
configureon execution'sPOST /executewhose acl check answers 200 with a JSON body that is not an object (a list, a string, a number, or null) gets the pinned 403Admin access or device manage grant requiredinstead of a 500; execution now asks acl throughherd_common.acl.user_has_grant, the one closed-by-default reader (execution half of #1096). -
Fixed: confirming a dry-run config apply (
POST /apply-jobs/{id}/confirm) checks the caller's authority on the job's device before the two 409s, so a caller without authority gets 403 whatever the job's kind or status and learns only that the job exists; an unknown job is still 404 first (#1113). -
Fixed: the device export, CSV and JSON, leaves out dynamic-instance devices (devices carrying a
request_id), which another instance rejected withTemplate is not a device templateand a re-import on the same instance wrote back over the live instance device; every other device still exports and round-trips (#1068). -
Fixed: the config page answers a 429 from the login attempt limit with
Too many failed login attempts; try again in N seconds(the server's sentence whenRetry-Afteris missing or not a whole number) and keeps Sign in disabled for that wait, instead of the wrong-password toast; a 401 still readsInvalid config password(#1126). -
Fixed: in a live reservation edit, a line the fork's draft autosave reports in
invalid_edgesturns red on the canvas with the reason on hover (for exampleno cable path on the chosen portsfor a line on two cabled ports no cable joins), and a bundle holding such a line goes red; the mark clears when a later autosave answers otherwise or the canvas is replaced, a commit refreshes it fromconstrained_edges_skipped, and it does not block the commit (#1066). -
Tests: the cabling write-boundary scrub tests read the stored fork, topology, version, and template rows instead of a GET that strips again, and seed dirty rows directly for clone, export, fork create, and instantiate; the topology version-retry tests lose a real race after the max read and prove the retry re-applies name, canvas, and modified_by; the version cascade test counts rows with SQLite foreign keys on; and the connection, topology, pathfind, fabric, and port-cable seeds disable the device-group guard explicitly instead of passing through its fail-open branch (#1139).
-
Tests: the config service's Save and Restart skip list is pinned against a literal list of the five containers, and
restart_servicesis shown to skip each one beside a restarted service (#1140). -
Tests: the CORS origin parsing test drives
add_cors_middlewareand reads the origin list it registered, and theDATABASE_URLprecedence test builds its source over a settings class that declaresdatabase_url, with a control that the derived URL appears when the variable is unset (#1141). -
Docs:
docs/OPERATIONS.mddescribes/healthas a liveness answer that checks no dependency, a Postgres outage and a wiped config volume as the services actually handle them, and thenats-datavolume;FEATURES.mdanddocs/ENV_VARS.mdsay the config service logs plain text, WARNING and higher only (#1087). -
Docs:
docs/DRIVERS.mdrecords a timed-out driver run asTIMEOUT,docs/ROLES.mdlists the run list'screated_afterandcreated_beforefilters, the config-schema extraction docstring states what its subprocess bounds, and ADR 0002 gains an as-built note on the proxy's access and the driver cache (#1099). -
Docs:
docs/ROLES.mdlists every/api/v1and/api/notificationsroute by role, anddocs/ARCHITECTURE.mdnames the facade'sGET /reservations/{id}/wiring-status(#1080). -
Docs:
docs/OPERATIONS.md,docs/ENV_VARS.md, andSECURITY.mdstate that the generated config-page password written to the container log stays valid until it is changed (#1110). -
Docs: README.md, FEATURES.md, SECURITY.md, ARCHITECTURE.md, DRIVERS.md, ENV_VARS.md, OPERATIONS.md, TROUBLESHOOTING.md, ADMIN_HANDBOOK.md, and ADR 0003 describe the 2026-10-08 fixes as built (the bounded NATS connect and the shared event decoder, notifications caches that keep only answers, secrets key rotation across replicas, Save and Restart errors by class name, the per-load driver cache, the immediate apply's
managerule, scheduled-apply transcripts, and dry-run retries). -
Docs: ROLES.md, ADMIN_HANDBOOK.md, AI_ASSISTANT.md, ARCHITECTURE.md, DRIVERS.md, ENV_VARS.md, OPERATIONS.md, TROUBLESHOOTING.md, EXTERNAL_API.md, IMPROVEMENTS.md, FEATURES.md, SECURITY.md,
.env.example, and ADRs 0002 and 0015 describe the later 2026-10-08 changes as built (execution run reads and device health limited to visible devices, masked run arguments and the retry 409s, manual execute's reservation scope, the config login limits and schema-only saves, the webhook destination rule and the upgrade step it needs, VLAN delete skips cabling cannot judge, topology import dry runs, and the device export leaving out instance devices), and TROUBLESHOOTING.md gains entries for each new refusal. -
Docs: README.md, FEATURES.md, ENV_VARS.md, OPERATIONS.md, TOPOLOGY_EDITOR.md, USER_GUIDE.md, and TROUBLESHOOTING.md describe the 2026-10-09 changes as built (webhook pause, the failed-reservation notice and every default-on event, the test sink closed to the gateway, the config page's login wait, which red lines block a live-edit commit, the scheduled apply's reservation rule and the schedule route's reservation reads, and the dev apply scheduler interval), README.md names the payload
event_idas the outbound dedupe key, and TROUBLESHOOTING.md gains an entry for a live-edit line on unjoined ports. -
Tests: four repo-root guards catch every spelling CLAUDE.md says they catch, not only the one that caused the original bug: an own NATS heartbeat under an import alias or as a hand-rolled
in_progressloop; ayieldinside a timeout scope reached throughimport asyncio as aioor a scope bound to a variable; a raw request body tested for a substring across two lines, throughstr(),.find(), or.startswith(), or in a nestedtests/e2edirectory; and aCOPY . ./,COPY --chown=... . .,ADD . ., orCOPY . /appahead ofnpm ciin the frontend Dockerfile. Each missed spelling is a detector case, and the current tree passes every widened scan (#1145). -
Tests: auth tests now let the rule they name decide the outcome: directory group removal suppression is pinned for a
missing_usernameskip as well asmissing_email, the concurrent refresh test races two refreshes inside one read-to-consume window, the local-login refusal of an LDAP account is tested with a real password hash, the paged email enumeration asserts the cookie it sends back, and the blank and partialSUPERADMIN_*seed tests read the database the seed writes to; a test that asserted a set literal is removed (#1146). -
Tests: execution tests that never reached the branch they name now do: a stale validation stamp on a route the current config refuses drives nothing, the route ledger's FAILED-to-ACTIVE race runs two real
record_route_activecalls, the VLAN allocation's IntegrityError retry is reached by a competitor committed inside the race, a crashing health poll is shown not to back off the tick, a stalewiring_changedversion is a no-op against a non-empty intended set, a 5xx ownership answer is a 403, and create failures are shown to NAK rather than dead-letter (#1137). -
fix(execution): a ledger write that loses the FAILED-to-ACTIVE compare-and-swap to a concurrent writer (
record_l1_connect,record_l2_membership_active,record_route_active) returns the winner's row and logsstale reattempt writer skipped, as documented, instead of raisingMissingGreenletwhile re-reading a row its rollback had expired; the stored row was never harmed (#1152). -
Tests: integration checks that held without the effect they name now prove it. Absence reads wait for an ordering anchor (a later wired or dynamic reservation, the reservation's own
expiring_soonnotification, a second health event, or execution'slast_applied_fork_versionstamp) instead of a fixed sleep; the wiring retry pollers return nothing unless the wanted outcome was seen; the ACL tests build a group holding the integration user and readallowed; the VLAN uniqueness test forces two reservations onto one preferred number; the stale-replay test delivers its replay while the ledger and the intended set disagree; and the facade release, admin visibility, device-existence, webhook event-type, topology import, commit, execute-scope, and JWT expiry tests assert the exact answer (#1147). -
Tests: Selenium tests that a static label satisfied now read the element the behavior changes: exact toast text for the config, connection, and driver refusals (the driver one also reads the driver count back), the superadmin role cell, the inventory filtered empty state, the palette search removing one device's card, the active tab and the Details panel, and the calendar header label; the LDAP login test fails instead of skipping and defaults to
ldapit-eng1; the live-edit and reservation detail tests open their own row; the clone test reads the clone back by name; two hollow duplicates are removed; and two vitests pin the palette'ssearchparameter and the calendar day view (#1148). -
Tests: the LDAP sync-now concurrency test accepts the second request being refused or accepted after the first run ended, and in the second case proves the two runs did not overlap; it no longer fails when a small run finishes before the second request arrives (#1134).
-
Fixed: reservations, execution, notifications, and integration start without a NATS broker. The first connect is bounded (
herd_common.jetstream.connect_nats, five retries two seconds apart) and then raises into each service's logged-and-continue branch; an established connection still reconnects without limit (#1083). -
Fixed: a NATS event whose body is JSON but not an object (a list, a string, a number) is dead-lettered and acknowledged by the execution, integration, and notifications consumers, as undecodable JSON already was, instead of escaping unsettled and being dropped after the delivery cap with no DLQ copy (#1074).
-
Fixed: a secret delete whose inventory reference lookup answers 200 with a body that is not a JSON list of objects answers the fail-closed 503 and keeps the secret, instead of a 500 (#1084).
-
Fixed: a data-key rotation in one secrets replica binds every other replica with no restart: a key version a process has not seen is loaded from the key table on first use, and writes use the newest version in the table. Rotations are serialized by an advisory lock, a collision answers 409 instead of 500, and an unloadable key version answers a fixed 503 (#1085).
-
Fixed: the config service's Save and Restart reports a Docker failure by the exception class only; the exception text goes to the log (#1086).
-
Fixed: the notifications service no longer caches a failed admin-list, preferences, or contact lookup. The fallback covers only the event that hit the failure and the next event asks again, so an outage no longer silences admin health notifications for a minute or ignores an opt-out for 30 seconds (#1075).
-
Fixed: config version numbers stay unique per device under concurrent writes: the unique
(device_id, version_number)index is declared on the model so a fresh schema has it, migration 0023 creates it where missing (renumbering any duplicates above the device's maximum), and a create or restore that collides retries, answering 409 after five attempts (#1095). -
Fixed: cancelling a scheduled config apply is a compare-and-swap on a pending row, the same guard as the scheduler's claim, so a cancel that loses to a claim answers 409 with the status it found and a claim that loses fires nothing (#1088).
-
Fixed: the stale-running sweep measures a running apply job from its claim (new
claimed_at, migration 0024) instead of its scheduled time, so a job claimed late is no longer re-queued and fired a second time while its claimer is still firing it (#1089). -
Fixed: the immediate and scheduled config applies judge execution's answer by one rule (success only for a JSON object whose run status is
SUCCESS) and move the device's current config pointer through one helper, so a scheduled real apply that succeeds now moves it and a dry run never does (#1094). -
Fixed: a scheduled config apply tags its execution run with the job's reservation, so the reservation owner can read the dry-run transcript and find the run in the reservation's run list (#1090).
-
Fixed: the immediate config apply requires an explicit
managegrant from a non-admin, the same rule execution applies, and refuses anyone else up front with 403manage grant required on this device for an immediate apply (a reservation owner can schedule the apply instead); a reservation owner without a grant schedules the apply instead (#1092). -
Fixed: a 200 whose JSON body is not an object from acl or reservations during a device-config permission or reservation check, or from execution during a published-schema read, is treated as an unusable answer (no grant, a 503 at schedule time, a skipped job, the registry schema) instead of raising into an unhandled 500 or a
scheduler crash(#1096). -
Fixed: a failed config apply stores and returns
execution service unreachable (<ClassName>)orexecution answered HTTP <status>(plus the message of a structured refusal such asdriver_cannot_configure) instead of exception text or execution's raw answer; the raw text is logged (#1093, inventory side). -
Fixed: retrying a failed or timed-out execution run repeats its mode: every run records a boolean
dry_runininput_params, a retried dry run is called withdry_run=True, and a run written before that record existed is refused with 409 instead of being retried for real (#1091). -
Fixed: two first loads of one driver at once both succeed: each extracts into its own directory and the cache row is written insert-or-nothing and read back, so the loser adopts the winner's row; and a run interrupted by an unexpected exception ends
FAILEDwithexecution failed: <ClassName>instead of stayingPENDINGorRUNNING(#1097). -
Fixed: execution's 503 for a device or template it cannot read from inventory carries an upstream status, a class name, or a malformed-body note instead of the exception text with the internal URL, and a 200 whose body is not a JSON object is that 503 too (execution half of #1093).
-
Fixed: the device page's configuration section shows a refusal in words: Apply now and Schedule show the
driver_cannot_configure409's sentence and the driver's name, a refused restore lists up to three blocking reservations, and any plain-string detail (a 403, a 422, the fail-closed 503) shows as given, instead ofApply request failed,Restore failed, or an object passed to the toast. The Apply dialog and the scheduled-applies panel gain tests (#1098). -
Fixed: the notification bell's Delete is a sibling of the notification's own button instead of a button nested inside it, so each is a separate keyboard stop with its own name, and the notification list query no longer runs for a signed-out visitor (#1076).
-
Fixed: a topology import dry run is a full rehearsal: every row runs through the same create and update path as a committing import inside a transaction that is rolled back, so a new topology named twice in one file reports
createthenupdateon a dry run, as the commit does, and the dry-run report matches the committing report row for row (#1064). -
Fixed: when a freed VLAN number's allocation is released,
delete_vlanis skipped only when another live allocation holding the number reaches the current cabling component of a switch the number is defined on, judged as allocation judges it, instead of by comparing stored fabric ids that a cable change makes stale; when cabling cannot answer, that delete is skipped and the definition is left in place (#1065). -
Fixed: reservations reports
purpose_classification_pendingas false once the purpose sweep's attempts reachPURPOSE_CLASSIFY_MAX_ATTEMPTS, so the idle-conversation sweeper releases the transcripts of a reservation the sweep has given up on; the admin backfill reset makes it pending again (#1067). -
Fixed: non-admin template reads mask password-field defaults the way device reads mask password values, and the template editor's Default input for a password field no longer shows the value on screen.
-
Tests: the Selenium inventory search test (
test_inventory_search_filters_results) now restores the admin's saved inventory filter. It reads the baseline before touching the page, still waits for its erased search to read back empty, then writes the baseline back in a finally block and fails when the read-back differs; before, it left an empty search in place of whatever filter was saved (#1070 follow-up). -
Tests: the e2e suite no longer leaks the admin's saved inventory search between tests. Every inventory test that types a search waits for the preference PATCH whose parsed body saves exactly that search (one shared predicate,
pw_prefs_patch_carriesintests/e2e/conftest.py, replacing a substring match that an earlier, longer search satisfied) before it restores the baseline, and then reads the preference back and fails if it differs. The inventory filters and toast placement tests clear a leftover filter through the Filters panel's control instead of failing on it, and a unit test refuses a substring test on a raw request body anywhere undertests/e2e(an AST scan since #1145 that follows the body through a variable,str(),.decode(), oror "", and flagsin,find,startswith, and the like; a parsed body is not flagged) (#1070). -
Docs: README.md, FEATURES.md, PLANNED_FEATURES.md, ARCHITECTURE.md, the user, admin, topology editor, and operations guides, and GAPS.md describe the 2026-10-07 fixes as built (instance-device and dynamic-template visibility, the enforced hypervisor flag, the port cabling guard, reservation edit and calendar rules, reachability-scoped VLAN allocation, the assistant's device scope and transcript retention), and ADRs 0004, 0006, 0009, and 0013 gain dated as-built amendments.
-
Fixed: the fork save lists every line whose chosen ports no cable path joins in a new
constrained_edges_skippedfield (it still answers 200 and never wires other ports), and the editor's save toast names each such line by device and port and stays until dismissed (#1007). -
Fixed: a directory-group mapping create the directory cannot validate answers 503 with the fixed detail
Directory unavailable, mapping not validated; the directory error text goes to the log message only (#1009). -
Fixed: every reservation assistant tool that takes a device id accepts only the reservation's own devices; any other id is refused at dispatch with
<argument> is not a device of this reservationbefore any downstream call, for read and write tools alike, and an unreadable device list refuses every device-scoped call (#1054). -
Fixed: the assistant's web documentation fetch resolves
.and..path segments, literal or percent-encoded, before the allowlist prefix match and on every redirect target, and refuses hosts resolving into the shared address space 100.64.0.0/10; corpus search no longer indexes a symlink that leaves the corpus root (#1055). -
Fixed: while purpose classification reads assistant transcripts, the idle-conversation sweeper keeps a conversation whose reservation is not terminal or is terminal with classification still pending, read from reservations' internal status (new
purpose_classification_pendingfield), and keeps it when that answer is unavailable (#1039). -
Docs:
docs/DRIVERS.mdstates that a Hypervisor recipe's returnedfield_datais stored as given and redacted only under the template's password keys, so a credential must go under such a key or into the secrets service (#1056). -
Fixed: a device or template import dry run is a full rehearsal: every row runs through the same create and update checks as a committing import inside a transaction that is rolled back, so the dry-run report matches the committing report row for row (#1017).
-
Fixed: a port delete, and a port update that changes the name, answer 409
port_cabled(connection_count,connection_ids) while a cabling connection names the port, and 503 when cabling cannot answer, instead of leaving the cable naming a port that no longer exists; cabling gains the internalGET /connections/internal/by-portlookup (#1023). -
Fixed: the template export and import carry a
hypervisor_namecolumn resolved by name, so a dynamic template round-trips into another instance; an unknown hypervisor name rejects the row naming it (#1024). -
Fixed: VLAN numbers are unique across everything reachable through the current cabling, transit switches included: allocation compares cabling's current fabric answer for the new switches and for every switch another live allocation is anchored at, so a cable change no longer lets two reservations share a number in one fabric or gives one reservation two numbers in it; allocations are serialized by an advisory lock, and a fabric lookup cabling cannot answer now defers the allocation (NAK, retry tick keeps the row FAILED, manual retry 503) instead of substituting a one-switch fabric (#1003).
-
Fixed: a non-admin can see and book a dynamic template only when its hypervisor names a device group one of their user groups holds a permission on (new
device_group_idon hypervisors, migration 0022, "Bookable by device group" on the Hypervisors page); a hidden template answers exactly like an unknown one, and every existing hypervisor starts admin-only until an admin assigns a group (#1053). -
Fixed: a hypervisor's Enabled flag is enforced: a booking of a template on a disabled hypervisor is refused with a 422 naming it, and execution creates no instance on it for a booking taken earlier (log action
dynamic_instance_hypervisor_disabled) (#1033). -
Fixed: the owner of a booking of physical devices plus dynamic instances can open their instance device and change the reservation's physical devices while keeping it; the edit judges topology-type uniformity over the booked devices only, and inventory grants visibility of an instance device through the owner's live reservation (new internal
GET /internal/held-devicesin reservations) (#1030). -
Fixed: a filter, page size, or sort changed on the Inventory, Reservations, or Topologies page before the saved preferences finished loading no longer saves an empty search over the saved one; the store holds such writes until the load settles, applies only what the user changed on top of the loaded values, and saves the result once (#985).
-
Fixed: the device page's Save sends only the fields the admin changed since clicking Edit, and Edit starts from the current device, so a rename no longer writes back a stale status over one provisioning set meanwhile (#1020).
-
Fixed: the topology editor opens a stored node that has no device (the seeded "BROKEN" topologies) instead of crashing into the error boundary; the node renders as "Unknown device" and a new connection to it is refused with a toast (#989).
-
Fixed:
/configand/templates/newcarry bottom padding so their last controls can scroll clear of a stack of toasts (#988). -
Fixed: a bulk group member add naming a user id with no account answers 404
Users not found: <ids>and adds nobody, instead of an unhandled 500 (#1009). -
Docs: the dead-letter inspection, replay, and purge commands in
docs/OPERATIONS.mdrun thenatsCLI from anatsio/nats-boxcontainer, since thenatsservice image has no CLI, and say when a replay is meaningful (#991). -
Fixed: inventory answers 422 or 503 where a 500 escaped: a bulk port create whose last generated name exceeds 255 characters, a device or template import file that is not UTF-8, and a non-JSON 200 from reservations during a device delete or config restore (#1022).
-
Fixed: a device-group bulk add naming a device that does not exist answers 422
Devices not found: <ids>and adds nothing, instead of a 500 (#1019). -
Fixed: a device import that updates an existing device writes only the columns the row carries, so omitted
field_data, poll interval, status, and topology type keep their stored values; an explicit null on a NOT NULL device field is a 422 naming the field, and only a real name clash reads as one (#1016). -
Fixed: the device page's user group names are resolved across every page of auth's group list, not only the first 50 groups (#1021).
-
Fixed: template and driver updates hold the template-driver connection-type contract: a template update cannot clear a required driver or hypervisor (422), and a driver's connection type cannot change in a way that breaks a template using it (409) (#1018).
-
Fixed: a dynamic-instance teardown that hits a transient recipe package download
failure (a replica with no cached copy while inventory or package storage is briefly
unreachable) now NAKs the terminal event so the redelivery destroys the instance; it
used to acknowledge the event with the instance still running and nothing retrying it.
A broken package still leaves the row live withdynamic_instance_keyed_destroy_failed
(#1029). -
Fixed: a dynamic create can no longer leak an instance and its device after the
reservation's teardown has run. Each request re-reads the reservation after its ledger
row is committed and creates nothing once it is no longerPENDING_PROVISION(log
actiondynamic_instance_create_skipped_reservation_ended), and the create path reads
ledger rows scoped to its own reservation. When a create loses itsACTIVEflip to
teardown, the compensating destroy now always runs, and a device delete that fails is
logged asdynamic_instance_compensation_device_leftinstead of being reported as a
clean undo (#1028). -
Fixed: the dynamic recipe flows act on a
loginthat returns{"success": false}: a
create stops beforecreate_instanceand retries, teardown and the compensating
destroy run nodestroy_instanceand keep the ledger row live, and recipe run rows are
FAILEDwhenever the recipe reported failure, as physical runs are. A device delete
that fails after a successful teardown destroy now logs
dynamic_instance_device_delete_failedwith the device and the row's real status
(#1027). -
Tests: pins for dynamic-resources rules that had none, among them secret redaction in
recipe run rows across a full create and teardown cycle and a live test of a failed
recipe login; the integration redelivery test's docstring now says it proves the
corroboration gate (#1032). -
Fixed: saving a topology as a template no longer turns network elements into device roles (a template stored that way reads and instantiates with the stray role ignored); a taken template name is a 409 from every template write route, never a 500; template names and descriptions take the topology bounds (#1005).
-
Fixed: topology CSV export writes the ports chosen in the editor instead of canvas handle names, and CSV import writes them back where the fork save reads them, so a round trip keeps port assignments (#1006).
-
Fixed: topology validation judges an edge's chosen ports by the fork save's rule and reports
no_port_pathfor ports with no cable path, instead of calling valid an edge the save builds nothing for (#1007). -
Fixed: a non-admin owner's fork read redacts hops on devices outside their visibility, and
GET /connections/{id}answers a cable with no visible end with the same 404 as an unknown id (#1008). -
Fixed: the expiration sweep's restart backstop, which returns a physical-only reservation stranded in
PENDING_PROVISIONtoPENDING, now also releases that reservation's exclusive devices through the holder-aware release filter, so a later cancel or elapsed-window failure no longer leaves themRESERVEDwith no holder (#993). -
Fixed: both provisioning backstops measure
PROVISION_TIMEOUT_SECONDSfrom the newreservations.provision_started_atcolumn, stamped when a row entersPENDING_PROVISION(migration 0017), instead of fromupdated_at, so a purpose-category edit no longer restarts the timeout; rows without a stamp fall back toupdated_at(#997). -
Fixed: a reservation that fails during create because the inventory flip gave up is now stamped for purpose classification like every other terminal transition, and its revert of partially reserved devices uses the holder check (#996).
-
Tests: new tests pin the 50-request dynamic cap (backend and frontend), owner-only
GET /{id},PATCH /{id}, and release for non-owner admins and users, and the sweep'sPENDINGclaim against a concurrent cancel on a real Postgres (test_sweep_claim_cancel_race_live_pg.py, added to the live-Postgres gate phase) (#998). -
Fixed: every streamed assistant turn ends in exactly one
doneorerrorframe; an unexpected exception, including a database error while saving the turn, now ends inerror"Assistant call failed" (ordonewithincompletewhen a write already landed) instead of a stream with no terminal frame (#1037). -
Fixed: an inventory or reservations failure during generation or a first assistant turn answers a pinned 503 instead of a 500, and generate checks the provider, the quota, and the uploads before it reads inventory (#1035).
-
Fixed: an AI request that ends in an error after reaching the provider is metered against
AI_DAILY_TOKEN_QUOTAwith the tokens its calls reported, for generation, the assistant, recipe drafting, purpose classification, and identity suggestions (#1034). -
Fixed: model output and upstream error text no longer reach logs, error details, or assistant tool results; the identity route logs only the failing fields, and tool and commit errors name a status or an exception class (#1036).
-
Fixed: AI generation refuses a proposal whose resolved devices mix physical and cloud types, as a repairable mistake and then a structured 422
topology_mixed_types, and reports each device's resolved type (#1038). -
Tests: tests for the AI rules that had none, and the specification's "Pinned by" entries updated (#1040).
-
Docs: the AI commit dialog's config label says admin or a device manage grant, and three stale lines in TROUBLESHOOTING.md and ADR 0009 match the code (#1041).
-
Fixed: a driver package download that fails while wiring is applied (inventory or
package storage briefly unreachable on a cold driver cache) no longer strands the
connection. L1, L2, and L3 rows used to be parked under the non-retryable
recorded hop unresolvablereason that only a fork re-save cleared, and on the release
side (a teardown included) nothing ever drove them again. A transient load failure now
recordsdriver load failed: <ClassName>with one attempt, and both retry channels
drive the row again in its own direction; a broken package (DriverPackageError) stays
non-retryable. The stored text carries only the class name (#1002). -
Fixed: removing a Layer 3 routing intent that the drive gate refused before anything was applied now falls back to the switch's configured routes. The refused row records that nothing is installed, so the save and the retry tick drive the configured routes (or release the row when there are none) instead of pinning an empty route set ACTIVE and reporting a login and logout with no route call as reconnected; a switch that had an applied set still keeps it (#1004).
-
Fixed: a Layer 3 route change that partly fails no longer leaves routes on the switch.
The failed pin now records every route that may still be installed (the previous
routes whose removal did not confirm plus the routes the change tried to add); a
terminal teardown parks such a pin release-direction and removes those routes, and a
later save or retry that rebuilds the switch removes the ones its intent drops before
configuring the intent (#1001). -
Docs: corrected documentation, docstrings, and comments that the code contradicts, found while writing the specifications; ADR 0004 and ADR 0015 gain dated as-built addenda instead of rewritten decisions (#1010, #1025, #1031, #1041).
-
Docs: specifications under
docs/specs/, one per feature area, each rule tied to the code that enforces it and the test that pins it. The first isdocs/specs/reservations.md;tests/unit/test_spec_references.pyfails when a specification names a path, symbol, test, link, or section that no longer exists. -
Fixed: editing a reservation's devices obeys the inventory hold rule. The edit commits under a status guard, so a PATCH that races a cancel, release, auto-complete, or activation keeps nothing and answers 409; inventory is written only after the commit and only on an
ACTIVEreservation, with three attempts, and removed devices are released through the holder-aware filter (#994). -
Fixed: a PATCH can no longer stretch a reservation past
RESERVATION_MAX_DURATION_SECONDS; the new end time is judged from the stored start by create's own check and wording (400) (#995). -
Fixed: adding a device to a
PENDINGreservation follows create's rule for a future window: the window conflict check decides, not whether the device isAVAILABLEright now (#999). -
Fixed: the reservations calendar answers 503 for a non-admin when device visibility cannot be verified, instead of showing every user's reservations; admins are unaffected (#1000).
-
Fixed: ending a reservation no longer leaks a dynamic instance whose create failed,
timed out, or lost its process after touching the hypervisor. Teardown used to treat a
ledger row with noinstance_refas "nothing was created" and mark itDESTROYED
without calling the recipe. It now runs a keyed destroy,destroy_instancewith
instance_ref=NoneandHERD_request_idin the context, and retires the row only when
that destroy succeeds; a failed or raising keyed destroy leaves the rowCREATING,
acknowledges the event, and logsdynamic_instance_keyed_destroy_failedwith the
request and reservation ids (seedocs/TROUBLESHOOTING.mdfor finding the instance and
retrying). The same keyed destroy now covers the #896 compensation path. A
create_instancethat reports success without aninstance_refis a failed create
(log actiondynamic_instance_create_missing_ref) instead of anACTIVErow nothing
could destroy. The execution consumer now corroboratesreservation.provision_requested
like the other lifecycle events: it runs only while the reservation is
PENDING_PROVISION, so a late redelivery cannot create an instance for an ended
reservation; this makes provisioning depend on reservations being reachable, and an
outage that outlasts the NAK schedule dead-letters the event so the provision timeout
fails the reservation with no create attempted (docs/TROUBLESHOOTING.md). Teardown
retires a row only by a compare-and-swap on the state it actually destroyed, so a create
that lands on another replica mid-teardown is torn down too instead of being leaked
(log actiondynamic_instance_teardown_contendedif that keeps happening), and a
create that fails after teardown retired its row runs a keyed compensating destroy. A
create_instancesuccess without aninstance_refnow dead-letters on its first
delivery. The package validator judgescreate_instanceanddestroy_instanceby the
consumer's own rule (an explicit"success": true, and a non-emptyinstance_reffrom
create). AI-drafted recipes are validated against a new dry-run step,
destroy_instance (no instance_ref), and the drafting prompt states the requirement
(#937).
UPGRADE NOTE for authors of existing Hypervisor recipes:destroy_instanceis now
called asdestroy_instance(instance_ref=None)for an instance whose create never
reported a handle. Acceptinstance_ref=None, find the instance by the name
create_instancederives fromHERD_request_id, destroy it, and return
{"success": True}when no such instance exists; never raise or fail just because the
ref is missing. Also make surecreate_instancealways derives that name and returns a
non-emptyinstance_refon success. A recipe that requires a ref leaves such rows
CREATINGwith the log action above on every teardown. Watch for the opposite trap too:
a recipe that passesNoneinto its hypervisor API and reads the "not found" as an
already-absent success would let HERD retire a row whose instance still exists. There
is no capability flag; the keyed destroy is part of the Hypervisor contract
(docs/DRIVERS.md). -
Changed: toasts appear at the bottom centre of the window instead of the top right. At the
top right a toast covered the topology editor's Save button and the header controls, and
because a toast waits while the pointer rests on it, the pointer left on Save after a click
kept the toast up and Save unclickable. Hovering a toast still holds it open; durations and
styles are unchanged. A new Playwright test measures that no toast, single or three deep,
covers a control on the topology editor or the inventory list at 1280x720 and 1920x1080
(#942). -
Fixed: a topology can no longer be deleted while a reservation still uses it.
DELETE /cabling/topologies/{id}is refused with 409
{"error": "topology_in_use", "reservation_ids": [...]}(sorted) while any reservation
in PENDING, PENDING_PROVISION, or ACTIVE references the topology; COMPLETED, CANCELLED,
and FAILED reservations do not block. Before this, deleting the topology behind a future
booking made that booking activate later with an empty canvas and no wiring, and nothing
reported it. The check asks reservations' internal by-topology lookup and fails closed: if
reservations cannot answer, or answers in an unexpected shape, the delete is a 503 and
nothing is deleted. It runs after the existing 404 and 403, so a caller who may not
delete the topology learns nothing about its bookings. There is no force flag and no
cascade; cancel the reservations or let them end first. The Topologies page explains the
refusal on the row and in the toast ("In use by N reservations. Cancel them or wait for
them to end, then delete again."). The edit lock on a reserved topology keeps its
fail-open behavior. Known limit: a reservation created in the instant between the check
and the delete can still land on a deleted topology (#977). -
Fixed: on the Inventory page, a saved search could be lost when the user changed the
Status, Template, or Topology filter within about 300 ms of the saved preferences
arriving after a page load. The filter change saved an empty search in place of the
saved one. A saved search now applies to the device list as soon as it loads, without
waiting for the search debounce, and every later save carries it. Only typed text
still goes through the debounce. The Topologies page already worked this way and now
has tests that pin it (#982). -
Security: the e2e Selenium container now publishes its WebDriver endpoint (4444) and
its noVNC browser view (7900) on 127.0.0.1 only. Neither port authenticates, and both
used to listen on every host interface while the container was up (during
make test-e2eand the gate runs), so anything that could reach the host could start
a browser session inside the stack's network or watch the one a test was driving. The
e2e suite connects from the host on localhost and is unaffected; to watch a run from
another machine, forward 7900 over ssh. A unit test now holds every port the dev
override publishes to the same loopback rule as the base compose file (#964). -
Fixed: modal dialogs now open centred instead of pinned to the top-left corner of the
window. Tailwind 4's base styles set every element's margin to zero, which removed the
browser's own centring for native dialogs; the three dialog components (Modal,
ConfirmDialog, and the bulk import dialog) now set it explicitly. Every release
through 0.6.0 was affected. A dialog taller than the window still scrolls inside itself,
so no control moves out of reach (#979). -
The Reservations page can be searched and filtered from the left filter panel: a search
on purpose (case-insensitive; 8 or more hex digits also match a reservation id prefix),
Status, Category (a configured purpose category or Unclassified), and Period (Upcoming,
Current, Past), with the admin "All reservations" toggle moved into the panel. The list
endpointGET /reservations/gainedsearch, a repeatablestatus,
purpose_category(nonefor unset), and half-openstarts_after,starts_before,
ends_after, andends_beforebounds; every filter applies inside the rows the caller
may already see,totalis the filtered total,all=truestays admin-only, and a bad
value (including an unknown category or a timestamp without an offset) is a 422. The
choices are saved insavedFilters.reservations, a stale saved value falls back to All
and is never sent, any filter change returns to page one and clears the bulk selection,
and a filtered-empty state offers Clear filters. The/api/v1facade is unchanged and
still forwards onlyskipandlimit(#959). -
The Topologies page gets search, an Owner filter (All, Mine), sortable Name, Owner,
Created, and Updated headings, and multi-select delete.GET /cabling/topologies
gainssearch(case-insensitive name substring),owner(mineorall),sort_by,
andsort_dir, validated as enums (a bad value is a 422), withtotalcounting the
filtered set and an id tiebreak; text sorts case-insensitively and identically on
SQLite and Postgres. The filters and sort persist per user (savedFilters.topologies,
extras["sort:topologies"]) and a stale saved value falls back to the default. Delete
is gated by one predicate matching the backend rule (creator, admin, or superadmin),
shared by the row button and the bulk action; the bulk action skips rows that are not
yours, says so in the confirmation, and keeps refused rows selected with the server's
reason (#958). -
List pages get a shared left filter panel (
ListFilterPanelin
frontend/src/components/ui/): a labeledFiltersregion beside the table that holds
the search box, the page's filter controls, and a Clear filters control shown only when
a filter is active, stacking above the table on a narrow viewport. The panel owns
layout and labels only. The Inventory page's search and its Status, Template, and
Topology filters moved into it with no behavior change: the same query parameters,
saved filter, stale-value fallback, and row expansion and selection rules (#957).