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

dangernoodle-io / breadboard / 26137798989
100%

Build:
DEFAULT BRANCH: main
Ran 20 May 2026 02:37AM UTC
Jobs 1
Files 17
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

20 May 2026 02:36AM UTC coverage: 100.0%. Remained the same
26137798989

push

github

web-flow
fix(bb_openapi): stream the OpenAPI doc instead of materializing a 26+ KB tree (#279)

GET /api/openapi.json was crashing httpd workers on tight-stack boards
(ESP32-WROOM-32, tdongle-s3) once the route count grew past ~50 in the
v0.30 → v0.33 window. Symptom: TCP accepts, request delivered, server
closes connection without headers (handler aborted mid-response). Root
cause: bb_openapi_emit built the full JSON tree in a single cJSON
allocation, then bb_http_resp_send_json recursively walked it through
the chunked-encoding path — peak heap + recursive serialize stack
together exceeded the 6144-byte httpd worker budget on a now-26 KB
document. (B1-222)

Add `bb_openapi_emit_stream(req, meta)`: streams the document piece by
piece via bb_http_resp_send_chunk. Each operation's JSON tree is built,
serialized, and freed individually, so peak memory is bounded to one
operation (~1 KB) instead of the whole document (~26 KB). The platform
handler in bb_openapi_register switches to the streaming variant; the
existing tree-build `bb_openapi_emit` is preserved for tests and any
consumer that wants the full bb_json_t tree.

Validated on bench: bitaxe-650 returns the full 26882-byte spec in
162 ms, esp32-wroom32 returns 24875 bytes in 617 ms — both with no
httpd worker wedge. Five new host tests cover the streaming path
(produces valid doc, NULL-arg guards, servers/description fields,
default-fallbacks, multi-method paths) using an extended host
send_chunk stub that appends each chunk into the capture body. 887
host tests pass; bb_openapi_emit.c at 100% line + 100% branch coverage
(platform-impossible alloc-failure / send-error returns marked
LCOV_EXCL_BR_LINE to match the codebase's existing convention).

Drive-by: move `#define _POSIX_C_SOURCE 200112L` to the top of
bb_event_ring.c, before any include. glibc's features.h locks the
macro at the default once anything pulls it in transitively, so the
mid-file define produced "_POSIX_C_SOURCE redefined" warnings on eve... (continued)

1020 of 1020 branches covered (100.0%)

Branch coverage included in aggregate %.

70 of 70 new or added lines in 1 file covered. (100.0%)

1867 of 1867 relevant lines covered (100.0%)

965.33 hits per line

Jobs
ID Job ID Ran Files Coverage
1 26137798989.1 20 May 2026 02:37AM UTC 17
100.0
GitHub Action Run
Source Files on build 26137798989
  • Tree
  • List 17
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26137798989
  • 83e54553 on github
  • Prev Build on main (#26134911361)
  • Next Build on main (#26141107752)
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