test(kernel): hand-level skills propagation regression for #3135#3163
Merged
Conversation
The merge logic in `activate_hand_with_id` (mod.rs:9057-9085) was added in #2133 but had no regression test, which is part of why issue #3135 was filed weeks later — reading the code paths around `sorted_enabled_skills` it looks like the empty-list "unrestricted" fallthrough is broken, when in fact the upstream merge has already populated the list correctly. Two tests pin down the contract end-to-end via `hand_registry.install_from_content` + `activate_hand`: - `test_hand_skills_propagate_to_derived_agent_manifest`: hand `skills = ["alpha","beta"]`, worker has no `skills` field → expect derived agent inherits the full list. - `test_hand_skills_intersect_per_role_overrides`: hand `skills = ["alpha","beta","gamma"]`, worker `skills = ["alpha","delta"]` → expect intersection `["alpha"]`. Together they cover the two non-trivial branches of the merge and will fail loudly if the propagation regresses or a new activation path bypasses it.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the regression test I promised in #3135 — verifies that hand-level
skills = [...]propagates into derived per-roleAgentManifest.skills, both for the inheritance branch (agent has noskillsfield) and the intersection branch (agent has its own list).The propagation logic lives in
activate_hand_with_idatkernel/mod.rs:9057-9085(added by #2133). Two assertions:test_hand_skills_propagate_to_derived_agent_manifest— hand declaresskills = ["alpha", "beta"], worker has noskillsfield, expect derived agent to inherit["alpha", "beta"].test_hand_skills_intersect_per_role_overrides— hand allows["alpha", "beta", "gamma"], worker independently lists["alpha", "delta"], expect intersection["alpha"].If CI passes both, that confirms the fix in #2133 is intact on
mainand the original report was either (a) against a build predating that PR or (b) a different propagation path we haven't characterised yet. Either way the contract is now CI-enforced so it can't silently regress.Closes #3135 if CI is green.