Connect real Redis integration fixture before issuing commands

This commit is contained in:
gadgethd
2026-10-11 17:30:38 +00:00
parent 647e6a0900
commit 8bfc5ce4a7
2 changed files with 16 additions and 5 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ Specification: `/home/ben/ukmesh-fix-context-20261011/SOL-REVIEW.md`. This is a
| Work | Current evidence |
|---|---|
| UKMesh #122 | Pushed `cbf78a8a6c8d0f11da200eed0bcf9f4161c5dd2f` to `perf/mqtt-ingest-20261011`. Local `npx tsc --noEmit` passed. Full backend `npm test` passed 418/418 on final rerun; 9/9 focused F03/F04/F14/F15 tests passed. [CI run 38154922672](https://github.com/gadgethd/ukmesh/actions/runs/38154922672) succeeded in all four jobs, including PostgreSQL ingestion integration. PR body updated. |
| UKMesh #125 | Perf merge `ebab933`; pushed repair commits `91cc3c2` and `21b1eda80a9062ad3892767443457285d7f2463a`. Final local TypeScript, contract, build, 468/468 backend unit tests and 48/48 focused RAM tests pass. [CI run 38159431225](https://github.com/gadgethd/ukmesh/actions/runs/38159431225) passed F02 real-PG lock/replay and schema migration, then failed an older test harness assertion that counted the pooled query after the batch moved to a transaction client. That assertion now counts the actual transaction batch statement; CI rerun pending. |
| UKMesh #125 | Perf merge `ebab933`; repair commits `91cc3c2`, `21b1eda` and `647e6a0` pushed. Local TypeScript, contract, build, 468/468 backend unit tests and 48/48 focused RAM tests pass. [CI run 38159650807](https://github.com/gadgethd/ukmesh/actions/runs/38159650807) passed the full real-PG integration suite, then found a Redis integration-fixture startup race: its no-offline-queue client pinged before ready. The fixture now explicitly connects and cleans up a failed connection; Redis rerun pending. |
| CoreScope #1 | Local `feat/redis-live-source` commit `e9afb3a` contains F01/F07/F08/F17 repairs. Focused regressions, full `cmd/ingestor` Go suite (150.648s) and full `cmd/server` Go suite (104.999s) pass. CoreScope has not been pushed; credentials are unavailable on this host. |
| Bench | Read-only; no `FINAL-CHAIN-DONE` marker observed yet. No new image or scenario has been run. |
@@ -19,9 +19,9 @@ Specification: `/home/ben/ukmesh-fix-context-20261011/SOL-REVIEW.md`. This is a
| F02 | Implemented; real PG lock/replay regression passes | Separate same-client transaction lock and ledger-derived mutations in `packetBatch.ts`; CI `38159431225` passed the contended-lock/replay test. |
| F03 | Fixed on #122 and merged into #125 | `backend/src/mqtt/observationIdentity.ts`, `client.ts`, `db/packetBatch.ts`; unit and real-PG regression passed on #122 CI. |
| F04 | Fixed on #122 and merged into #125 | `backend/src/mqtt/ingestConfig.ts` rejects N>1 before connect; regression passes. |
| F05 | Partial, awaiting real Redis/PG CI | Delivery-key replay ledger in `ram/liveStore.ts`, stable observation ID and PG ledger; lost-reply and same-ms unit/PG integration regressions added. |
| F05 | Partial, awaiting real Redis CI | Delivery-key replay ledger in `ram/liveStore.ts`, stable observation ID and PG ledger; lost-reply and same-ms unit/PG integration regressions added. PG suite passes, while Redis fixture connection was repaired for rerun. |
| F06 | Partial | Per-entry commit state, retained overlap and stable-ID dedupe in `ram/liveStore.ts`, `writer.ts`, `liveRead.ts`; marker-gap and PEL-hole unit regressions pass. Snapshot/retention integration remains. |
| F07 | Implemented for post-migration UKMesh rows, awaiting real PG CI | #125 migration 058 provides a committed-order ledger under the batch advisory lock. CoreScope PG follower uses `seq > cursor`; Redis-only config is rejected and a missing ledger disables the paired source. `TestF07LedgerCursorUsesCommitOrderRatherThanObservedTime` passes. Pre-ledger history still uses the older time cursor and needs a separate backfill. |
| F07 | Implemented for post-migration UKMesh rows; PG integration passes | #125 migration 058 provides a committed-order ledger under the batch advisory lock. CoreScope PG follower uses `seq > cursor`; Redis-only config is rejected and a missing ledger disables the paired source. `TestF07LedgerCursorUsesCommitOrderRatherThanObservedTime` and the late-observed-commit PG regression pass. Pre-ledger history still uses the older time cursor and needs a separate backfill. |
| F08 | Implemented, full Go suites pass | CoreScope `ingest_buffer.go` tracked completion, `source_batch.go`, both sources, and packet-path `main.go` propagate write errors and hold the cursor. F08 blocked-last-job, admission failure, SQLite failure and observation insert failure tests pass. Real two-source crash integration remains. |
| F09 | Partial, awaiting real Redis CI | One-time atomic cleanup, bounded reconciliation and retained accounting in `ram/liveStore.ts`, `writer.ts`; replay and cleanup unit tests pass. |
| F10 | Implemented, awaiting integration | Supervised startup, NOGROUP repair, periodic bounded foreign PEL reclaim, and stale-PEL/progress readiness in `index.ts`, `ram/writer.ts`, `writerRuntime.ts`; unit regressions pass. |
+13 -2
View File
@@ -20,8 +20,19 @@ const localRedis = redisUrl && ['127.0.0.1', 'localhost'].includes(new URL(redis
async function fixture(t: { after: (callback: () => Promise<void>) => void }): Promise<Redis> {
process.env['MQTT_INGEST_MODE'] = 'ram';
process.env['MQTT_RAM_STREAM_KEY'] = `meshcore:ingest:integration:${process.pid}:${Date.now()}`;
const client = new Redis(redisUrl!, { maxRetriesPerRequest: 1, enableOfflineQueue: false });
await client.ping();
const client = new Redis(redisUrl!, {
lazyConnect: true,
connectTimeout: 5_000,
maxRetriesPerRequest: 1,
enableOfflineQueue: false,
});
try {
await client.connect();
await client.ping();
} catch (error) {
client.disconnect();
throw error;
}
configureRamStore(client);
t.after(async () => {
configureRamStore(null);