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

dnsimple / dns_erlang / 30157417737
92%

Build:
DEFAULT BRANCH: main
Ran 25 Jul 2026 12:07PM UTC
Jobs 1
Files 12
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

25 Jul 2026 12:01PM UTC coverage: 90.988% (+0.02%) from 90.966%
30157417737

push

github

NelsonVides
Honour an OPT RR anywhere in the additional section (RFC 6891 §6.1.1)

RFC 6891 §6.1.1: the OPT RR "MAY be placed anywhere within the additional
data section". Four places in the encoder matched it only at the head of
that list -- get_max_size/2, preserve_optrr_size/1, ensure_optrr/2 and
append_optrr/2 -- so an OPT in any other position was invisible to all of
them, with two consequences:

  - Truncated responses dropped the OPT entirely, contra the same
    section's requirement that a responder include an OPT whenever the
    request carried one. Reserving space for it was skipped too, since
    preserve_optrr_size/1 returned 0.
  - The advertised payload size was ignored, falling back to the 512
    default, so a client offering a 4096-byte buffer got needlessly
    truncated answers.

Neither shows up in ordinary traffic, because clients usually put the OPT
first -- but nothing requires it, and our own decoder preserves wire
order, so [A, OPT] is exactly what a caller is handed for a legal query.
It also cannot be last when TSIG or SIG(0) is present, since those must
be the final RR.

Each of the four keeps its head match as a fast path and falls back to a
scan only when the OPT is elsewhere, so the common case costs exactly what
it did before: 500k encodes of a small response measured 496ms/543ms/684ms
for additional = []/[OPT]/[A,OPT] against 523ms/544ms/711ms before, i.e.
at parity within the ~5% noise this corpus carries. Two rejected
alternatives, both measured: threading one lookup through the default path
instead of three head matches cost ~5% more, because it traded three
allocation-free matches for a scan plus a tuple; and lists:keyfind/3,
though a BIF, ran ~2.3x slower than the open-coded loop on [] and [OPT],
only overtaking it past roughly ten records -- far longer than any real
additional section.

23 of 24 new or added lines in 1 file covered. (95.83%)

1 existing line in 1 file now uncovered.

2928 of 3218 relevant lines covered (90.99%)

10766.07 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
87.12
0.38% src/dns_encode.erl

Coverage Regressions

Lines Coverage ∆ File
1
87.12
0.38% src/dns_encode.erl
Jobs
ID Job ID Ran Files Coverage
1 30157417737.1 25 Jul 2026 12:07PM UTC 12
90.99
GitHub Action Run
Source Files on build 30157417737
  • Tree
  • List 12
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30157417737
  • 9f5e78f7 on github
  • Prev Build on main (#30156031419)
  • Next Build on main (#30160754950)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc