Code map

Code map

Where each part of Nova lives in the repository, and the design documents behind it.

The repository holds the node, the Gateway, the CLI, both SDKs, the Kubernetes controller, and the TLA+ specifications. The tables below say what each directory and package owns. After them come the rules that keep the layers apart, and the design documents behind each mechanism. Every path named here exists in the tree.

The repository

DirectoryWhat it holds
cmd/The binaries: novad, novagateway, nova and novactl, novabench, and s3throttle
cli/The nova command line, built on the public client and the admin plane. nova start runs a node in the same process, and cli/flags declares every novad flag and its help.
client/The Go SDK
sdk/ts/The TypeScript SDK: packages/nova, packages/transport-grpc, packages/transport-http, and the parity suite
proto/nova/v1/The wire and record schemas: dataplane, queue, adminplane, auth, coord, metadata, oxiacoordinator
internal/Everything else in the server, by package below
operator/The Kubernetes controller, its own Go module
tlaplus/The TLA+ specifications and their model-checking configurations
novatest/The integration harness, the chaos suite, and the linearizability checker
deploy/The Docker images and compose stacks, the Helm chart, and the Pulumi reference deployment
dashboards/The Grafana dashboards and the generator that builds them from dashboards/metrics/
web/admin/The admin UI's single-page app
docs/The decision log, design documents, and ADRs
wiki/This site

Binaries

PathBinary
cmd/novadThe node. internal/daemon assembles it.
cmd/novagatewayThe Gateway
cmd/novactlThe CLI, built from cli in this tree
cmd/novaThe same CLI for go install: a module of its own, pinned to an older release of the root module
cmd/novabenchThe load generator
cmd/s3throttleAn S3 proxy that throttles requests, for tests
operator/cmd/nova-operatorThe Kubernetes controller

Packages

Domain and serving

PackageWhat it owns
internal/streamThe domain model: IDs, sequence numbers, epochs, star IDs, the stream descriptor and its policies. It imports nothing internal.
internal/stream/wireThe one mapping between stream configuration and its proto form
internal/starA node's serving core: producer lifecycle, reads, subscriptions, stream and bucket management, vacant streams
internal/star/writerLeaderships: open, admission, idle expiry, departure, limbo, and drain
internal/star/readerThe read path, from the leader's memory to object storage, and read plans
internal/coord/rebalanceMoving leaderships between nodes: off a saturated node, onto new capacity, and off a node far above the fleet's mean load

Write path and storage format

PackageWhat it owns
internal/storage/durabilityThe write core of each class: the pool, the flusher, the flight index, the live indexer
internal/storage/walThe WAL: the mint, publishing, the backlog budget, the roll, the open gate, the release flush
internal/storage/logletSlot mechanics over a bucket set: the sequencer, the fence, the walk, trim, the garbage probe
internal/storage/indexerAbsorb and ledger recovery
internal/storage/bundle, internal/storage/codecThe object format and its encodings
internal/objectkeyEvery object key
internal/storage/objectstoreThe object-store interface, with s3, mem, filesystem, fanout (the Express bucket set), and fetchcache
internal/storage/objectcacheThe object-cache ring

Metadata and coordination

PackageWhat it owns
internal/kvThe key-value interface, with the mem and oxia backends and the conformance suite in kvtest
internal/kv/oxia/embeddedOxia inside the nodes: founding, joining, the tender, splits, and drains; heat holds the split arithmetic and ports the port layout
internal/kv/oxia/oxiaadminThe oxia admin calls Nova makes
internal/metadataEvery durable record and its CAS rules; keys.go owns the key schema
internal/coordThe sessions keyspace: liveness, stats, leases, placement, rings, claims, and the decommission protocol

Background work and queues

PackageWhat it owns
internal/auditorThe auditor: its 14 duties, the due-queue dispatch, budgets, and the pin cap
internal/storage/rewriteDenorm and the other rewrites: the only code that moves record bytes between objects
internal/storage/reclaimThe probe, the reap, orphan judgment, and star reclaim
internal/queueThe queue dispatcher: seats, windows, claims, retries, dead letters

Transport and edge

PackageWhat it owns
internal/transport/grpc/dataplaneDataPlaneService: sessions, appends, reads, read plans, redirects
internal/transport/grpc/queue, admin, exchange, oxiacoordinatorThe queue, admin, auth, and oxia coordinator services
internal/transport/grpc/clusterThe cluster client the Go SDK and the Gateway use to reach a stream's leader
internal/transport/http/dataplaneThe HTTP API, shared by a node's data bridge and the Gateway
internal/transport/ingress, listener, surfaceThe ingress byte budget, connection caps, and the rule that an address's form picks gRPC or HTTP
internal/gatewayThe Gateway's edge: verification, host names, limits, CORS, and plan-driven serving
internal/authWho a caller is, API keys, signing keys, and the nova: scope grammar

Assembly and operations

PackageWhat it owns
internal/daemonThe assembled node: configuration, backends, serving, drain, the auditor, close
internal/adminuiThe admin UI's server and its read-only JSON bridge
internal/observabilityMetrics and logging setup; logtest records log lines in tests
internal/failpointFault hooks for the integration harness, compiled out of production builds
operator/internal/constellationThe controller: planning, the removal ladder, embedded oxia, backups

Layering rules

  • internal/stream imports nothing internal. Nothing imports upward.
  • kv.Store is held only by metadata and coord. Every other package uses those wrappers.
  • internal/storage/loglet never touches the metadata store; its callers record what it computes.
  • The public surface is client, cli, and the TypeScript SDK. Everything else is under internal/.
  • Interfaces are defined in the package that uses them, sized to what that package calls.

Design documents

The decision log, docs/design/000-decisions.md, is the authority over everything below. CONTEXT.md at the root is the glossary of record.

Overview

  • README.md, CONTEXT.md
  • docs/design/001-modules.md, docs/design/002-testing.md
  • docs/design/011-virtual-log.md

Write path and backpressure

  • docs/wal.md
  • docs/design/009-chain-commit.md, docs/design/010-write-path-economics.md, docs/design/011-virtual-log.md
  • docs/design/050-ingress-budget.md, docs/design/052-s3-request-budget.md
  • docs/adr/0031-one-flusher-owns-order.md
  • internal/storage/wal/, internal/storage/loglet/, internal/storage/durability/

Epochs and ledger recovery

  • docs/design/011-virtual-log.md, docs/design/028-fence.md
  • docs/adr/0006-recovery-procedure.md, docs/adr/0025-clean-release-gate.md, docs/adr/0030-alive-defers-and-the-last-writer.md, docs/adr/0032-same-star-departures-pay-coverage.md
  • internal/storage/loglet/fence.go, internal/storage/indexer/recovery.go, internal/storage/wal/gate.go
  • tlaplus/Ledger.tla, tlaplus/StreamLeadership.tla

Storage layout

  • docs/design/013-ref-spans.md, docs/design/025-stored-record.md
  • docs/adr/0010-object-key-scheme.md, docs/adr/0015-artifact-format-versioning.md, docs/adr/0029-settled-catalog.md
  • internal/objectkey/objectkey.go, internal/storage/codec/, internal/storage/bundle/

Stream objects and denorm

  • docs/design/012-footer-reclamation.md, docs/design/013-ref-spans.md, docs/design/016-denorm-policy.md, docs/design/017-settled-catalog-plan.md, docs/design/018-settle-at-density.md
  • docs/adr/0024-settle-superseded-epochs.md, docs/adr/0026-demand-driven-settlement.md, docs/adr/0027-settlement-runner.md, docs/adr/0029-settled-catalog.md
  • internal/storage/rewrite/streamdenorm.go, internal/auditor/denorm.go, internal/auditor/pincap.go, internal/metadata/catalog.go
  • tlaplus/ObjectLifecycle.tla

Metadata keyspaces

  • docs/adr/0003-keyspace-partitioning-namespaces.md, docs/adr/0005-protobuf-kv-values.md, docs/adr/0013-kv-secondary-indexes.md, docs/adr/0023-coord-fleet.md
  • docs/design/013-ref-spans.md, docs/design/041-list-prefix.md, docs/design/048-two-phase-create.md
  • internal/metadata/keys.go, internal/kv/kv.go
  • tlaplus/Registry.tla

Leadership and leases

  • docs/adr/0018-retirement-at-release.md, docs/adr/0023-coord-fleet.md, docs/adr/0025-clean-release-gate.md, docs/adr/0030-alive-defers-and-the-last-writer.md, docs/adr/0032-same-star-departures-pay-coverage.md, docs/adr/0042-stream-reconfigure-through-handoff.md
  • internal/coord/, internal/star/writer/

Reads, the Gateway, and the object cache

  • docs/design/021-http-surface.md, docs/design/022-gateway.md, docs/design/024-readplan.md, docs/design/026-object-cache.md, docs/design/029-wake-on-ack.md
  • docs/adr/0017-linearizable-reads.md, docs/adr/0037-unsigned-range-cache-reads.md, docs/adr/0040-subscriptions-park-on-the-leaders-wake.md
  • internal/gateway/, internal/star/reader/plan.go, internal/storage/objectcache/, internal/storage/objectstore/s3/cacheroute.go
  • cmd/novagateway/main.go, deploy/docker/objectcache/

The auditor

  • docs/design/003-auditor.md, docs/design/012-footer-reclamation.md, docs/design/055-teardown-purge-gate.md, docs/design/056-short-retention-hold.md
  • docs/adr/0001-due-queue-auditor-discovery.md, docs/adr/0022-auditor-duty-harness.md, docs/adr/0028-auditor-dispatch-pass.md
  • internal/auditor/auditor.go, internal/auditor/harness.go, internal/auditor/dispatch.go, internal/auditor/leases.go, internal/auditor/ring.go, internal/auditor/budgets.go, internal/auditor/fetchcache.go
  • docs/perf/2026-08-18-settle-storm-forensics.md, operator/README.md (auditor scaling)
  • internal/metadata/audit.go, internal/metadata/dueindex.go, internal/metadata/denormmarker.go, internal/metadata/reapcheck.go
  • internal/storage/reclaim/, internal/storage/rewrite/

Queues

  • docs/design/043-three-surfaces-phase-a.md, sections 2.3 and 3.8
  • docs/design/049-lean-queue-seats.md, with its amendments
  • docs/design/000-decisions.md, the entries on queues
  • internal/queue/, internal/daemon/dispatch.go, internal/daemon/dispatchconfig.go, internal/daemon/recordfetch.go
  • internal/metadata/queues.go, internal/metadata/queuedispatch.go, internal/metadata/queuekeyed.go
  • proto/nova/v1/queue.proto

Embedded oxia and the metadata store

  • docs/design/032-embedded-oxia.md, docs/design/035-embedded-oxia-refactor.md, docs/design/042-metadata-store-backups.md
  • internal/kv/oxia/embedded/ (embedded.go, cluster.go, tender.go, ports/, heat/)
  • internal/daemon/backends.go, internal/daemon/config.go, cli/oxia_verbs.go

Nodes, the controller, and the removal ladder

  • docs/design/023-constellation-controller.md
  • docs/adr/0011-node-scale-down.md, docs/adr/0018-retirement-at-release.md
  • operator/README.md, operator/internal/constellation/ladder.go, operator/internal/constellation/embeddedexit.go
  • internal/daemon/drain.go, internal/daemon/health.go, internal/coord/decommission.go
  • tlaplus/Membership.tla

Deployment

  • deploy/docker/README.md, deploy/docker/Dockerfile, deploy/docker/docker-compose.yml, deploy/docker/docker-compose.quickstart.yml
  • deploy/helm/nova/README.md, deploy/helm/nova/values.yaml, deploy/helm/nova/crds/
  • deploy/pulumi/README.md

Observability and the admin UI

  • dashboards/README.md, dashboards/metrics/
  • docs/design/008-admin-ui.md, docs/design/033-grafana-dashboards.md, docs/design/033-grafana-metric-map.md
  • proto/nova/v1/adminplane.proto, internal/adminui/adminui.go, web/admin/src/routes/
  • internal/daemon/summary.go, internal/daemon/stats.go, internal/daemon/observability.go, internal/daemon/auditstats.go

Testing and failure

  • docs/design/002-testing.md, docs/design/006-chaos-matrix.md, docs/design/007-production-readiness.md, docs/design/047-specification-suite.md
  • novatest/chaos/chaos.go, novatest/lincheck/, tlaplus/README.md, tlaplus/ledger.md
  • cmd/novabench/README.md

On this page