Skip to content

Harden logging, env-var checks, and small cleanups - #50

Merged
iskakaushik merged 1 commit into
mainfrom
provider-refresh/02-hardening
Aug 19, 2026
Merged

Harden logging, env-var checks, and small cleanups#50
iskakaushik merged 1 commit into
mainfrom
provider-refresh/02-hardening

Conversation

@iskakaushik

Copy link
Copy Markdown
Collaborator

std::atomicstd::shared_ptr in logger.h does not compile on
standard libraries that have not implemented P0718 (notably libc++,
which this project selects on Apple), so any macOS build of the SDK
or of downstream code including <ai/logger.h> failed. Feature-test
__cpp_lib_atomic_shared_ptr, fall back to the atomic_load and
atomic_store free functions elsewhere, and document the lifetime of
the reference logger() returns.

Treat a set-but-empty OPENAI_API_KEY or ANTHROPIC_API_KEY as absent
through a shared utils::non_empty_env() helper; an empty value
previously produced a client that failed only at request time.

Also size the langfuse ISO-8601 buffer for snprintf's worst case,
drop a std::move on nlohmann json subscripts that suppressed no
copy, silence unused-parameter warnings in the tool factories and
the base stream_text stub, and fix the stale designated-initializer
example in core.h that no longer compiles.


Stack created with GitHub Stacks CLIGive Feedback 💬

Base automatically changed from provider-refresh/01-build-tooling to main August 19, 2026 17:43
std::atomic<std::shared_ptr> in logger.h does not compile on
standard libraries that have not implemented P0718 (notably libc++,
which this project selects on Apple), so any macOS build of the SDK
or of downstream code including <ai/logger.h> failed. Feature-test
__cpp_lib_atomic_shared_ptr, fall back to the atomic_load and
atomic_store free functions elsewhere, and document the lifetime of
the reference logger() returns.

Treat a set-but-empty OPENAI_API_KEY or ANTHROPIC_API_KEY as absent
through a shared utils::non_empty_env() helper; an empty value
previously produced a client that failed only at request time.

Also size the langfuse ISO-8601 buffer for snprintf's worst case,
drop a std::move on nlohmann json subscripts that suppressed no
copy, silence unused-parameter warnings in the tool factories and
the base stream_text stub, and fix the stale designated-initializer
example in core.h that no longer compiles.
@iskakaushik
iskakaushik force-pushed the provider-refresh/02-hardening branch from 0f4b3ac to 2edb4c9 Compare August 19, 2026 17:43
@iskakaushik
iskakaushik merged commit 61a2f8d into main Aug 19, 2026
0 of 2 checks passed
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