Adapt main fixes to DEV ownership of split MQTT intake, private projections, lean Compose, and on-demand charts. Preserve deployed migration identities and standalone owner sessions.
* fix(identity): resume legacy checkpoints below every same-instant observation (#194)
migrateLegacyCheckpoint translated a pre-131 (time, packet_hash,
rx_node_id) cursor by looking up the checkpoint row's own observation id.
Rows at last_time whose observation id sorts lower — and whose hash sorts
higher, so the old page key never read them — were skipped forever.
Reset last_observation_id to CURSOR_FLOOR for the checkpointed instant.
MIN(observation_id) is not sufficient: the page predicate is exclusive
(observation_id > last_observation_id), so a cursor at the minimum skips
the row holding it. The floor re-reads the whole instant and packet_uid
IS NULL makes replay idempotent.
Adds a fail-first PostgreSQL test with hash order inverted against
observation order: the legacy checkpoint names the middle hash, and all
three rows at the instant plus a later row must get a packet_uid.
* test(identity): prove migration 133 enforces the observation key (#194)
Creates a disposable database, re-runs the migration's documented
duplicate pre-check (asserting zero rows), applies the shipped 133 SQL,
then asserts packets_time_observation_id_uidx is unique/valid/ready and
that a duplicate (time, observation_id) INSERT raises 23505 with that
constraint name. NULL observation ids remain outside the key.
* fix(readers): resolve decryptions by packet identity in channel history and RAM (#194)
getChannelMessageHistory joined mesh.packet_decryptions on the exact
observation hash in both its candidate page and its detail query. A
message retained under two observation hashes can carry its decryption on
the older one, so the representative was filtered out or displayed with
the ingest marker. Resolve the newest decryption across the row's UID
siblings (packets_packet_uid_idx), keeping the exact hash as fallback and
as the whole join under PACKET_IDENTITY_READ_AUTHORITY=hash.
The 90-day window rules out a window-wide identity CTE, so the lookup is
a per-row lateral bounded to one decryption. resolvePendingSummaries uses
the same shape: a pending observation inherits the summary of a stored
sibling of its UID instead of requiring its own hash to be decrypted.
Adds sibling-observation DB tests for channel history and RAM summaries;
both fail when the reader is forced onto the exact-hash authority.
* test(backfill): prove dry-run parity and the run lock on real PostgreSQL (#194)
Replaces the FakeClient coverage for two behaviours with the shipped CLI
against a real database:
- a dry run selects and resolves exactly what the following real run
does, while writing no packet_uid and leaving the checkpoint untouched;
- a second process exits with 'packet identity backfill is already
running' before its first BEGIN, and the session-level lock is released
on a normal exit and by PostgreSQL after the holder is SIGKILLed. The
holder is parked in a server-side trigger after it takes the lock, so
the race is deterministic rather than timing-based.
* ci: run the identity backfill suite against TimescaleDB (#194)
backfillIdentity.compressed.test.ts builds a real hypertable with a
compressed chunk and runs the shipped CLI; plain PostgreSQL cannot stand
in for it, and the file skips itself without TEST_BACKFILL_DATABASE_URL.
Add an isolated TimescaleDB job (same 2.25.1-pg16 image pin as Backend)
that runs the suite through the TAP guard, so a skip, a cancellation or
a missing test is a failure. --min-tests=15 pins the current coverage.
* ci: gate the frontend audit on shipped dependencies (#243)
The Frontend job ran npm audit over the whole tree and now fails on
picomatch <=4.0.7 (GHSA-fc5q-39xc-vjpf, ReDoS). 4.0.7 is the newest
published release, so no PR can clear it: npm audit fix only proposes
downgrading vite to 6.2.7.
vite, @vitejs/plugin-react, fdir, tinyglobby and picomatch are all
devDependencies -- build-time only, nothing from that tree ships in the
bundle. Audit the shipped tree as the gate (0 vulnerabilities today) and
keep the full-tree report as a non-blocking step so build-tool advisories
still surface. Backend and scripts/ keep their full-tree gates; both pass
and both trees are runtime code.
* chore(security): allowlist synthetic harness credentials in gitleaks
The repository-wide `gitleaks git --all` sweep fails on three findings, all
introduced by commits that are only reachable from ukmesh-dev:
scripts/full-dev/qualification/test_read_pairs.py:296 'owned-synthetic-1x'
scripts/test-lean-runtime.py:25 'owned-fixture-...'
scripts/full-dev/test_memory_policy.py:16 'owned-fixture-...'
They are placeholders the harness writes when it stands up a throwaway
Compose stack -- self-describing fixtures, every service created by the test
and torn down after it. Listed as exact values (not paths) so the allowance
covers the introducing commits on any branch without touching that branch.
Verified with gitleaks 8.30.0 and the same invocation CI uses:
972 commits scanned, no leaks found (previously 3).