• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

orneryd / NornicDB / 25761104493
90%

Build:
DEFAULT BRANCH: main
Ran 12 May 2026 08:58PM UTC
Jobs 1
Files 463
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 May 2026 08:43PM UTC coverage: 83.78% (+0.009%) from 83.771%
25761104493

push

github

orneryd
test(storage): pin uniqueness-vs-constraint-contract separation

Adds two regression guards that pin a load-bearing invariant of the
`validateConstraintContracts` early-out at
`pkg/storage/constraint_contracts.go:1136`: a schema declaring only
single-property `IS UNIQUE` constraints via standard `CREATE CONSTRAINT`
DDL must NOT show up as having any `ConstraintContract` registered.

Why this matters: `transactionTouchesConstraintContracts` reads
`SchemaManager.HasAnyConstraintContract()` per touched namespace to
decide whether to skip the per-affected-node adjacency walk during
commit. If standard uniqueness DDL leaked into the contracts map, every
commit on a uniqueness-only workload would pay the adjacency-walk cost
even though no boolean predicate needs validating. Profiling has shown
this walk can dominate cumulative CPU when a workload uses many
uniqueness constraints and commits in large batches.

Coverage:

`TestUniqueConstraints_DoNotRegisterAsConstraintContracts` — registers
a representative set of single-property `IS UNIQUE` constraints via
`CREATE CONSTRAINT` cypher DDL and asserts
`HasAnyConstraintContract()` returns false.

`TestUnwindMergeCanonicalWrite_DoesNotLeakConstraintContracts` — full
integration form: registers the same uniqueness constraints, seeds a
File anchor, executes a representative UNWIND-MERGE canonical
entity-write batch, and asserts no `ConstraintContract` has been
registered at any point along the way. Catches regressions where the
cypher execution path itself registers contracts implicitly.

Both tests run via `go test -tags 'noui nolocalllm' ./pkg/cypher -count=1`
and pass against current main. Full `pkg/cypher` package suite remains
green (8.7s) with no regressions.

`gofmt -l` clean on the new file. No production code changed.

124615 of 148741 relevant lines covered (83.78%)

0.97 hits per line

Coverage Regressions

Lines Coverage ∆ File
8
86.42
1.23% pkg/server/server.go
7
86.57
-2.47% pkg/replication/multi_region.go
3
78.48
-1.35% pkg/storage/badger_schema.go
3
90.07
-0.99% pkg/temporal/decay_integration.go
2
87.05
-0.3% pkg/cypher/match_rows.go
2
90.79
-0.66% pkg/cypher/optimized_executors.go
2
89.67
-0.38% pkg/replication/storage_adapter.go
1
97.64
-0.26% pkg/temporal/tracker.go
Jobs
ID Job ID Ran Files Coverage
1 25761104493.1 12 May 2026 08:58PM UTC 463
83.78
GitHub Action Run
Source Files on build 25761104493
  • Tree
  • List 463
  • Changed 12
  • Source Changed 0
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • aee83c45 on github
  • Prev Build on main (#25757508063)
  • Next Build on main (#25766380596)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc