Skip to content

refactor examples structure#14

Closed
saksham-chawla wants to merge 1 commit intocodex/replay-pr-153-basefrom
codex/replay-pr-153-head
Closed

refactor examples structure#14
saksham-chawla wants to merge 1 commit intocodex/replay-pr-153-basefrom
codex/replay-pr-153-head

Conversation

@saksham-chawla
Copy link
Collaborator

@saksham-chawla saksham-chawla commented Mar 18, 2026

  • link existing examples in /examples
  • add READMEs

Follow global module_template structure - examples should be in /examples.

Example from scrample repository is the same as ipc_bridge.

Closes: eclipse-score/score#2539


refactor examples structure

This pull request refactors the structure of examples by consolidating them into a dedicated /examples directory, aligning with a global module_template structure. It introduces a new BUILD file in /examples to create aliases for existing example targets and adds a comprehensive README.md to provide build and run instructions for the COM-API-Example and IPC Bridge applications. Additionally, the root README.md is updated to point to this new examples directory.


This summary was automatically generated by @propel-code-bot

- alias existing examples in `/examples`
- add README
@saksham-chawla saksham-chawla marked this pull request as draft March 18, 2026 09:49
@saksham-chawla saksham-chawla marked this pull request as ready for review March 18, 2026 18:41
Copy link

@propel-code-bot propel-code-bot bot left a comment

Choose a reason for hiding this comment

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

One documentation fix needed to correct example build command labels after refactor.

Status: Changes Suggested | Risk: Medium | Readiness: 7/10 (Mostly Ready)

Issues Identified & Suggestions
  • Update build command labels to use new aliases: examples/README.md
Review Details

📁 4 files reviewed | 💬 1 comments

👍 / 👎 individual comments to help improve reviews for you

Comment on lines +14 to +22
```bash
bazel build //examples/com-api-example:com-api-example
```

### QNX Cross-Compilation

```bash
bazel build --config=x86_64-qnx //examples/com-api-example:com-api-example
```

Choose a reason for hiding this comment

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

Important

[Documentation] The build commands documented here point to a package (//examples/com-api-example:com-api-example) that does not exist in this refactor. The aliases you added in examples/BUILD are exposed as //examples:com_api_example, so users who copy these commands will get no such package 'examples/com-api-example'. Update the host and QNX build instructions to use the alias label (or the original //score/... label) so the commands actually work, e.g.:

bazel build //examples:com_api_example
bazel build --config=x86_64-qnx //examples:com_api_example
Context for Agents
The build commands documented here point to a package (`//examples/com-api-example:com-api-example`) that does not exist in this refactor. The aliases you added in `examples/BUILD` are exposed as `//examples:com_api_example`, so users who copy these commands will get `no such package 'examples/com-api-example'`. Update the host and QNX build instructions to use the alias label (or the original `//score/...` label) so the commands actually work, e.g.:

```bash
bazel build //examples:com_api_example
bazel build --config=x86_64-qnx //examples:com_api_example
```

File: examples/README.md
Line: 22
Chain of Thought
  • Validation Decision: accepted
  • Confidence: 0.97
  • Likelihood Score: 5/5
  • Likelihood Reason: The Bazel package //examples/com-api-example does not exist (no BUILD file at that path). Any user copying the documented command will get an immediate build error.
  • Suggested Action: keep
  • Tool Calls Used: 5

Reasoning

The comment is accurate and actionable:

  1. The examples/BUILD file defines aliases: com_api_example//score/mw/com/example/com-api-example:com-api-example, ipc_bridge_cpp//score/mw/com/example/ipc_bridge:ipc_bridge_cpp, etc.

  2. There is no examples/com-api-example/BUILD file in the repository, so the Bazel package //examples/com-api-example does not exist.

  3. The README (lines 15, 21) documents bazel build //examples/com-api-example:com-api-example which will fail with "no such package".

  4. The correct command should be bazel build //examples:com_api_example (using the alias).

  5. Notably, the IPC Bridge section (lines 81, 87) correctly uses //examples:ipc_bridge_cpp, showing this is an inconsistency within the same new file.

  6. This is entirely new content introduced by this PR (the file was empty before), so this is clearly a PR-introduced issue.

The comment provides a specific fix with corrected commands. This is valid and actionable.

Evidence Summary

1. File Snapshot (HEAD)

  • File: examples/BUILD
1: # *******************************************************************************
2: # Copyright (c) 2026 Contributors to the Eclipse Foundation
3: #
4: # See the NOTICE file(s) distributed with this work for additional
5: # information regarding copyright ownership.
6: #
7: # This program and the accompanying materials are made available under the
8: # terms of the Apache License Version 2.0 which is available at
9: # https://www.apache.org/licenses/LICENSE-2.0
10: #
...

2. File Lookup

  • Filename: BUILD
  • Max Results: 10
Found 10 file(s) matching 'BUILD':
- bazel/rules/BUILD
- bazel/tools/BUILD
- BUILD
- quality/integration_testing/BUILD
- quality/integration_testing/environments/BUILD
- quality/integration_testing/environments/qnx8_qemu/BUILD
- quality/integration_testing/environments/ubuntu24_04_docker/BUILD
- quality/integration_testing/test/BUILD
- quality/sanitizer/BUILD
...

3. File Lookup

  • Filename: com-api-example
  • Max Results: 10
No files found matching 'com-api-example'

4. File Lookup

  • Filename: BUILD
  • Max Results: 10
Found 10 file(s) matching 'BUILD':
- bazel/rules/BUILD
- bazel/tools/BUILD
- BUILD
- quality/integration_testing/BUILD
- quality/integration_testing/environments/BUILD
- quality/integration_testing/environments/qnx8_qemu/BUILD
- quality/integration_testing/environments/ubuntu24_04_docker/BUILD
- quality/integration_testing/test/BUILD
- quality/sanitizer/BUILD
...

Fix in Cursor

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.

2 participants