Skip to content

/info reports dimension: 0 on a cold server (before first upsert) — Upstash always reports the real dimension #23

Description

@Coriou

Deep audit 2026-09-06, finding F12 (parity, low). Survived refutation.

Mechanism. let detectedDimension = config.dimension ?? 0 (src/routes/info.ts:19); the cold-cache fallback loop (lines 44-53) only probes namespaces with vectorCount > 0. A fresh boot with no upserts (or after reset?all, which clears dimensionMap) returns { dimension: 0, denseIndex: { dimension: 0, ... } }. Both dimension and denseIndex.dimension report 0; config.embeddingDimension is not consulted as a fallback even when the embedding provider is enabled.

Impact. SDK type InfoResult.dimension is required, so user code reading info().dimension (e.g. sizing query vectors) gets an invalid 0. The installed SDK does not consume it functionally — hence low severity.

Candidate mitigations (to assess).

  • Return null/omit the field until dimension is known (SDK type friction to check).
  • Fall back to UPVECTOR_EMBEDDING_DIMENSION when the embedding provider is enabled.
  • Document the 0-valued cold state in the README parity table.

Triage guidance: docs/RUNBOOK.md. Audit procedure: docs/workflows/deep-audit.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    deep-auditFindings from scheduled deep audits

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions