Skip to content

Tag-based SGP interaction - #309

Draft
K-Johnson-Horrigan wants to merge 12 commits into
anyaevostinar:mainfrom
K-Johnson-Horrigan:main
Draft

Tag-based SGP interaction#309
K-Johnson-Horrigan wants to merge 12 commits into
anyaevostinar:mainfrom
K-Johnson-Horrigan:main

Conversation

@K-Johnson-Horrigan

@K-Johnson-Horrigan K-Johnson-Horrigan commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

This PR renames TASK_PROFILE_COMPATIBILITY_MODE to INTERACTION_PROFILE_COMPATIBILITY_MODE and implements a wrapper function that allows tags to be used for interaction. However, tags cannot be used for horizontal transmission, and thus the horizontal transmission settings automatically pass when tag matching is on in SGP. Maybe worth keeping both the old TASK_PROFILE_COMPATIBILITY_MODE option and the new INTERACTION_PROFILE_COMPATIBILITY_MODE option, for backcompatibility/task based horizontal transmission; however, that would contribute to config bloat.

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.81633% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.44%. Comparing base (3f9443f) to head (2fe2007).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
source/sgp_mode/SGPW_TaskProfileSetup.cc 83.33% 5 Missing ⚠️
source/sgp_mode/SGPW_InteractionMechanismSetup.cc 55.55% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
+ Coverage   77.07%   77.44%   +0.37%     
==========================================
  Files         108      109       +1     
  Lines       23154    23211      +57     
  Branches     1615     1626      +11     
==========================================
+ Hits        17845    17975     +130     
+ Misses       5238     5165      -73     
  Partials       71       71              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@K-Johnson-Horrigan
K-Johnson-Horrigan marked this pull request as ready for review July 13, 2026 19:23
VALUE(TASK_PROFILE_COMPATIBILITY_MODE, std::string, "always", "How is compatibility determined for task profiles? always, task-any-match, task-perfect-match"),
VALUE(HORIZONTAL_TRANSMISSION_COMPATIBILITY_MODE, std::string, "always", "How is compatibility determined for horizontal transmission? Relies on TASK_PROFILE_COMPATIBILITY_MODE being set appropriately. Options are: always, task-profile-compatible, task-profile-strictly-stronger-match, task-profile-stronger-or-equal-match"),
VALUE(INTERACTION_PROFILE_COMPATIBILITY_MODE, std::string, "always", "How is compatibility determined for task profiles? always, task-any-match, task-perfect-match, tag-probabilistic-match"),
VALUE(HORIZONTAL_TRANSMISSION_COMPATIBILITY_MODE, std::string, "always", "How is compatibility determined for horizontal transmission? Relies on INTERACTION_PROFILE_COMPATIBILITY_MODE being set appropriately. Options are: always, task-profile-compatible, task-profile-strictly-stronger-match, task-profile-stronger-or-equal-match"),

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Should the options change "interaction-profile-compatible" etc?

}
}

void SGPWorld::SetupInteractionCompatibilityMode() {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

More complete docstring needed

return a == b;
};
} else if(sgp_config.INTERACTION_PROFILE_COMPATIBILITY_MODE() == "tag-probabilistic-match"){
fun_task_profile_compatibility_check = [this](

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This feels risky since it seems like we might use task_profile compatibility in some way even when the interaction is based on tags, which I guess would mean we want a separate config for task compatibility still

@@ -26,8 +26,8 @@ EMP_EXTEND_CONFIG(SymConfigSGP, SymConfigBase,
VALUE(INTERACTION_MECHANISM, std::string, "default", "What sgp organisms should population the world? (Options: 'default')"),
VALUE(VT_TASK_MATCH, bool, false, "Should task matching be required for vertical transmission? (0 for no, 1 for yes)"),
VALUE(TASK_PROFILE_MODE, std::string, "self-all", "What should we use for task profiles for host-symbiont compatibility, preferential ousting, etc.? Options are parent-all, self-all, self-first, parent-first. 'all' means all tasks, 'first' means only first task performed."),

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

How does task_profile mode interact with interaction profile compatbility when it's tag based? I think we need to think about this system overall a bit more to try to make this intuitive, oof

@K-Johnson-Horrigan
K-Johnson-Horrigan marked this pull request as draft July 16, 2026 15:39
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