Skip to content

Comments

P6/finalizer isolation#71

Open
heidi-dang wants to merge 10 commits intomainfrom
p6/finalizer-isolation
Open

P6/finalizer isolation#71
heidi-dang wants to merge 10 commits intomainfrom
p6/finalizer-isolation

Conversation

@heidi-dang
Copy link
Owner

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello @heidi-dang, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the C++ core engine of the heidi-engine project by integrating several new core components and updating the build system accordingly. It also enhances the unit testing framework for these core components, ensuring broader test coverage and stability, likely related to the finalizer isolation mentioned in the title.

Highlights

  • C++ Core Engine Expansion: Numerous new C++ core files, including core.cpp, clock.cpp, config.cpp, journal_writer.cpp, run_id.cpp, status_writer.cpp, subprocess.cpp, mock_provider.cpp, async_collector.cpp, and manifest.cpp, were added to the heidid daemon executable.
  • Build System Updates: The CMakeLists.txt file was updated to incorporate these new core files into the build process for both the heidid executable and the cpp_core_tests target.
  • Dependency Management: New libraries, specifically crypto, pthread, heidi-metrics, and heidi-kernel-governor, were linked to support the expanded functionality and testing.
  • Unit Test Enhancements: The cpp_core_tests target was updated to include new test files (test_cpp_async.cpp) and link against additional libraries, indicating an expansion of the C++ core unit test suite.
Changelog
  • CMakeLists.txt
    • Updated build configurations for heidid and cpp_core_tests to include new core files and link additional libraries.
  • build/CMakeCache.txt
    • Added CMake build cache file.
  • build/CMakeFiles/3.28.3/CMakeCCompiler.cmake
    • Added CMake configuration for the C compiler.
  • build/CMakeFiles/3.28.3/CMakeCXXCompiler.cmake
    • Added CMake configuration for the C++ compiler.
  • build/CMakeFiles/3.28.3/CMakeSystem.cmake
    • Added CMake system information file.
  • build/CMakeFiles/3.28.3/CompilerIdC/CMakeCCompilerId.c
    • Added C compiler identification source file.
  • build/CMakeFiles/3.28.3/CompilerIdCXX/CMakeCXXCompilerId.cpp
    • Added C++ compiler identification source file.
  • build/CMakeFiles/CMakeConfigureLog.yaml
    • Added CMake configuration log.
  • build/CMakeFiles/CMakeDirectoryInformation.cmake
    • Added CMake directory information file.
  • build/CMakeFiles/Makefile.cmake
    • Added CMake generated Makefile configuration.
  • build/CMakeFiles/Makefile2
    • Added CMake generated secondary Makefile.
  • build/CMakeFiles/TargetDirectories.txt
    • Added CMake file listing target directories.
  • build/CMakeFiles/cmake.check_cache
    • Added CMake cache dependency checking file.
  • build/CMakeFiles/cpp_core_tests.dir/DependInfo.cmake
    • Added CMake dependency information for C++ core tests.
  • build/CMakeFiles/cpp_core_tests.dir/build.make
    • Added CMake build rules for C++ core tests.
  • build/CMakeFiles/cpp_core_tests.dir/cmake_clean.cmake
    • Added CMake clean rules for C++ core tests.
  • build/CMakeFiles/cpp_core_tests.dir/compiler_depend.ts
    • Added CMake timestamp file for C++ core tests compiler dependencies.
  • build/CMakeFiles/cpp_core_tests.dir/depend.make
    • Added CMake empty dependencies file for C++ core tests.
  • build/CMakeFiles/cpp_core_tests.dir/flags.make
    • Added CMake compile flags for C++ core tests.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/async_collector.cpp.o.d
    • Added compiler dependency file for async collector.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/clock.cpp.o.d
    • Added compiler dependency file for clock.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/config.cpp.o.d
    • Added compiler dependency file for config.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/core.cpp.o.d
    • Added compiler dependency file for core.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/journal_writer.cpp.o.d
    • Added compiler dependency file for journal writer.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/mock_provider.cpp.o.d
    • Added compiler dependency file for mock provider.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/provider.cpp.o.d
    • Removed compiler dependency file for provider.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/rlimit.cpp.o.d
    • Removed compiler dependency file for rlimit.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/run_id.cpp.o.d
    • Added compiler dependency file for run ID.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/status_writer.cpp.o.d
    • Added compiler dependency file for status writer.
  • build/CMakeFiles/cpp_core_tests.dir/heidi_engine/cpp/core/subprocess.cpp.o.d
    • Added compiler dependency file for subprocess.
  • build/CMakeFiles/cpp_core_tests.dir/link.txt
    • Added CMake linker command file for C++ core tests.
  • build/CMakeFiles/cpp_core_tests.dir/progress.make
    • Added CMake progress tracking for C++ core tests.
  • build/CMakeFiles/cpp_core_tests.dir/tests/test_cpp_async.cpp.o.d
    • Added compiler dependency file for async tests.
  • build/CMakeFiles/cpp_core_tests.dir/tests/test_cpp_core.cpp.o.d
    • Added compiler dependency file for core tests.
  • build/CMakeFiles/heidid.dir/DependInfo.cmake
    • Added CMake dependency information for heidid.
  • build/CMakeFiles/heidid.dir/build.make
    • Added CMake build rules for heidid.
  • build/CMakeFiles/heidid.dir/cmake_clean.cmake
    • Added CMake clean rules for heidid.
  • build/CMakeFiles/heidid.dir/compiler_depend.ts
    • Added CMake timestamp file for heidid compiler dependencies.
  • build/CMakeFiles/heidid.dir/depend.make
    • Added CMake empty dependencies file for heidid.
  • build/CMakeFiles/heidid.dir/flags.make
    • Added CMake compile flags for heidid.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/core/async_collector.cpp.o.d
    • Added compiler dependency file for async collector.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/core/clock.cpp.o.d
    • Added compiler dependency file for clock.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/core/config.cpp.o.d
    • Added compiler dependency file for config.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/core/core.cpp.o.d
    • Added compiler dependency file for core.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/core/journal_writer.cpp.o.d
    • Added compiler dependency file for journal writer.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/core/mock_provider.cpp.o.d
    • Added compiler dependency file for mock provider.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/core/run_id.cpp.o.d
    • Added compiler dependency file for run ID.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/core/status_writer.cpp.o.d
    • Added compiler dependency file for status writer.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/core/subprocess.cpp.o.d
    • Added compiler dependency file for subprocess.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/daemon/daemon.cpp.o.d
    • Added compiler dependency file for daemon.
  • build/CMakeFiles/heidid.dir/heidi_engine/cpp/daemon/main.cpp.o.d
    • Added compiler dependency file for main daemon.
  • build/CMakeFiles/heidid.dir/link.txt
    • Added CMake linker command file for heidid.
  • build/CMakeFiles/heidid.dir/progress.make
    • Added CMake progress tracking for heidid.
  • build/CMakeFiles/progress.marks
    • Added CMake progress marker file.
  • build/CTestTestfile.cmake
    • Added CTest configuration file.
  • build/Makefile
    • Added top-level Makefile.
  • build/_deps/googletest-build/CMakeFiles/CMakeDirectoryInformation.cmake
    • Added CMake directory information for googletest build.
  • build/_deps/googletest-build/CMakeFiles/progress.marks
    • Added CMake progress marker file for googletest build.
  • build/_deps/googletest-build/CTestTestfile.cmake
    • Added CTest configuration for googletest build.
  • build/_deps/googletest-build/Makefile
    • Added Makefile for googletest build.
  • build/_deps/googletest-build/cmake_install.cmake
    • Added CMake install script for googletest build.
  • build/_deps/googletest-build/googlemock/CMakeFiles/CMakeDirectoryInformation.cmake
    • Added CMake directory information for googlemock.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/DependInfo.cmake
    • Added CMake dependency information for gmock.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/build.make
    • Added CMake build rules for gmock.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/cmake_clean.cmake
    • Added CMake clean rules for gmock.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/cmake_clean_target.cmake
    • Added CMake clean target for gmock.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/compiler_depend.make
    • Added CMake compiler dependency file for gmock.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/compiler_depend.ts
    • Added CMake timestamp file for gmock compiler dependencies.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/depend.make
    • Added CMake empty dependencies file for gmock.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/flags.make
    • Added CMake compile flags for gmock.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/link.txt
    • Added CMake linker command file for gmock.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock.dir/progress.make
    • Added CMake progress tracking for gmock.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/DependInfo.cmake
    • Added CMake dependency information for gmock_main.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/build.make
    • Added CMake build rules for gmock_main.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/cmake_clean.cmake
    • Added CMake clean rules for gmock_main.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/cmake_clean_target.cmake
    • Added CMake clean target for gmock_main.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/compiler_depend.make
    • Added CMake compiler dependency file for gmock_main.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/compiler_depend.ts
    • Added CMake timestamp file for gmock_main compiler dependencies.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/depend.make
    • Added CMake empty dependencies file for gmock_main.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/flags.make
    • Added CMake compile flags for gmock_main.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/link.txt
    • Added CMake linker command file for gmock_main.
  • build/_deps/googletest-build/googlemock/CMakeFiles/gmock_main.dir/progress.make
    • Added CMake progress tracking for gmock_main.
  • build/_deps/googletest-build/googlemock/CMakeFiles/progress.marks
    • Added CMake progress marker file for googlemock.
  • build/_deps/googletest-build/googlemock/CTestTestfile.cmake
    • Added CTest configuration for googlemock.
  • build/_deps/googletest-build/googlemock/Makefile
    • Added Makefile for googlemock.
  • build/_deps/googletest-build/googlemock/cmake_install.cmake
    • Added CMake install script for googlemock.
  • build/_deps/googletest-build/googletest/CMakeFiles/CMakeDirectoryInformation.cmake
    • Added CMake directory information for googletest.
  • build/_deps/googletest-build/googletest/CMakeFiles/Export/0c08b8e77dd885bfe55a19a9659d9fc1/GTestTargets-noconfig.cmake
    • Added CMake export file for GTest targets (noconfig).
  • build/_deps/googletest-build/googletest/CMakeFiles/Export/0c08b8e77dd885bfe55a19a9659d9fc1/GTestTargets.cmake
    • Added CMake export file for GTest targets.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/DependInfo.cmake
    • Added CMake dependency information for gtest.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/build.make
    • Added CMake build rules for gtest.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/cmake_clean.cmake
    • Added CMake clean rules for gtest.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/cmake_clean_target.cmake
    • Added CMake clean target for gtest.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/compiler_depend.internal
    • Added CMake internal compiler dependency file for gtest.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/compiler_depend.ts
    • Added CMake timestamp file for gtest compiler dependencies.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/depend.make
    • Added CMake empty dependencies file for gtest.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/flags.make
    • Added CMake compile flags for gtest.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/link.txt
    • Added CMake linker command file for gtest.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/progress.make
    • Added CMake progress tracking for gtest.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.d
    • Added compiler dependency file for gtest-all.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/DependInfo.cmake
    • Added CMake dependency information for gtest_main.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/build.make
    • Added CMake build rules for gtest_main.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/cmake_clean.cmake
    • Added CMake clean rules for gtest_main.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/cmake_clean_target.cmake
    • Added CMake clean target for gtest_main.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/compiler_depend.internal
    • Added CMake internal compiler dependency file for gtest_main.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/compiler_depend.ts
    • Added CMake timestamp file for gtest_main compiler dependencies.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/depend.make
    • Added CMake empty dependencies file for gtest_main.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/flags.make
    • Added CMake compile flags for gtest_main.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/link.txt
    • Added CMake linker command file for gtest_main.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/progress.make
    • Added CMake progress tracking for gtest_main.
  • build/_deps/googletest-build/googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.d
    • Added compiler dependency file for gtest_main.
  • build/_deps/googletest-build/googletest/CMakeFiles/progress.marks
    • Added CMake progress marker file for googletest.
  • build/_deps/googletest-build/googletest/CTestTestfile.cmake
    • Added CTest configuration for googletest.
  • build/_deps/googletest-build/googletest/Makefile
    • Added Makefile for googletest.
  • build/_deps/googletest-build/googletest/cmake_install.cmake
    • Added CMake install script for googletest.
  • build/_deps/googletest-build/googletest/generated/GTestConfig.cmake
    • Added generated GTest configuration.
  • build/_deps/googletest-build/googletest/generated/GTestConfigVersion.cmake
    • Added generated GTest version configuration.
  • build/_deps/googletest-build/googletest/generated/gmock.pc
    • Added pkg-config file for gmock.
  • build/_deps/googletest-build/googletest/generated/gmock_main.pc
    • Added pkg-config file for gmock_main.
  • build/_deps/googletest-build/googletest/generated/gtest.pc
    • Added pkg-config file for gtest.
  • build/_deps/googletest-build/googletest/generated/gtest_main.pc
    • Added pkg-config file for gtest_main.
  • build/_deps/googletest-src/.clang-format
    • Added clang-format configuration.
  • build/_deps/googletest-src/.github/ISSUE_TEMPLATE/00-bug_report.yml
    • Added GitHub issue template for bug reports.
  • build/_deps/googletest-src/.github/ISSUE_TEMPLATE/10-feature_request.yml
    • Added GitHub issue template for feature requests.
  • build/_deps/googletest-src/.github/ISSUE_TEMPLATE/config.yml
    • Added GitHub issue template configuration.
  • build/_deps/googletest-src/.github/workflows/gtest-ci.yml
    • Added GitHub Actions CI workflow for gtest.
  • build/_deps/googletest-src/.gitignore
    • Added git ignore file for googletest source.
  • build/_deps/googletest-src/BUILD.bazel
    • Added Bazel build file for googletest.
  • build/_deps/googletest-src/CMakeLists.txt
    • Added CMakeLists.txt for googletest.
  • build/_deps/googletest-src/CONTRIBUTING.md
    • Added contributing guidelines for googletest.
  • build/_deps/googletest-src/CONTRIBUTORS
    • Added list of contributors for googletest.
  • build/_deps/googletest-src/LICENSE
    • Added license file for googletest.
  • build/_deps/googletest-src/README.md
    • Added README for googletest.
  • build/_deps/googletest-src/WORKSPACE
    • Added Bazel WORKSPACE file for googletest.
  • build/_deps/googletest-src/ci/linux-presubmit.sh
    • Added Linux presubmit script for googletest.
  • build/_deps/googletest-src/ci/macos-presubmit.sh
    • Added macOS presubmit script for googletest.
  • build/_deps/googletest-src/ci/windows-presubmit.bat
    • Added Windows presubmit script for googletest.
  • build/_deps/googletest-src/docs/_config.yml
    • Added Jekyll configuration for docs.
  • build/_deps/googletest-src/docs/_data/navigation.yml
    • Added navigation data for docs.
  • build/_deps/googletest-src/docs/_layouts/default.html
    • Added default layout for docs.
  • build/_deps/googletest-src/docs/_sass/main.scss
    • Added main SASS stylesheet for docs.
Activity
  • The pull request was created by heidi-dang.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces several new core components and updates the daemon's source structure, including the addition of an async collector and manifest handling. However, there are a few significant issues: build artifacts and dependency sources have been committed to the repository, which should be avoided. Additionally, the CMakeLists.txt configuration duplicates source files across targets and appears to be missing critical link dependencies for the unit tests, which will likely lead to build failures.

@@ -0,0 +1,592 @@
# This is the CMakeCache file.

Choose a reason for hiding this comment

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

high

Build artifacts and generated files should not be committed to the repository. These files are specific to the local environment where the build was run and clutter the pull request. Please remove the build/ directory and ensure it is ignored via your .gitignore file.


target_include_directories(cpp_core_tests PRIVATE heidi_engine/cpp)
target_link_libraries(cpp_core_tests PRIVATE gtest gtest_main crypto pthread)
target_link_libraries(cpp_core_tests PRIVATE gtest_main crypto pthread heidi-metrics heidi-kernel-governor)

Choose a reason for hiding this comment

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

high

The cpp_core_tests target is missing heidi-kernel-lib and z in its link libraries, which are required by the core logic now included in the test target. Additionally, gtest was removed from the link list; it should likely be retained alongside gtest_main to ensure all necessary symbols are available.

target_link_libraries(cpp_core_tests PRIVATE gtest gtest_main crypto pthread heidi-metrics heidi-kernel-governor heidi-kernel-lib z)

Comment on lines +20 to +29
heidi_engine/cpp/core/core.cpp
heidi_engine/cpp/core/clock.cpp
heidi_engine/cpp/core/config.cpp
heidi_engine/cpp/core/journal_writer.cpp
heidi_engine/cpp/core/run_id.cpp
heidi_engine/cpp/core/status_writer.cpp
heidi_engine/cpp/core/subprocess.cpp
heidi_engine/cpp/core/mock_provider.cpp
heidi_engine/cpp/core/async_collector.cpp
heidi_engine/cpp/core/manifest.cpp

Choose a reason for hiding this comment

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

medium

The core source files are listed directly in the heidid executable and duplicated in the cpp_core_tests target. This approach is error-prone and increases maintenance overhead.

Improvement: Refactor these core components into a static library target. This allows you to define the source list once and link it into both the daemon and the test suite, ensuring consistency and potentially speeding up the build process.

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