Skip to content

governance: add .github/CODEOWNERS#36

Merged
willwade merged 1 commit into
mainfrom
add-codeowners
Jun 28, 2026
Merged

governance: add .github/CODEOWNERS#36
willwade merged 1 commit into
mainfrom
add-codeowners

Conversation

@willwade

Copy link
Copy Markdown

Adds CODEOWNERS with @willwade as default owner, matching the other v6 frontends (Dasher-Apple, Dasher-Windows, Dasher-Android).

Signed-off-by: will wade <willwade@gmail.com>
@willwade willwade merged commit ad8668f into main Jun 28, 2026
14 checks passed
willwade added a commit that referenced this pull request Jun 28, 2026
Collapses the prior fixup chain (helpers + clang-format + placement) into
one commit and drops the unrelated CODEOWNERS commit (landed separately in
#36). Rebased onto current main.

Standardises every C-API entry point that can throw on the log callback:
- Adds a single noexcept, allocation-free helper log_boundary_error() that
  formats "<context>: <detail>" into a fixed stack buffer via snprintf.
  Catch handlers must not throw: a std::string concat hitting bad_alloc
  would re-violate the boundary and, for void setters, cannot recover
  (RFC 0009 Amendment 2 requires this property).
- Guards the four setters (dasher_set_bool/long/string_parameter,
  dasher_set_speed_percent) which call broadcasting observer code.
- Upgrades the three getters to catch std::exception + ... and route
  through the callback, replacing fprintf(stderr,...) (lost on iOS
  keyboard extensions / WASM / embedded) and the bad_variant_access-only
  catch that let other exception types escape.
- Logs dasher_set_screen_size Realize() failures instead of silently
  swallowing them.
- Updates CONTRIBUTING Rule 4 with the void-function policy and a pointer
  to the helper.

Verified: clang-format clean on Src/CAPI.cpp; clang + clang-tidy build of
libdasher.so passes with no tidy findings.

Signed-off-by: will wade <willwade@gmail.com>
willwade added a commit that referenced this pull request Jun 28, 2026
Collapses the prior fixup chain (helpers + clang-format + placement) into
one commit and drops the unrelated CODEOWNERS commit (landed separately in
#36). Rebased onto current main.

Standardises every C-API entry point that can throw on the log callback:
- Adds a single noexcept, allocation-free helper log_boundary_error() that
  formats "<context>: <detail>" into a fixed stack buffer via snprintf.
  Catch handlers must not throw: a std::string concat hitting bad_alloc
  would re-violate the boundary and, for void setters, cannot recover
  (RFC 0009 Amendment 2 requires this property).
- Guards the four setters (dasher_set_bool/long/string_parameter,
  dasher_set_speed_percent) which call broadcasting observer code.
- Upgrades the three getters to catch std::exception + ... and route
  through the callback, replacing fprintf(stderr,...) (lost on iOS
  keyboard extensions / WASM / embedded) and the bad_variant_access-only
  catch that let other exception types escape.
- Logs dasher_set_screen_size Realize() failures instead of silently
  swallowing them.
- Updates CONTRIBUTING Rule 4 with the void-function policy and a pointer
  to the helper.

Verified: clang-format clean on Src/CAPI.cpp; clang + clang-tidy build of
libdasher.so passes with no tidy findings.

Signed-off-by: will wade <willwade@gmail.com>
willwade added a commit that referenced this pull request Jun 28, 2026
Collapses the prior fixup chain (helpers + clang-format + placement) into
one commit and drops the unrelated CODEOWNERS commit (landed separately in
#36). Rebased onto current main.

Standardises every C-API entry point that can throw on the log callback:
- Adds a single noexcept, allocation-free helper log_boundary_error() that
  formats "<context>: <detail>" into a fixed stack buffer via snprintf.
  Catch handlers must not throw: a std::string concat hitting bad_alloc
  would re-violate the boundary and, for void setters, cannot recover
  (RFC 0009 Amendment 2 requires this property).
- Guards the four setters (dasher_set_bool/long/string_parameter,
  dasher_set_speed_percent) which call broadcasting observer code.
- Upgrades the three getters to catch std::exception + ... and route
  through the callback, replacing fprintf(stderr,...) (lost on iOS
  keyboard extensions / WASM / embedded) and the bad_variant_access-only
  catch that let other exception types escape.
- Logs dasher_set_screen_size Realize() failures instead of silently
  swallowing them.
- Updates CONTRIBUTING Rule 4 with the void-function policy and a pointer
  to the helper.

Verified: clang-format clean on Src/CAPI.cpp; clang + clang-tidy build of
libdasher.so passes with no tidy findings.

Signed-off-by: will wade <willwade@gmail.com>
willwade added a commit that referenced this pull request Jun 28, 2026
…#38)

* fix: harden C API boundary exception handling (issue #34)

Collapses the prior fixup chain (helpers + clang-format + placement) into
one commit and drops the unrelated CODEOWNERS commit (landed separately in
#36). Rebased onto current main.

Standardises every C-API entry point that can throw on the log callback:
- Adds a single noexcept, allocation-free helper log_boundary_error() that
  formats "<context>: <detail>" into a fixed stack buffer via snprintf.
  Catch handlers must not throw: a std::string concat hitting bad_alloc
  would re-violate the boundary and, for void setters, cannot recover
  (RFC 0009 Amendment 2 requires this property).
- Guards the four setters (dasher_set_bool/long/string_parameter,
  dasher_set_speed_percent) which call broadcasting observer code.
- Upgrades the three getters to catch std::exception + ... and route
  through the callback, replacing fprintf(stderr,...) (lost on iOS
  keyboard extensions / WASM / embedded) and the bad_variant_access-only
  catch that let other exception types escape.
- Logs dasher_set_screen_size Realize() failures instead of silently
  swallowing them.
- Updates CONTRIBUTING Rule 4 with the void-function policy and a pointer
  to the helper.

Verified: clang-format clean on Src/CAPI.cpp; clang + clang-tidy build of
libdasher.so passes with no tidy findings.

Signed-off-by: will wade <willwade@gmail.com>

* feat(capi): wrap per-frame hot path + add engine error flag (RFC 0009 A2)

The parameter accessors were standardised in #35; the remaining and most
valuable gap was the per-frame hot path — the least guarded entry points
and the most likely to hit engine bugs. C++ exceptions escaping
dasher_frame / dasher_mouse_* / dasher_key_event across extern "C" left
the frontend engine-log ring buffer with no fault context, so a crash
report showed where the frontend was, not what the engine was doing
(RFC 0009 Amendment 2).

- Wrap dasher_frame, dasher_mouse_move/down/up, dasher_key_event in
  try/catch; route caught exceptions through log_boundary_error() at
  level 3 (reused from #35) so the fault reaches the frontend ring
  buffer before the function returns.
- Add bool dasher_ctx::engineError, latched on catch. Once set, those
  five entry points no-op — the engine is indeterminate after a
  mid-frame throw and continuing would risk a hard SEGV this cannot
  catch.
- Expose via int dasher_has_engine_error(dasher_ctx*) (the context is
  opaque). Frontend contract: on true, stop calling frame, surface an
  error, then dasher_destroy() + dasher_create(). Not cleared by
  dasher_reset().

What this does NOT catch: SEGV/SIGBUS, stack overflow, destructor throws
during unwinding, and DASHER_ASSERT (a no-op under NDEBUG, not an
abort). Those remain the per-platform signal handlers job per the base
RFC; the log tail still helps because the last successful frame logs
precede the signal.

Depends on #35 (log_boundary_error helper). Verified: clang-format clean
on src/CAPI.cpp and src/dasher.h; clang + clang-tidy build of libdasher.so
passes with no tidy findings.

Signed-off-by: will wade <willwade@gmail.com>

---------

Signed-off-by: will wade <willwade@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant