Skip to content

fix(actions): generate unique tags for each action instance (#59) - #126

Open
MohamedRady-99 wants to merge 1 commit into
eclipse-score:mainfrom
Valeo-S-CORE-Organization:fix/action-ids-uniqueness
Open

fix(actions): generate unique tags for each action instance (#59)#126
MohamedRady-99 wants to merge 1 commit into
eclipse-score:mainfrom
Valeo-S-CORE-Organization:fix/action-ids-uniqueness

Conversation

@MohamedRady-99

Copy link
Copy Markdown
Contributor

Notes for Reviewer

This PR resolves the issue where all actions of the same type (e.g., Sequence, Concurrency, Graph) share the same Tag ID when printing the program
representation #59.

Since every instance of a given action type initialized its ActionBaseMeta using a hardcoded static string (such as "orch::internal::sequence"), they
all computed the exact same Tag ID (via djb2 hash). This made different instances of the same action type indistinguishable in printed representations
and debugging logs.

Proposal:

Currently, actions share identical static tags. This PR updates the tag initialization logic as follows:

  • Centralized Unique Tag Generator: Added next_unique_action_tag(prefix: &str) in src/orchestration/src/actions/action.rs using a thread-safe
    AtomicUsize counter to append a unique incrementing suffix to each action instance's tag.
  • Update Core Actions: Updated builders and constructors across all core action types (Sequence, Concurrency, LocalGraphAction, Select, IfElseArc,
    IfElseArcMutex, Catch, Sync, Trigger) to use next_unique_action_tag.
  • Clean up Warnings: Removed now-unused Tag imports in sync.rs and trigger.rs to ensure a clean, warning-free build.
  • Add Unit Test: Added test_unique_tags_for_actions inside sequence.rs to assert that separate built actions have distinct, non-overlapping Tags.

Pre-Review Checklist for the PR Author

  • PR title is short, expressive and meaningful
  • Commits are properly organized
  • Relevant issues are linked in the References section
  • Tests are conducted
  • Unit tests are added

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  • All open points are addressed and tracked via issues

References

Closes #59

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.6.0) and connecting to it...
INFO: Invocation ID: 41fd5049-90d5-476e-9a14-be5836cef8f4
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
WARNING: For repository 'bazel_skylib', the root module requires module version bazel_skylib@1.7.1, but got bazel_skylib@1.8.2 in the resolved dependency graph. Please update the version in your MODULE.bazel or set --check_direct_dependencies=off
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 1 packages loaded
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (36 packages loaded, 9 targets configured)

Analyzing: target //:license-check (136 packages loaded, 783 targets configured)

Analyzing: target //:license-check (146 packages loaded, 2546 targets configured)

Analyzing: target //:license-check (151 packages loaded, 3436 targets configured)

Analyzing: target //:license-check (158 packages loaded, 3496 targets configured)

Analyzing: target //:license-check (158 packages loaded, 3496 targets configured)

Analyzing: target //:license-check (158 packages loaded, 3496 targets configured)

Analyzing: target //:license-check (161 packages loaded, 5385 targets configured)

Analyzing: target //:license-check (161 packages loaded, 5385 targets configured)

Analyzing: target //:license-check (162 packages loaded, 5509 targets configured)

Analyzing: target //:license-check (163 packages loaded, 5635 targets configured)

Analyzing: target //:license-check (189 packages loaded, 5721 targets configured)
[13 / 17] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox
INFO: From Generating Dash formatted dependency file ...:
INFO: Successfully converted 141 packages from Cargo.lock to bazel-out/k8-fastbuild/bin/formatted.txt
Analyzing: target //:license-check (189 packages loaded, 5721 targets configured)
[14 / 17] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 1s disk-cache, processwrapper-sandbox
Analyzing: target //:license-check (189 packages loaded, 5721 targets configured)
[15 / 17] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
Analyzing: target //:license-check (189 packages loaded, 5721 targets configured)
[16 / 17] Building license.check.license_check.jar (); 0s disk-cache, multiplex-worker
Analyzing: target //:license-check (189 packages loaded, 5721 targets configured)
[17 / 17] no actions running
Analyzing: target //:license-check (190 packages loaded, 10055 targets configured)
[17 / 17] no actions running
Analyzing: target //:license-check (190 packages loaded, 10055 targets configured)
[17 / 17] no actions running
Analyzing: target //:license-check (190 packages loaded, 10055 targets configured)
[17 / 17] no actions running
Analyzing: target //:license-check (190 packages loaded, 10055 targets configured)
[17 / 17] no actions running
Analyzing: target //:license-check (190 packages loaded, 10055 targets configured)
[17 / 17] no actions running
Analyzing: target //:license-check (190 packages loaded, 10055 targets configured)
[17 / 17] no actions running
INFO: Analyzed target //:license-check (192 packages loaded, 10169 targets configured).
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 42.216s, Critical Path: 3.84s
INFO: 17 processes: 12 internal, 4 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 17 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Bug: Actions share the same ID

1 participant