Skip to content

HERD v0.7.0

Latest

Choose a tag to compare

@vendrabuck vendrabuck released this 08 Nov 19:57
· 655 commits to main since this release
9fc48ba

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 validates AUTH_SECRET_KEY and AUTH_ALGORITHM as 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_BIND publishes the gateway on one
    host address (#1256). Each stack's Traefik now discovers only its own compose project's
    containers, and make up, make dev, and make prod refuse to start while another
    compose project publishes port 80 or 443; recreate Traefik after pulling, as the upgrade
    note below says. make certs writes 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
    before make migrate when the new release adds a column to users (#1261). make everything runs the ci.yml checks it used to skip, among them uv lock --check, the
    frontend suite under TZ=America/Los_Angeles, and the package-lock.json sync 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 with PATCH /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 an ACTIVE
    reservation (#994). An edit can no longer stretch a reservation past
    RESERVATION_MAX_DURATION_SECONDS (#995), and a device added to a PENDING reservation
    is judged by the window conflict check (#999). Both provisioning backstops time from a
    new provision_started_at stamp, 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
    oldest FAILED rows 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 an INTERNAL_API_TOKEN rotation a live switch's wiring rows are retried
    instead of pinned FAILED (#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 accept instance_ref=None (#937). A
    ledger write that loses the FAILED-to-ACTIVE compare-and-swap returns the winner's row
    instead of raising MissingGreenlet (#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 an ai_model marker 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.BoundedTarStream refusing any single read over MAX_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: BoundedTarInfo refuses an extended header (pax x and g, Solaris X, GNU L and K) whose record, rounded up to its 512-byte block, is over MAX_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 _BoundedTarInfo now extends it) and keeps the per-read bound as the second line; the refusals are unchanged: execution's PackageLimitError, 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 certs generates the gateway's TLS certificate, so a fresh clone is no longer served Traefik's built-in TRAEFIK DEFAULT CERT (#1239). The repository never tracked infra/traefik/certs/server.key, so the tracked chain could not load anywhere but a host that had supplied its own key, and dynamic.yml set no default certificate, so a client connecting by IP address (no SNI) got Traefik's own even there. make certs (scripts/make_certs.sh) writes server.key and a self-signed server-chain.crt valid for ten years, naming localhost, 127.0.0.1, the HERD_GATEWAY_BIND address, and any CERT_SANS entries, 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, and CERT_FORCE=1 regenerates 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 bare docker compose up, run it as a step before that; dynamic.yml names 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), and infra/traefik/certs/README.md keeps the directory. Trusting the certificate stays a manual step (FRESH_SETUP.md step 3). tests/unit/test_make_certs_wiring.py pins it through real make in 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 502 Assistant call failed; after a write landed, the turn is kept and answered 200 with incomplete: "ai_error". Neither the response nor the stored rows carry the exception's text; the failure is logged once as ai_assistant_unexpected_error with 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 everything failed on 2026-11-06 when the 9B model behind the host's vLLM bridge answered test_assistant_answers_a_herd_how_to_from_the_manual from its search_docs results without the read_doc the test asserts, and make test-integration runs 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 registered ai_model marker; make test-integration runs -m "not ai_model" and keeps -x, and the new make test-integration-ai runs -m ai_model without -x right after it in both master and everything, 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 no search_docs call, or an erroring tool still fails on the first turn. tests/unit/test_ai_model_marker_wiring.py requires the marker on every integration test that calls ai_provider_configured and reads tool_calls, and pins the registration, both pytest commands, and both gates' calls. nightly.yml runs the whole directory with no -m and 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), and docs/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.md lists #1280 (the buffered assistant route's plain 500) and the tgz CPU-time limit, device-configuration.md the driver loader's pax-header bound, inventory.md the outage-order asymmetry of three older reads, and topology.md the label-only node decision.

  • Fixed: the NOS lab FRR image builds again (#1268). infra/nos-test/frr/Dockerfile pinned openssh=9.0_p1-r5, and Alpine 3.16's repository (the pinned frrouting/frr base image is Alpine 3.16.2) now carries only openssh-9.0_p1-r6, so every fresh build failed with openssh-9.0_p1-r6: breaks: world[openssh=9.0_p1-r5] and make nos-up stopped there; the advisory nos-dialect job and the nightly NOS lab feature tests failed with it, while hosts with a cached image never rebuilt the layer. The pin is now openssh=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 migrate when the new release adds a column to users. The startup seed's existence check, superadmin_exists, selected the whole User model, so on a schema stamped at the previous release (startup never runs create_all there, #419) it named the columns revision 0009 added (full_name, contact_email, phone), the SELECT failed with column users.full_name does not exist, auth exited at startup, and make up ended with the auth container unhealthy; under make prod the container crash-looped, so make migrate-auth (a docker compose exec) raced the restarts. The seed's three existence checks now select the id only: superadmin_exists (with LIMIT 1), the new email_registered for the configured superadmin email, and the new group_name_exists for the "Not Grouped" group, so no column a later release adds is read at boot. docs/OPERATIONS.md now states the column case and the make prod remedy, docker compose -f docker-compose.yml run --rm <svc> alembic upgrade head, and docs/TROUBLESHOOTING.md lists the symptom (#1261).

  • Fixed: the first SR Linux test of the advisory nos-dialect job no longer fails with an SSH ConnectionResetError during the banner exchange right after the lab boots (#1263). The SR Linux healthcheck proved the baseline landed but never opened an SSH connection, so make nos-up (docker compose up --wait) could return while sshd still reset new connections. The healthcheck now also runs infra/nos-test/srl/ssh_ready.sh, which must read an SSH- banner from port 22, and every test-side netmiko session under tests/nos_lab/ opens through one helper, tests/nos_lab/_lab_ssh.py's open_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.py pins 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 (AppLayout puts the page in flex-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 with ElementNotInteractableException). The page now wraps its content in h-full overflow-y-auto, and a vitest source scan, src/test/pages/pageScrollContainer.test.tsx, fails any page the route table renders under AppLayout whose main render is not an h-full scroll 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_changed against reservations' GET /internal/{id} before it runs the handler, and _verify_reservation_event read any answer below 500 that was neither 200 nor 404 as not corroborated, so process_reservation_message ACKed the message and skipped the handler with no NAK and no dead letter. Reservations answers a wrong internal token with 403, so during an INTERNAL_API_TOKEN rotation a reservation.cancelled, .completed, or .failed was silently discarded, leaving the reservation's wiring rows ACTIVE and 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 as nats_event_unverified; the corroboration rule itself is unchanged. Every other answer (a 401, 403, 409, a 422 for a malformed id, a 5xx) raises TransientUpstreamError with the text verify 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 the CREATING row 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_value returned None for any answer below 500 other than 200, and both services answer a wrong internal token with 403, so during an INTERNAL_API_TOKEN rotation a dynamic-instance teardown left the row live with recipe_config_missing and never destroyed the VM, a dynamic-instance create was dead-lettered on its first delivery as a missing hypervisor or secret (the reservation FAILED instead 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 recorded FAILED with the misleading l3_switch_unconfigured. A 401 or 403 on any of the three now raises TransientUpstreamError with the text fetch latest config for device <id>: upstream 403 (or fetch 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 it still_failed where it reported released (#1216).

  • Added: HERD_GATEWAY_BIND publishes the gateway on one host address (#1256). docker-compose.yml publishes Traefik's ports 80 and 443 on ${HERD_GATEWAY_BIND:-0.0.0.0}, read from the shell environment or .env; the dashboard stays on 127.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, with localhost and every other interface refused. Unset keeps every interface, so CI, nightly, and other clones behave as before, with one difference: the explicit 0.0.0.0 publishes on IPv4 only, where the bare "80:80" and "443:443" also bound [::]. Nothing in the gates uses the IPv6 listener (curl https://localhost and Chromium fall back from ::1 to 127.0.0.1). The Makefile reads the same value (the environment or command line first, else the last HERD_GATEWAY_BIND= line of .env) and derives the host its harnesses address: localhost for unset, empty, or 0.0.0.0, otherwise the value. It exports HERD_BASE_URL (https://<host>/api) and E2E_HOST_BASE_URL (https://<host>) as defaults, so make seed, test-integration, test-contract, test-e2e, and test-load follow it while a value already in the environment wins, and the gate's health wait, its load phase, the make everything banner, the make logs note, and scripts/check_gateway_ports_free.sh's remedies (given the host as HERD_GATEWAY_HOST) name it. make test-load now drops a trailing /api from HERD_BASE_URL for locust's --host. make gateway-url prints 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 404 User 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 in modified_by, and log one user_profile_updated line carrying the changed field names, never values. GET /api/auth/me and GET /api/auth/users report 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 in docs/specs/identity-and-access.md.

  • Docs: docs/USER_GUIDE.md no 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 everything leaves serving https://localhost still up, make up added the dev stack's config and frontend containers 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 the traefik service's command in docker-compose.yml (infra/traefik/traefik.yml is gone, since Traefik ignores every other flag once a configuration file is given, which had also left the dev override's --log.level=DEBUG inert), with --providers.docker.constraints admitting only containers labelled with the stack's own com.docker.compose.project and --providers.docker.network naming 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, and make prod now 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, or make gate-down then make up; scripts/check_gateway_ports_free.sh); make logs says which project is serving when the dev project has none, and the everything closing banner says make up is refused while the gate stack runs. FRESH_SETUP.md and docs/OPERATIONS.md no 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 name docker compose config reports, so a checkout directory with _ or . in its name, or a COMPOSE_PROJECT_NAME in .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 sets COMPOSE_PROJECT_NAME for interpolation, compose-go #628).

  • Upgrade note for the change above: after pulling it, recreate Traefik (make up, or docker compose up -d) before anything restarts it. A Traefik container created before the change still mounts the deleted infra/traefik/traefik.yml; restarting it (docker compose restart, a Docker daemon restart, a reboot) fails with a not a directory mount error and leaves a root-owned directory at that path, which sudo rmdir infra/traefik/traefik.yml removes. make restart now 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 s leeway (ACCESS_TOKEN_LEEWAY_SECONDS) for clock skew between the auth service and a verifying service: a token stays valid up to 10 s past its exp, and an iat up to 10 s in the future verifies (PyJWT refuses a future iat, python-jose did not). enforce_minimum_key_length stays off, so a key under 32 bytes still verifies tokens and PyJWT emits InsecureKeyLengthWarning; startup still logs the short key. The three decode sites (make_auth_dependencies, auth's verify_access_token, notifications' get_bearer_credentials) and the settings round trip in herd_common.auth_settings call the helper, catch jwt.PyJWTError, and keep their 401 Could not validate credentials and the jwt_key_unusable log line, now naming InvalidKeyError. Token format and claims are unchanged, so a session issued before the upgrade stays valid. One startup rule moved: a JSON-shaped AUTH_SECRET_KEY (an array, a string, or an object without a kty member) now loads as an ordinary HMAC secret, while a JSON Web Key (an object with kty) is still refused with AUTH_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, and herd_common.auth_settings refuses 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 with ssh- or ecdsa-sha2-); a value that cannot be encoded as UTF-8 (a lone surrogate) gets the same message instead of a codec error. The repository guard tests/unit/test_jwt_settings_wiring.py now reads PyJWT's spellings (jwt.decode, decode_complete, jwt.api_jwt, jwt.api_jws, PyJWT() and PyJWS() 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.0 replaces python-jose[cryptography] in common, auth, and notifications and joins the dev extras 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, and python-jose leave uv.lock, while cryptography stays for secrets, netmiko's paramiko, and pdfminer-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_device and _fetch_template returned None for any answer below 500 other than 200, and every wiring layer reads that None as a switch (or template) gone from inventory: it recorded the switch's rows FAILED with recorded hop unresolvable: switch <id> not found and no attempt counted, a reason no retry channel drives, so a teardown or build that ran while inventory refused the internal token (an INTERNAL_API_TOKEN rotation) 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) raises TransientUpstreamError with the text fetch device <id>: upstream <status> (or fetch 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: a wiring_changed records nothing for the switch and a terminal teardown leaves its ACTIVE rows as they were. In the retry tick, the rows of a reservation whose apply hit the error are left unchanged and counted in skipped_upstream, and a build row whose endpoint read fails during the intent re-check reads back still_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 with recipe_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 no PYTHONPATH or PYTHONDONTWRITEBYTECODE in its environment, and _runner.py puts the package directory and then _deps on sys.path itself (_put_package_on_path) only after apply_rlimits, right after its own directory and ahead of the standard library, the order PYTHONPATH gave. Before, the package directory was on PYTHONPATH from interpreter start, so a package sitecustomize.py ran at startup and a package json.py replaced the standard library for the runner's own import json, both with no limit applied (a probe saw RLIMIT_AS (-1, -1)); a package sitecustomize.py is now never imported, and a package json.py is never imported because the runner's standard library json stays in sys.modules. The optional requirements.txt install runs as python -I -B -m pip install ... for the same reason. A Python subprocess a driver starts itself no longer inherits the package path through PYTHONPATH; the driver must pass it explicitly. A driver that imports a sibling module, a lib.<module>, or a module vendored under _deps works 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.py runs four Playwright journeys on a device it creates on the checked-in drivers/frr_mgmt package, each read back through the API: Apply now (the failed run is answered, shown as Apply failed: <error>, and recorded as the version's last_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 back cancelled, 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 no HERD_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.py gains DeviceConfigUser, 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 TransientUpstreamError raised 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. The wiring_retry_tick log line gains skipped_upstream, the rows left unchanged this way across the three layers (also counted in still_failed and rows_retried), and each such reservation is logged once at WARNING with action wiring_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 action wiring_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 everything runs the ci.yml checks it used to skip: uv lock --check before uv sync (so a stale uv.lock fails the gate instead of being rewritten in place; make master-quick, and so make master, gains this check too), the frontend suite a second time under TZ=America/Los_Angeles (new target make test-frontend-tz), the package-lock.json sync check after the frontend build, and the image-versus-lock check on the freshly built ai-orchestrator image (new target make check-image-lock); tests/unit/test_gate_ci_parity_wiring.py pins each one. make master-clean now builds the gate stack's own images with --no-cache too (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 every herd-* 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 .tgz context 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 400 The 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 400 The tgz archive has more than 4096 bytes of pax global headers; nothing was extracted, and a sparse member of any GNU format with 400 The 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 archive output (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-integer GNU.sparse.realsize, which tarfile would convert with a bare int(), 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 400 ReadError. 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 FAILED rows it will never drive. The tick selected the oldest FAILED rows 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, so WIRING_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. The wiring_retry_tick log line gains excluded_not_retryable and excluded_frozen, the FAILED rows under the cap that the selects leave out across the three ledgers, and stays at INFO while either is above zero; skipped_not_retryable and skipped_frozen keep 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 .tgz context 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 400 The tgz archive has more than 10000 entries; nothing was extracted at the member past the ceiling, and one the reader would have to read or skip past 100 MiB of, decompressed, with 400 The tgz archive extends past 104857600 bytes uncompressed; nothing was extracted before 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, /health included; 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 400 Failed 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 502 AI returned no usable response without reaching the provider (#1196).

  • Fixed: a .tgz context file uploaded to AI generate whose pax extended header or GNU long name is over 1 MiB is refused with 400 The tgz archive has a tar header record over 1048576 bytes (a pax extended header or GNU long name); nothing was extracted before 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 through herd_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 400 Failed 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.json within a bound: an entry larger than 1 MiB, by its declared size or by what a capped read returns, is refused with 422 driver_metadata.json is larger than 1048576 bytes; nothing was stored, and a .tar.gz whose 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 into herd_common.bounded_tar, which both services use; execution's refusals and their wording are unchanged (#1180, item 3).

  • Fixed: a driver_metadata.json that is not UTF-8, or is nested deeply enough that the JSON parser raises RecursionError, 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. An AUTH_SECRET_KEY that 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.example line) is refused with AUTH_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 .env arrives blank and gets the same message, while a service process started outside compose with no SECRET_KEY at all fails with pydantic's secret_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 with AUTH_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_ALGORITHM accepts only HS256, HS384, or HS512 (AUTH_ALGORITHM must be one of HS256, HS384, HS512); the RS* algorithms docs/ENV_VARS.md listed 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 placeholder AUTH_SECRET_KEY and another AUTH_ALGORITHM with the same messages and write nothing, since a saved config.json outranks .env (OPS-CONFIG-23). The three token decode sites (make_auth_dependencies, auth's verify_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 whose AUTH_SECRET_KEY is 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_ALGORITHM must be HS256, HS384, or HS512.

  • Tests: CI's frontend job runs the frontend unit suite a second time with TZ=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 guard tests/unit/test_ci_frontend_tz_wiring.py requires that step to set TZ in its env: to a non-UTC zone with daylight saving time and to run the same vitest command as the UTC step.

  • Fixed: a driver.py the parser itself cannot get through (a very long or deeply nested expression, which raises RecursionError or MemoryError inside ast.parse) is a permanent load failure, driver load failed: DriverPackageError, like any other unparseable driver.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.gz driver package whose pax extended header or GNU long name declares more than 1 MiB is refused with driver load failed: PackageLimitError before 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 a def removed by a later del no longer pass the load and then fail every health poll in the sandbox. A binding under a condition or in a for target 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.py with a coding cookie, and an extraction failure reports Failed 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 a for loop or comprehension target, or is unpacked from a tuple, or that goes through a name bound to getattr(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 any exit or exec word in the recipe ahead of a suite or of a gate's call, an honest || exit 1 included; a ; after a fi, done, or esac that closes around a suite; a variable assigned on a suite command other than HERD_TEST_PG_REQUIRED and HERD_TEST_PG_DSN; PYTEST_ADDOPTS on any make-level line of the Makefile outside a comment; a target-specific SHELL for the phase or a gate; and any assignment or -C on a gate's call. A recipe line with an unterminated quote fails with a message naming the line. The execution consumer start test pairs add_consumer and pull_subscribe by durable name, so it fails when the durable bound is not the one created. The heartbeat guard counts a nonlocal rebinding and a match capture as a second binding. The specification guard refuses a fixture named test_*, an it.fails or test.fails title, and a call that starts inside a string or template literal. The compose guard's .env.example check requires each active AI_* 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 the ack_wait settings 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_response in tests/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 earlier Configuration saved toast to clear (pw_toast_gone). The device config version cycle orders each version create by its POST response and waits for the earlier Config version created toast 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 with assert 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_checked and delete_port_checked join delete_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 in tests/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 FAILED from wiring-status by id (ACTIVE or RELEASED), so the background retry tick converging it first no longer times the test out; a release that converged must also show a SUCCESS run 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 in tests/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-tests recipe holds a pytest command that names the file, runs in the suite's service directory, carries HERD_TEST_PG_REQUIRED=1 on 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 no exit ahead of it (a name in a comment, on a commented-out line, in an echo, or ahead of || true no longer counts); it also checks that master and everything each run the phase through $(MAKE), $(SUBMAKE), or make with no option that stops it or hides its failure. The consumer heartbeat guard requires a call to the shared process_batch_with_heartbeat with heartbeat_interval of the configured ack wait, at least one place that sets ack_wait, and the configured value at every ack_wait setting its scan reads. The build-args guard requires each ARG once and one ENV after both in the stage that ships, and no RUN, COPY, or ADD after 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_URL must interpolate its three POSTGRES_* variables), not any ${. The specification guard requires a cited Python test to be a test* function that pytest's default rules collect from a test_*.py or *_test.py file, a cited frontend test to be the complete title of an it, test, or describe call 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_consumer and pull_subscribe from one ordered call log, so they fail when a durable is bound before ensure_consumer creates 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_consumer ahead of pull_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_only hides the infrastructure one, and the two apply-scheduler gate tests stub the creator re-check and assert reservation 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 results list (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-boolean valid, 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.md lists 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 call onConfirm. The AI assistant streaming test reads the live bubble mid-stream, the recipe panel close test reads every field back, the Routing panel and useDeviceConfigVersion pin 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's open state, the fork restore test restores from inside a preview, the auth store tests import a fresh store, and getWeekRange asserts local calendar fields so it passes in every time zone (#1142).

  • Fixed: a reservation that lands FAILED notifies its owner on every channel they enabled: the message is titled Reservation failed and 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 a Reservation failed toggle (#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_ENABLED is 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 channels whole 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_event with the production dispatchers and a transport error on email, chat, or webhook in turn, and the missing device_name test checks the exact title and body (#1135).

  • Fixed: a scheduled config apply that names a reservation_id is refused with 422 unless that reservation is ACTIVE, 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 503 Could 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 /execute passing ports, arguments, and the dry-run flag as sent; plus an integration test that schedules a dry run on drivers/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 Driver class and required methods by parsing driver.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). Driver must 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 in driver.py count, and a method that could come from code the parser cannot read is left to the sandboxed call. A driver.py whose top-level code raises now fails its first driver call instead of the load (#1114); for a dynamic-resource recipe that is login, 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 or setattr class whose methods are missing, and a driver.py that 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 .zip and .tar.gz alike, so a small, highly compressible upload can no longer fill the driver cache volume; the load records it as driver 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_ATTEMPTS failures (default 20) from any sources within CONFIG_LOGIN_LOCKOUT_SECONDS (default 300) make every source wait that long; a waiting login is answered 429 with Retry-After, a success clears the counts, and each wait that begins logs one config_login_locked line with the scope and source address.

  • Fixed: the config page's PUT /settings writes only keys CONFIG_SCHEMA declares: a body naming any other key is 422 Unknown settings: <sorted keys> and writes nothing; GET /settings shows schema keys only, and a key placed in config.json by 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_url whose host resolves to a loopback, link-local, private, shared, multicast, or unspecified address, or does not resolve, is refused at registration with 422 target_url must resolve to a public address and is checked again before every delivery (a failed ledger row with destination not allowed, nothing sent). The new WEBHOOK_ALLOWED_HOSTS setting (hostnames or CIDRs, empty by default) admits named internal destinations. Redirects are not followed, the ledger's last_error carries only upstream answered HTTP <status> or delivery failed (<ClassName>), and the address predicate is shared with the assistant's documentation fetch through herd_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 contract docs/api/v1-openapi.json gains format: uuid on 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, and md5 in 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 /execute that names a reservation_id is 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 configure on execution's POST /execute whose acl check answers 200 with a JSON body that is not an object (a list, a string, a number, or null) gets the pinned 403 Admin access or device manage grant required instead of a 500; execution now asks acl through herd_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 with Template is not a device template and 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 when Retry-After is missing or not a whole number) and keeps Sign in disabled for that wait, instead of the wrong-password toast; a 401 still reads Invalid config password (#1126).

  • Fixed: in a live reservation edit, a line the fork's draft autosave reports in invalid_edges turns red on the canvas with the reason on hover (for example no cable path on the chosen ports for 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 from constrained_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_services is shown to skip each one beside a restarted service (#1140).

  • Tests: the CORS origin parsing test drives add_cors_middleware and reads the origin list it registered, and the DATABASE_URL precedence test builds its source over a settings class that declares database_url, with a control that the derived URL appears when the variable is unset (#1141).

  • Docs: docs/OPERATIONS.md describes /health as a liveness answer that checks no dependency, a Postgres outage and a wiped config volume as the services actually handle them, and the nats-data volume; FEATURES.md and docs/ENV_VARS.md say the config service logs plain text, WARNING and higher only (#1087).

  • Docs: docs/DRIVERS.md records a timed-out driver run as TIMEOUT, docs/ROLES.md lists the run list's created_after and created_before filters, 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.md lists every /api/v1 and /api/notifications route by role, and docs/ARCHITECTURE.md names the facade's GET /reservations/{id}/wiring-status (#1080).

  • Docs: docs/OPERATIONS.md, docs/ENV_VARS.md, and SECURITY.md state 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 manage rule, 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_id as 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_progress loop; a yield inside a timeout scope reached through import asyncio as aio or a scope bound to a variable; a raw request body tested for a substring across two lines, through str(), .find(), or .startswith(), or in a nested tests/e2e directory; and a COPY . ./, COPY --chown=... . ., ADD . ., or COPY . /app ahead of npm ci in 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_username skip as well as missing_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 partial SUPERADMIN_* 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_active calls, 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 stale wiring_changed version 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 logs stale reattempt writer skipped, as documented, instead of raising MissingGreenlet while 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_soon notification, a second health event, or execution's last_applied_fork_version stamp) 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 read allowed; 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's search parameter 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 manage grant from a non-admin, the same rule execution applies, and refuses anyone else up front with 403 manage 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>) or execution answered HTTP <status> (plus the message of a structured refusal such as driver_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_run in input_params, a retried dry run is called with dry_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 FAILED with execution failed: <ClassName> instead of staying PENDING or RUNNING (#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_configure 409'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 of Apply 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 create then update on 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_vlan is 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_pending as false once the purpose sweep's attempts reach PURPOSE_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_carries in tests/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 under tests/e2e (an AST scan since #1145 that follows the body through a variable, str(), .decode(), or or "", and flags in, 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_skipped field (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 reservation before 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_pending field), and keeps it when that answer is unavailable (#1039).

  • Docs: docs/DRIVERS.md states that a Hypervisor recipe's returned field_data is 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 internal GET /connections/internal/by-port lookup (#1023).

  • Fixed: the template export and import carry a hypervisor_name column 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_id on 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-devices in 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: /config and /templates/new carry 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.md run the nats CLI from a natsio/nats-box container, since the nats service 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 with dynamic_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 longer PENDING_PROVISION (log
    action dynamic_instance_create_skipped_reservation_ended), and the create path reads
    ledger rows scoped to its own reservation. When a create loses its ACTIVE flip to
    teardown, the compensating destroy now always runs, and a device delete that fails is
    logged as dynamic_instance_compensation_device_left instead of being reported as a
    clean undo (#1028).

  • Fixed: the dynamic recipe flows act on a login that returns {"success": false}: a
    create stops before create_instance and retries, teardown and the compensating
    destroy run no destroy_instance and keep the ledger row live, and recipe run rows are
    FAILED whenever the recipe reported failure, as physical runs are. A device delete
    that fails after a successful teardown destroy now logs
    dynamic_instance_device_delete_failed with 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_path for 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_PROVISION to PENDING, 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 them RESERVED with no holder (#993).

  • Fixed: both provisioning backstops measure PROVISION_TIMEOUT_SECONDS from the new reservations.provision_started_at column, stamped when a row enters PENDING_PROVISION (migration 0017), instead of from updated_at, so a purpose-category edit no longer restarts the timeout; rows without a stamp fall back to updated_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's PENDING claim 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 done or error frame; an unexpected exception, including a database error while saving the turn, now ends in error "Assistant call failed" (or done with incomplete when 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_QUOTA with 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 unresolvable reason 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
    records driver 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 is docs/specs/reservations.md; tests/unit/test_spec_references.py fails 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 ACTIVE reservation, 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 PENDING reservation follows create's rule for a future window: the window conflict check decides, not whether the device is AVAILABLE right 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 no instance_ref as "nothing was created" and mark it DESTROYED
    without calling the recipe. It now runs a keyed destroy, destroy_instance with
    instance_ref=None and HERD_request_id in the context, and retires the row only when
    that destroy succeeds; a failed or raising keyed destroy leaves the row CREATING,
    acknowledges the event, and logs dynamic_instance_keyed_destroy_failed with the
    request and reservation ids (see docs/TROUBLESHOOTING.md for finding the instance and
    retrying). The same keyed destroy now covers the #896 compensation path. A
    create_instance that reports success without an instance_ref is a failed create
    (log action dynamic_instance_create_missing_ref) instead of an ACTIVE row nothing
    could destroy. The execution consumer now corroborates reservation.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 action dynamic_instance_teardown_contended if that keeps happening), and a
    create that fails after teardown retired its row runs a keyed compensating destroy. A
    create_instance success without an instance_ref now dead-letters on its first
    delivery. The package validator judges create_instance and destroy_instance by the
    consumer's own rule (an explicit "success": true, and a non-empty instance_ref from
    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_instance is now
    called as destroy_instance(instance_ref=None) for an instance whose create never
    reported a handle. Accept instance_ref=None, find the instance by the name
    create_instance derives from HERD_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 sure create_instance always derives that name and returns a
    non-empty instance_ref on success. A recipe that requires a ref leaves such rows
    CREATING with the log action above on every teardown. Watch for the opposite trap too:
    a recipe that passes None into 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-e2e and 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
    endpoint GET /reservations/ gained search, a repeatable status,
    purpose_category (none for unset), and half-open starts_after, starts_before,
    ends_after, and ends_before bounds; every filter applies inside the rows the caller
    may already see, total is the filtered total, all=true stays admin-only, and a bad
    value (including an unknown category or a timestamp without an offset) is a 422. The
    choices are saved in savedFilters.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/v1 facade is unchanged and
    still forwards only skip and limit (#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
    gains search (case-insensitive name substring), owner (mine or all), sort_by,
    and sort_dir, validated as enums (a bad value is a 422), with total counting 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 (ListFilterPanel in
    frontend/src/components/ui/): a labeled Filters region 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).