Commit Graph
66 Commits
Author SHA1 Message Date
hermes-gadget ec7fdfd452 ci: unblock the empty-volume smoke stack and its post-move browser fixtures (#220)
* ci: create the owner-auth database in the smoke stack

The backend derives its owner connection from DATABASE_URL with the database
name swapped for meshcore_owner_auth, and dies at startup when that database is
absent. Production creates it out of band (newuser.sh, restore-drill.sh); a
fresh CI volume never did, so 'Build every application image and smoke an
empty-volume stack' failed with 'database meshcore_owner_auth does not exist'.

Mirror production: an init-hook script creates the database and applies the
shipped owner-auth.sql to it. The SQL is mounted outside initdb so it is not
applied to the main database as well.

* test(tagger): build the fixture in the post-move ops namespace

The suite creates its own database and then runs the worker's real poll SQL,
which reads ops.public_visibility_state, ops.packet_visibility_materialization_state,
ops.privacy_rematerialization_queue and ops.tagger_retry since the P1 moves.
The fixture still created those tables in public, so all eight tests failed with
'relation "ops.packet_visibility_materialization_state" does not exist'.

This was masked until now: the smoke stack never got past backend startup, so
this step never ran. packets and message_tags stay unqualified - the worker
resolves those through the connection search_path, as the deployed P1
search_path does.

Verified against a disposable TimescaleDB with the same invocation CI uses:
8 tests, OK.

* ci: read the smoke-stack assertions from the post-move schemas

The empty-volume smoke readback still queried nodes, packets, packet_paths and
packet_hourly_stats by their pre-move public names. 116/123/124/125 moved them to
core and mesh, so the psql step failed with 'relation "packet_hourly_stats" does
not exist' once the stack got far enough to run it.

Use the canonical names; the public spellings are compatibility views at best and
for two of these relations no longer exist.

* test(e2e): warm the MapLibre module graph during setup

maplibre-gl is excluded from optimizeDeps because Vite's pre-bundling
rewrites the worker URL and kills it, so the first cold request pays for
transforming the whole module graph. On the CI runner that is 41-47s for
maplibre-gl-worker.mjs (measured from the retained traces on run
41887037964), which is most of the 60s map-health budget in the map specs:
the map starts ~57s after the document load and the assertion expires just
before the basemap turns healthy.

Playwright starts webServer before globalSetup, so warm the two heaviest
dev-server modules there. The cost moves into setup; assertions stay tight.
Failures are logged and ignored - this is never a gate.

Fixes #190

* test(e2e): log module warm-up response shape

The CI warm-up reported 200/116ms, but the browser still waited 47.8s for the
worker module and the map stayed loading. Log Content-Length and Content-Type
for each warm-up response so we can distinguish the transformed worker from a
fast SPA fallback before changing the fix.
2026-11-05 21:57:57 +00:00
hermes-gadget 79190f8382 fix(ci): ship the external-consumer SQL checker with the worker image (#196)
The Workers and Compose job runs the worker suite inside the built image
(`python -m unittest discover -s /app/tests`). The relation-qualification
test resolved the checker as `<repo>/scripts/check_external_consumer_sql.py`
via `Path(__file__).parents[2]`, which inside the container is `/scripts`,
and the image only carries `viewshed-worker/`, so the job died with
`ModuleNotFoundError: check_external_consumer_sql` before any test ran.

The image builds with `context: viewshed-worker`, so a repo-level `scripts/`
file cannot be COPYed in without widening the build context (and the release
workflow). Move the implementation next to the worker (`viewshed-worker/
check_external_consumer_sql.py`), leave a thin shim at the old path so
`backend`'s `test:external-consumers:sql` keeps working from a checkout, and
add the module to the Dockerfile COPY.

The test now resolves the module from the worker root, and a new in-image
test asserts the checker imports from that root, so dropping it from the
image fails with a named test instead of a bare import error.
2026-11-05 16:44:29 +00:00
hermes-gadget 48d37867c1 p2: exclude non-wire legacy rows from coverage gate 2026-11-04 17:59:26 +00:00
hermes-gadget 384226c16b p2: harden identity backfill and reader statistics 2026-11-03 16:01:26 +00:00
hermes-gadget a469bcbffa p2: add background identity coverage check 2026-11-03 15:21:39 +00:00
hermes-gadget 8099a48aa0 p2: complete packet identity backfill and alias census 2026-11-03 13:50:57 +00:00
hermes-gadget 813289a19c test: add external consumer schema regression checks 2026-11-03 13:15:21 +00:00
hermes-gadget f3d94fb59b p1: qualify analytics relation in network unification script 2026-11-03 13:03:33 +00:00
hermes-gadget 82e73b48db p1: qualify operational scripts after core and mesh moves 2026-11-03 13:03:15 +00:00
hermes-gadget 477c2546c1 p1: qualify remaining worker nodes references 2026-11-03 12:44:28 +00:00
hermes-gadget 7ab05a0ae7 p1: qualify network unification runs for ops 2026-11-03 00:21:02 +00:00
hermes-gadget b7897f7cdc p1: move unreferenced ops simulation tables 2026-11-02 23:41:31 +00:00
hermes-gadget cd27866d39 p1: rehearse 071/072 and add reader role stubs 2026-11-02 11:31:24 +00:00
hermes-gadget 3c421c8217 p1: adopt approved 30G G1a floor 2026-11-02 02:17:13 +00:00
hermes-gadget 2f6cdee2b7 p1: add idempotent backend role bootstrap proposal 2026-11-02 00:22:58 +00:00
hermes-gadget 2e168550b6 p0: relax G1a floor to 40G after verified reclaim 2026-11-02 00:08:40 +00:00
hermes-gadget f5b9122a25 p0: honor P0-1 waiver and fail closed on phase-gate evidence 2026-11-02 00:04:06 +00:00
hermes-gadget 826cf09cdc p0: add consolidation gate harness scaffold 2026-11-01 23:31:58 +00:00
gadgethd 449bd47879 Complete signed releases for all UKMesh application workers 2026-11-01 21:53:25 +00:00
gadgethd 99c258c1d5 Preserve runtime permissions in release compatibility checks 2026-11-01 20:56:08 +00:00
gadgethd a8b964cbba Reconcile deployed broker ownership and publish the audit deployment record 2026-11-01 14:41:53 +00:00
dependabot[bot] f737a212f9 chore(deps): bump the scripts-dependencies group across 1 directory with 2 updates (#118)
Bumps the scripts-dependencies group with 2 updates in the /scripts directory: [pg](https://github.com/brianc/node-postgres/tree/HEAD/packages/pg) and [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `pg` from 8.23.0 to 8.23.1
- [Changelog](https://github.com/brianc/node-postgres/blob/master/CHANGELOG.md)
- [Commits](https://github.com/brianc/node-postgres/commits/pg@8.23.1/packages/pg)

Updates `@types/node` from 26.6.3 to 26.6.5
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.6.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: scripts-dependencies
- dependency-name: pg
  dependency-version: 8.23.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: scripts-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 01:22:41 +00:00
gadgethd 078b417c49 Merge release/security-20261025; reconcile 61 conflicts and 19 findings
Port security remediation onto the newer main/VPS behavior. Preserve applied
migration names using exact checksum proof; retain durable ingest, egress,
worker recovery, telemetry normalization and newer main operational fixes.

Ledger: docs/reviews/20261025-merge-ledger.md
Validation: backend tsc/build; 708 tests, 0 fail, 3 DB skips; frontend
tsc/build; 166 tests, 0 fail, 10 opt-in browser skips; contract check;
confirmed-grant onboarding and isolated authenticated receiver fixtures.

Resolved paths:
- .env.example
- .github/workflows/ci.yml
- .gitignore
- .gitleaks.toml
- backend/package-lock.json
- backend/src/api/contracts.ts
- backend/src/api/routes.ts
- backend/src/api/routes/auditwave.integration.test.ts
- backend/src/api/routes/auditwave.performance.test.ts
- backend/src/api/routes/exports.test.ts
- backend/src/api/routes/misc.test.ts
- backend/src/api/routes/owner.ts
- backend/src/api/routes/ownerPacketSharing.test.ts
- backend/src/api/routes/regions.test.ts
- backend/src/api/routes/regions.ts
- backend/src/db/ownerAuth.ts
- backend/src/db/packetBatch.integration.test.ts
- backend/src/index.ts
- backend/src/metrics.ts
- backend/src/mqtt/client.ts
- backend/src/mqtt/envelopeSafety.test.ts
- backend/src/mqtt/envelopeSafety.ts
- backend/src/owner/ownerAccess.ts
- backend/src/owner/ownerLastHopPrewarm.test.ts
- backend/src/owner/ownerLastHopPrewarm.ts
- backend/src/owner/ownerRepository.ts
- backend/src/owner/packetShareForwarder.test.ts
- backend/src/owner/packetShareForwarder.ts
- backend/src/owner/packetShareRepository.integration.test.ts
- backend/src/owner/packetShareRepository.ts
- backend/src/owner/publicFeedForwarder.test.ts
- backend/src/owner/publicFeedForwarder.ts
- backend/src/owner/publicFeedRepository.ts
- backend/src/path-learning/rebuild.ts
- backend/src/ram/liveRead.ts
- backend/src/repositories/nodes.ts
- backend/src/spam/cluster.test.ts
- backend/src/spam/cluster.ts
- backend/src/spam/config.ts
- backend/src/spam/repository.ts
- backend/src/tools/rebuildRegionParticipation.ts
- backend/src/workers/alert-receiver.ts
- backend/src/workers/synthetic-monitor.ts
- backend/src/ws/server.ts
- backup-receipts/latest.json
- backup-receipts/latest.json.sig
- docker-compose.yml
- docs/openapi.yaml
- docs/operations.md
- docs/spam-detection.md
- frontend/playwright.config.ts
- frontend/src/components/Map/RegionsMap.tsx
- frontend/src/components/Map/regionOverlay.test.ts
- frontend/src/components/Map/regionOverlay.ts
- frontend/src/pages/RegionsPage.tsx
- frontend/src/pages/TopologyPage.browser.test.ts
- frontend/src/pages/regions-page.css
- frontend/src/pages/regionsModel.ts
- frontend/test/e2e/dashboard.spec.ts
- tagger-worker/Dockerfile
- vacuum-compressed-chunks.sh
2026-10-25 04:42:05 +00:00
hermes-gadget 9a572524a8 Merge pull request #165 from gadgethd/burn/ukmesh-onboard-20261023
fix(onboarding): surface default-topic broker denials and document linking
2026-10-25 02:16:07 +00:00
hermes-gadget 7ef12767d1 fix(onboarding): surface default MQTT topic denials and document linking 2026-10-25 01:52:43 +00:00
hermes-gadget 418ba258e8 feat: report owner prewarm progress and guide Compose adoption repair 2026-10-25 01:50:28 +00:00
hermes-gadget 54dbc68bb2 Audit PostgreSQL shared memory and enforce explicit 1 GiB sizing 2026-10-25 01:24:00 +00:00
gadgethd 0b6a352087 fix(release): separate trust anchors and key the export cache to visibility
Three unrelated trust-anchor defects:

- exports: /api/v1/exports/nodes.* set a 15-minute public cache with no
  visibility key. Add a generation-derived weak ETag, Vary, X-Visibility-
  Generation, optional v= with 412 + no-store on mismatch, 60s max-age, and a
  post-query generation re-read that downgrades mid-flight redactions. A
  generation read failure is 503 + no-store instead of a cached 200.
- release: keyless signing moved out of the image matrix into a sign job
  restricted to refs/tags/v*, behind the release-signing environment, with an
  in-script ref check as defence in depth. Branch dispatches still build.
- restore: the drill no longer copies the verify key into the receipt
  directory. Both sides require an out-of-band sha256 pin, reject a key inside
  the receipts tree (including symlinks), and fail closed on mismatch. Compose
  mounts the key from its own directory and passes the pin.

Docs updated for the new key layout and pin.

Audit: backend/src/api/routes/exports.ts:nodes-export:public-cache-not-keyed-to-visibility-generation
       supply-chain/release-workflow:keyless-signing-identity-not-bound-to-release-ref
       ukmesh/restore-receipt-verify-key-published-with-receipt
2026-10-23 16:41:26 +00:00
gadgethd 69d36a513b fix(owner): make verified grants the only owner authority
Remove the shadow-mode fallback that rebuilt owner authority from
OWNER_MQTT_USERNAME_MAP and broker ACL write stanzas whenever the verified
grant list was empty. Broker write scope is not ownership, and the fallback
survived revocation.

- empty verified list now returns [] in every mode
- sessions carry the credential generation and are rejected when it changes
- credential-generation read failures throw instead of returning 0, which
  compared equal to every pre-rotation session
- newuser.sh no longer writes an operator-config grant from a broker-log key;
  it requires --confirm-owner-grant NODE_ID

Audit: backend/src/owner/ownerAccess.ts:owner-credential-generation-revocation
       ukmesh-owner-access:shadow-fallback-regrants-revoked-acl-scope
       ukmesh/newuser-broker-log-node-key-promoted-to-operator-config-grant
2026-10-23 16:41:12 +00:00
gadgethd d780729c5b fix(surface): project readyz, bound WS scope errors, authenticate alerts
- /readyz returns only database and MQTT state; owner-ACL generations,
  reconciliation errors and workload identity stay on the local-only surface
- an invalid network scope on a public WS upgrade returns 400 instead of
  throwing out of verifyClient
- POST /alerts requires a bearer token (fail-closed) and both in-repo senders
  send it; Alertmanager reads its token from a provisioned file

Audit: backend/src/index.ts:GET-readyz.publishes-owner-authorization-and-analysis-internals
       ws.verifyclient.invalid-network-scope-uncaught-exception
       backend/src/workers/alert-receiver.ts:POST-alerts:unauthenticated-alert-ingest-to-operator-webhook
2026-10-23 16:10:02 +00:00
hermes-gadget 5312b342e9 ci: retry transient image and apt failures without replaying test gates 2026-10-23 08:54:10 +01:00
hermes-gadget 0a8cb97e4d Merge pull request #143 from gadgethd/burn/privacy-fence-20261022
Fix empty prefix cascade fences and add verified privacy convergence
2026-10-22 22:12:35 +01:00
hermes-gadget d6a2759bcd docs(rescue): prove deploy-tree features already landed on main 2026-10-22 15:30:06 +01:00
hermes-gadget 97a007af10 fix(privacy): ignore empty prefix cascades and add verified convergence 2026-10-22 14:24:23 +01:00
Codex c02aa32fd9 fix(ram): verify F09/F14 headroom and F15/F16 runtime recovery
Bound encoded quarantine and Redis recovery memory, verify actual principals, loaded metrics, held PostgreSQL SIGTERM and retention/drain rollback. Close F01 enrichment waits and preserve F13 decrypted/JSON summary contracts. All 479 backend tests, typecheck/build, 11 ingest integration and strict 5 operational gates pass.
2026-10-11 22:56:17 +00:00
b40793f36e Fix analysis state, worker observability, feed layout and maintenance (re-land onto main) (#114)
* Fix analysis state, worker observability, feed layout and maintenance (#113)

* fix(analysis): restore tested retired workload policy

* fix(owner): prewarm last-hop cache with bounded progress reporting

* fix(metrics): use real link worker heartbeat for queue alerts

* fix(feed): measure virtual rows and preserve scroll anchors

* fix(ops): reject Compose metadata drift before replacement

* fix(maintenance): archive inactive nodes across roles and bridge states

* docs(review): record validation and heartbeat audit findings

* fix(maintenance): retain private identities during stale cleanup

* fix(ops): consume Compose service output before adoption checks

* test(owner): cover prewarm scheduling recovery and shutdown

* test(e2e): isolate server ports and Vite dependency caches

* test(feed): cover empty filters and arrivals at the top

* test(map): budget two cold bootstraps in mode persistence check

* docs(review): record continuation regressions and final verification

* fix(alerts): match queue heartbeats to their scrape reporter

* test(feed): preserve packet anchors across scroll-mode changes

* test(owner): verify incremental prewarm cache refreshes

* fix(maintenance): preserve packet privacy fence during public cleanup

* fix(maintenance): recheck inactive sightings before archive and delete

* fix(owner): serve fresh cache hits during background prewarm

* test(map): give each viewport its own startup budget

* test(map): load valid terrain and coverage tiles in local fixtures

* fix(metrics): export unknown heartbeat when Redis initialization fails

* test(path): control worker-pool deadlines independently of thread startup

* test(e2e): await owner and map readiness before state assertions

* test(feed): check fractional viewport and spacer invariants

* docs(review): record green expanded verification checkpoint

* fix(maintenance): acquire visibility before node locks and skip busy rows

* test(maintenance): retain concurrent RF-only activity in native fixtures

* fix(owner): replace regrouped last-hop buckets during refresh

* test(owner): verify warm regrouping with actual last-hop SQL

* test(maintenance): retain concurrently committed node consent

* test(maintenance): avoid a waiting consent-trigger deadlock

* test(feed): verify responsive anchoring in Firefox and WebKit

* docs(review): reconcile completed checks and remote CI evidence

* docs(review): correct checkpoint wording

* test(maintenance): verify privacy fences on native PostgreSQL

* test(health): verify link heartbeat publisher lifecycle

* docs(review): record stop-signal handoff and remaining verification

---------

Co-authored-by: gadgethd <111318106+gadgethd@users.noreply.github.com>

* fix(feed): preserve scroll anchors across scroll-mode flips

React 19.3 fires the window scroll listener before React commits its new
row range, so updateViewport could overwrite the last known content offset
with the new-mode artifact (0) before the anchor-preserving layout effect
ran — dropping the feed to the top on a responsive resize.

Detect the scroll-mode flip (internal container <-> document scrolling) in
updateViewport and transfer the last known content offset into the new mode
before the anchor effect evaluates.

Verified: feed-virtualizer e2e (both viewports) and the full public-desktop
suite under react 19.2.8 and 19.3.0.

* fix(#553): sync replace-container test harness

* test(ops): sync replace-container harness with adoption + infra flows (#553)

Union of both branch evolutions: Compose adoption drills (check-compose-adoption
staging, MOCK_ADOPTION_* modes, adoption/long-service/overlay cases) plus the
infra-compose staging and timescaledb resolver drill assertions. Fixes the
Workers-and-Compose gate failing on this PR.

Verified locally: 16/16 drills pass.

---------

Co-authored-by: gadgethd <111318106+gadgethd@users.noreply.github.com>
Co-authored-by: hermes-gadget <284726080+hermes-gadget@users.noreply.github.com>
2026-10-03 17:14:34 +01:00
dependabot[bot] 89883b7bfb chore(deps-dev): bump @types/node (#111)
Bumps the scripts-dependencies group in /scripts with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 26.6.2 to 26.6.3
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.6.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: scripts-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-03 15:35:25 +01:00
hermes-gadgetandgadgethd 029cc6ac33 fix(ops): ukmesh deploy/alert/stats hardening (#47 #54 #55 #57) (#104)
* test(viewshed): inject post-commit side-effect failures

* fix(deploy): rollback on unhealthy or mismatched sites

* fix(alerts): persist forwarding queue across restarts

* perf(stats): add per-network aggregate cutover controls

* docs: add Mission C5d handoff

* test(viewshed): correct side-effect marker cursor row sets

* fix(alerts): keep archive-only receiver live

---------

Co-authored-by: gadgethd <111318106+gadgethd@users.noreply.github.com>
2026-10-01 00:24:31 +01:00
b285cdb288 fix(security,ops): close ukmesh auth/users findings (#50 #51 #52 #53 #58) (#103)
* docs: add C5a mission handoff

* security: classify channel keys and baseline reviewed findings

* security: revalidate MQTT auth and revoke owner sessions

* test(ops): cover concurrent newuser grant updates

* fix(ops): preserve executable newuser test

* fix(ops): cover partial newuser rollback failures

* fix(owner): preserve password whitespace during login

* docs: add C5c mission handoff

* test(cache): drop stale authCache policy entry (cache removed by auth revalidation)

* docs: keep HANDOFF on current mission

---------

Co-authored-by: gadgethd <111318106+gadgethd@users.noreply.github.com>
Co-authored-by: hermes-gadget <284726080+hermes-gadget@users.noreply.github.com>
2026-10-01 00:09:44 +01:00
hermes-gadgetandgadgethd f445a24467 fix: close High findings #42 + #46 — public status DTO, split-infra resolver (#99)
* fix(api): allowlist public node status fields

* fix(ops): resolve split infrastructure containers exactly

* docs: add C5a mission handoff

---------

Co-authored-by: gadgethd <111318106+gadgethd@users.noreply.github.com>
2026-09-30 23:19:31 +01:00
hermes-gadgetandgadgethd 27f1822e75 ops: owner-baseline auto-rebaseline (check tool + timer + reviewed refresh script) (#97)
* feat(ops): auto-rebaseline owner ACL inventory

* docs(ops): handoff owner baseline autorebaseline

* ops: add reviewed owner-authorization baseline refresh script

scripts/refresh-owner-baseline.sh regenerates the owner inventory baseline
with the running backend image, validates it against the live inventory
(fail-closed), backs up .env before repointing, and can recreate the backend.
It refuses to overwrite an existing baseline and keeps the previous file for
rollback. Adds the matching operations runbook section.

* test(ops): cover refresh baseline validation output

---------

Co-authored-by: gadgethd <111318106+gadgethd@users.noreply.github.com>
2026-09-30 23:00:21 +01:00
gadgethd 71a54f2a2d fix(privacy): rematerialize packet privacy asynchronously (#107) 2026-09-30 23:00:07 +01:00
dependabot[bot] b3dfed014c chore(deps-dev): bump the scripts-dependencies group across 1 directory with 2 updates (#82)
Bumps the scripts-dependencies group with 2 updates in the /scripts directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [tsx](https://github.com/privatenumber/tsx).


Updates `@types/node` from 26.2.0 to 26.6.2
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `tsx` from 4.23.12 to 4.23.15
- [Release notes](https://github.com/privatenumber/tsx/releases)
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
- [Commits](https://github.com/privatenumber/tsx/compare/v4.23.12...v4.23.15)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: scripts-dependencies
- dependency-name: tsx
  dependency-version: 4.23.13
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: scripts-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-30 22:58:02 +01:00
hermes-gadgetandgadgethd 2c2b9d9de4 fix(owner): make grant reconciliation rollout-safe (#79)
Co-authored-by: gadgethd <111318106+gadgethd@users.noreply.github.com>
2026-08-31 16:18:05 +01:00
dependabot[bot] db291e72eb chore(deps-dev): bump @types/pg (#75)
Bumps the scripts-dependencies group in /scripts with 1 update: [@types/pg](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/pg).


Updates `@types/pg` from 8.21.0 to 8.23.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/pg)

---
updated-dependencies:
- dependency-name: "@types/pg"
  dependency-version: 8.23.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: scripts-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-29 11:22:18 +01:00
gadgethd d11336da64 fix(backup): restore split-stack recovery workflow 2026-08-27 23:48:01 +00:00
gadgethd ece8c70aa6 fix(map): fetch DEM z0-4 too (MapLibre 6 pyramid starts at lowest available zoom) 2026-08-27 23:48:01 +00:00
gadgethd b3473b5d11 chore(map): reproducible terrain tile fetch script; ignore terrain-tiles dir 2026-08-27 23:47:37 +00:00
dependabot[bot] 618d42fd3e chore(deps): bump the scripts-dependencies group (#65)
Bumps the scripts-dependencies group in /scripts with 2 updates: [pg](https://github.com/brianc/node-postgres/tree/HEAD/packages/pg) and [tsx](https://github.com/privatenumber/tsx).


Updates `pg` from 8.22.0 to 8.23.0
- [Changelog](https://github.com/brianc/node-postgres/blob/master/CHANGELOG.md)
- [Commits](https://github.com/brianc/node-postgres/commits/pg@8.23.0/packages/pg)

Updates `tsx` from 4.23.11 to 4.23.12
- [Release notes](https://github.com/privatenumber/tsx/releases)
- [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs)
- [Commits](https://github.com/privatenumber/tsx/compare/v4.23.11...v4.23.12)

---
updated-dependencies:
- dependency-name: pg
  dependency-version: 8.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: scripts-dependencies
- dependency-name: tsx
  dependency-version: 4.23.12
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: scripts-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-27 09:41:33 +01:00
hermes-gadgetandhermes-gadget e069f6b102 fix: close Wave 3 medium findings (owner auth, deploy, newuser, alerts, gitleaks, viewshed) (#64)
* fix(owner): Wave 3 mediums — password handling, deploy rollback, newuser races, session revocation

- BUG-017: stop trimming MQTT passwords (frontend + backend). A valid
  broker password may begin/end with whitespace; trimming made it
  permanently unauthenticatable. Username trimming unchanged.
- BUG-013: deploy-website.sh now set -Eeuo pipefail with an EXIT rollback
  trap armed only after the pin mutates; container-down and bundle-mismatch
  paths fail loudly and restore the old pin + verify the restored service.
- BUG-012: newuser.sh installs an EXIT trap (ERR does not fire on explicit
  exit 1 from die()) so every post-mutation failure rolls back; rollback is
  idempotent and a no-op before any mutation flag. Disarm points clear EXIT.
- BUG-011: newuser.sh re-reads + re-validates OWNER_MQTT_USERNAME_MAP under
  the re-acquired lock after the long unlocked discovery window, then merges
  the new grant into the current map — concurrent provisioning runs can no
  longer be overwritten by a stale snapshot.
- BUG-010: owner sessions are now v3 cookies carrying a credential
  generation (Redis-backed). When the broker rejects a previously-valid
  password (revocation detected), the generation bumps and every older
  session is rejected on the next request. TTL shortened 30d -> 7d.

Verified: tsc clean, 310/310 backend tests pass, bash -n on both scripts.

* fix(alert-receiver): durable alert delivery with bounded retry + dead-letter (BUG-014)

Forwarding was fire-and-forget: failures logged asynchronously after HTTP 202,
/healthz stayed green, and alerts could be archived to the local JSONL while
operators never saw them. Now:
- Every receipt is enqueued for delivery with bounded exponential backoff
  (ALERT_FORWARD_MAX_ATTEMPTS=5, base 1s, cap 60s) and dead-lettered to
  receipts.jsonl.dead after exhausting attempts.
- /healthz keeps returning 200 (compose wget healthcheck must not restart
  the container) but the body reports degraded status + detail; new /readyz
  returns 503 when ALERT_FORWARD_URL is unset (archive-only), no successful
  forward since startup, or alerts stuck undelivered >5min.

Verified: tsc clean, 310/310 tests pass.

* fix(ci): classify reviewed public channel keys + fixtures in gitleaks (BUG-009)

The nightly full-history secret scan flagged 42 findings spanning the
documented community channel keys (VALIDATED_CHANNELS — intentionally
public, each verified to decrypt real UK Mesh group text), fake test
fixtures, and a deployed-commit SHA in the website live manifests. That
made a genuine credential easy to dismiss among expected hits.

- Rule-scoped allowlists with exact fingerprints (regexTarget: secret,
  anchored full-value matches) for the Public channel key, test fixtures
  (0123456789... / abcdef0123...), and the manifest commit SHA.
- Structure-exact line allowlist for channelRegistry.ts VALIDATED_CHANNELS.
- Verified locally with gitleaks 8.24.3 full-history scan: 42 -> 0 findings.

* fix(viewshed): side-effect completion markers prevent skipped link jobs (BUG-006)

store_coverage() commits on an autocommit connection, then the worker queues
physical-link jobs and publishes Redis notifications. A Redis failure after
the DB commit NACKed the job; on retry already_calculated() saw the coverage
row and returned early — link work and frontend notifications were skipped
forever.

- Record a Redis completion marker (viewshed:side-effects:<node>) only after
  EVERY side effect succeeds.
- On the already_calculated early return, a missing marker triggers an
  idempotent replay: link jobs are re-enqueued from the stored node position
  (admission is idempotent) and coverage_update/node_upsert notifications are
  re-published from the stored coverage row.
- Redis read failures are treated as incomplete (replay attempt re-raises and
  NACKs rather than silently skipping).
- Added tests/test_side_effect_markers.py (5 tests) with a conftest that stubs
  osgeo/psycopg2 so pure-logic worker tests run without GDAL (CI keeps real
  GDAL via setdefault). Verified: 5/5 new tests pass; full suite 34 passed,
  2 GDAL-required terrain tests fail only in stub env (pass in CI image).

---------

Co-authored-by: hermes-gadget <hermes-gadget@users.noreply.github.com>
2026-08-11 22:50:16 +01:00