Skip to content

Add Graph::trace_assertion_failure and fix duplicate error_message symbol#220

Merged
Kyle-Ye merged 2 commits intomainfrom
feature/add-trace-assertion-failure
Feb 26, 2026
Merged

Add Graph::trace_assertion_failure and fix duplicate error_message symbol#220
Kyle-Ye merged 2 commits intomainfrom
feature/add-trace-assertion-failure

Conversation

@Kyle-Ye
Copy link
Contributor

@Kyle-Ye Kyle-Ye commented Feb 26, 2026

Summary

  • Add Graph::trace_assertion_failure(bool, const char*, ...) declaration and stub implementation
  • Wire trace_assertion_failure calls into precondition_failure (with true) and non_fatal_precondition_failure (with false), matching the original AG binary
  • Remove dead #if OAG_TARGET_RELEASE >= OAG_RELEASE_2023 guard that was never defined
  • Make error_message static to avoid duplicate symbol error when linked with OpenRenderBox

Test plan

  • swift build passes

- Declare and stub Graph::trace_assertion_failure(bool, const char*, ...)
- Call trace_assertion_failure(true, ...) in precondition_failure
- Call trace_assertion_failure(false, ...) in non_fatal_precondition_failure
- Remove dead OAG_TARGET_RELEASE guard that was never defined
Use internal linkage for error_message to avoid linker collision
when both OpenAttributeGraph and OpenRenderBox are linked together.
@github-actions github-actions bot added bug Something isn't working enhancement New feature or request build issue labels Feb 26, 2026
@augmentcode
Copy link

augmentcode bot commented Feb 26, 2026

🤖 Augment PR Summary

Summary: Introduces a new Graph::trace_assertion_failure(bool, const char*, ...) API and wires it into precondition_failure/non_fatal_precondition_failure to mirror the original AG behavior.

Changes: Removes an unused release-guard and makes error_message file-local (static) to avoid duplicate symbol link errors.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.08%. Comparing base (9b0ce6c) to head (be46a7a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/OpenAttributeGraphCxx/Misc/assert.cpp 0.00% 2 Missing ⚠️
...es/OpenAttributeGraphCxx/Graph/OAGGraphTracing.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #220   +/-   ##
=======================================
  Coverage   32.08%   32.08%           
=======================================
  Files          70       70           
  Lines        2596     2596           
=======================================
  Hits          833      833           
  Misses       1763     1763           
Flag Coverage Δ
ios 32.10% <0.00%> (ø)
macos 9.95% <ø> (ø)
ubuntu 11.79% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...hCxx/include/OpenAttributeGraphCxx/Graph/Graph.hpp 26.31% <ø> (ø)
...es/OpenAttributeGraphCxx/Graph/OAGGraphTracing.cpp 80.00% <0.00%> (-20.00%) ⬇️
Sources/OpenAttributeGraphCxx/Misc/assert.cpp 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye Kyle-Ye merged commit 2682d4b into main Feb 26, 2026
12 checks passed
@Kyle-Ye Kyle-Ye deleted the feature/add-trace-assertion-failure branch February 26, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working build issue enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant