Skip to content

Fix CMake build errors due to missing example sources#511

Merged
t81dev merged 2 commits intomainfrom
fix-ci-build-errors-10346536587589323505
Apr 1, 2026
Merged

Fix CMake build errors due to missing example sources#511
t81dev merged 2 commits intomainfrom
fix-ci-build-errors-10346536587589323505

Conversation

@t81dev
Copy link
Copy Markdown
Owner

@t81dev t81dev commented Apr 1, 2026

Fix CMake build errors due to missing example sources

The examples/ directory was reorganized but CMakeLists.txt
was not updated, causing CI build errors when trying to find
source files like examples/demo.cpp.

This commit updates all paths inside CMakeLists.txt and
tests/cpp/cli_contract_test.cpp to correctly point to their
respective subdirectories such as ai-and-inference,
compiler-and-ffi, storage-and-canonfs, core-language,
and governance.


PR created automatically by Jules for task 10346536587589323505 started by @t81dev

The `examples/` directory was reorganized but `CMakeLists.txt`
was not updated, causing CI build errors when trying to find
source files like `examples/demo.cpp`.

This commit updates all paths inside `CMakeLists.txt` and
`tests/cpp/cli_contract_test.cpp` to correctly point to their
respective subdirectories such as `ai-and-inference`,
`compiler-and-ffi`, `storage-and-canonfs`, `core-language`,
and `governance`.

Co-authored-by: t81dev <207451414+t81dev@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 15f1c611c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread build.log
@@ -0,0 +1,1180 @@
ninja: Entering directory `build'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Drop transient CI logs from tracked sources

build.log/ctest.log are generated artifacts from a single local run, including environment-specific paths and stale test output, so checking them into the repo adds large non-source churn and makes future diffs/triage noisier without improving reproducibility. These files should be excluded from commits and kept as CI artifacts instead.

Useful? React with 👍 / 👎.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 1, 2026

Greptile Summary

This PR fixes CMake build errors caused by an examples/ directory reorganization that wasn't reflected in CMakeLists.txt or test paths. The code changes themselves are correct and complete: all 18 example source paths in CMakeLists.txt and the two hello_world.t81 references in tests/cpp/cli_contract_test.cpp have been correctly updated to their new subdirectory locations (ai-and-inference, compiler-and-ffi, storage-and-canonfs, core-language, governance), and every new path has been verified to exist in the repository.

However, the PR also commits two build artifacts that do not belong in source control:

  • build.log — a 1,106-step CI build log containing environment-specific absolute paths. This is a generated artifact that will immediately become stale and should be removed.
  • ctest.log — a test execution log that was captured mid-fix (after updating CMakeLists.txt but before updating cli_contract_test.cpp). It records one test failure (t81_cli_contract_test_runner) using the old examples/hello_world.t81 path, which is the exact failure that the cli_contract_test.cpp change in this PR resolves. This makes the log misleading as evidence of test status.

Both files should be removed from this PR and added to .gitignore to prevent recurrence.

Confidence Score: 4/5

  • Safe to merge once build.log and ctest.log are removed; all source code changes are correct.
  • The CMakeLists.txt and cli_contract_test.cpp changes are correct and verified. Score is 4 rather than 5 because two build artifacts (build.log and ctest.log) are being committed to the repository, which is a real quality issue — the ctest.log in particular represents a mid-fix broken state and should not be part of the permanent git history.
  • build.log and ctest.log — both are generated artifacts that should be removed and added to .gitignore.

Important Files Changed

Filename Overview
CMakeLists.txt Correctly updates 18 example source paths to match the reorganized examples/ subdirectory structure; all new paths verified to exist on disk.
tests/cpp/cli_contract_test.cpp Updates two references to hello_world.t81 from examples/ to examples/core-language/; file confirmed to exist at the new location.
build.log Build artifact (1106-step build log) committed to source control — should not be in the repository.
ctest.log CTest artifact committed to source control, captured mid-fix showing one failing test (t81_cli_contract_test_runner) using the old hello_world.t81 path — misleading and should not be in the repository.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[examples/ directory reorganized] --> B{CMakeLists.txt updated}
    A --> C{tests/cpp/cli_contract_test.cpp updated}

    B --> B1[compiler-and-ffi/\ndemo.cpp\nir_roundtrip.cpp\ncomplex_demo.cpp]
    B --> B2[ai-and-inference/\ntensor_ops.cpp\nmodel-load-canonfs/*.cpp\nai-integration/*.cpp]
    B --> B3[governance/\naxion_demo.cpp\naxion_guard_trace.cpp\naxion_policy_*.cpp\ngovernance-demo/*.cpp]
    B --> B4[storage-and-canonfs/\ncanonfs_trace_demo.cpp]

    C --> C1[examples/core-language/\nhello_world.t81\n×2 references]

    B1 & B2 & B3 & B4 --> OK[✅ Build succeeds]
    C1 --> T[✅ t81_cli_contract_test_runner\nshould now pass]

    style OK fill:#2d6a2d,color:#fff
    style T fill:#2d6a2d,color:#fff
Loading

Reviews (1): Last reviewed commit: "Fix CMake build errors due to missing ex..." | Re-trigger Greptile

Comment thread build.log
@@ -0,0 +1,1180 @@
ninja: Entering directory `build'
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Build artifacts committed to the repository

build.log and ctest.log are generated build artifacts and should not be committed to the repository. They are:

  • environment-specific (contain absolute CI paths like /app/...)
  • regenerated on every build, so they become stale instantly
  • permanently embedded in git history, inflating repository size

These files should be added to .gitignore. Currently the .gitignore only covers pdf/*.log, leaving root-level logs unprotected. Both files should be removed from this PR and .gitignore should be updated:

# Build and CI artifacts
build.log
ctest.log
*.log

Comment thread ctest.log
201/409 Test #204: t81_limb_bohemian_add_test ..................................... Passed 0.01 sec
Start 205: t81_limb_bohemian_mul_test
202/409 Test #205: t81_limb_bohemian_mul_test ..................................... Passed 0.07 sec
Start 206: t81_limb_booth_mul_test
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Committed test log represents an intermediate broken state

This ctest.log was captured after fixing CMakeLists.txt but before fixing tests/cpp/cli_contract_test.cpp. The log shows the failing test using the old path:

[cli] /app/build/t81 internal memory-stats /app/examples/hello_world.t81
test check failed: (memory_stats_result.exit_code == 0) at /app/tests/cpp/cli_contract_test.cpp:1694

The failure occurs because hello_world.t81 no longer exists at the root examples/ directory — it was moved to examples/core-language/. The cli_contract_test.cpp fix in this same PR updates that path, but the log was generated before that fix was applied.

This means the committed log documents a failure that the PR itself resolves, which is misleading. Reviewers cannot use this log as evidence that tests pass after the full set of changes in this PR is applied. The log should be removed from the PR entirely.

The previous commit introduced changes to path layouts. This commit fixes
remaining CI failures:
- Run `clang-format` on `tests/cpp/cli_contract_test.cpp` to resolve formatting check failure.
- Fix broken links in `docs/status/AI_CLI_IMPLEMENTATION_MATRIX.md` and `docs/status/AI_CLI_MILESTONE_EVIDENCE.md` pointing to moved example shell scripts.
- Add `Determinism Surface Registry` to determinism claims in `README.md` to satisfy the `check_determinism_claims.py` CI script.
- Remove invalid link to `docs/glossary.md` in `README.md`.

Co-authored-by: t81dev <207451414+t81dev@users.noreply.github.com>
@t81dev t81dev merged commit d5db886 into main Apr 1, 2026
28 of 29 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