Skip to content

test(kernel): hand-level skills propagation regression for #3135#3163

Merged
houko merged 1 commit into
mainfrom
fix/hand-skills-regression-test
Apr 25, 2026
Merged

test(kernel): hand-level skills propagation regression for #3135#3163
houko merged 1 commit into
mainfrom
fix/hand-skills-regression-test

Conversation

@houko

@houko houko commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Adds the regression test I promised in #3135 — verifies that hand-level skills = [...] propagates into derived per-role AgentManifest.skills, both for the inheritance branch (agent has no skills field) and the intersection branch (agent has its own list).

The propagation logic lives in activate_hand_with_id at kernel/mod.rs:9057-9085 (added by #2133). Two assertions:

  1. test_hand_skills_propagate_to_derived_agent_manifest — hand declares skills = ["alpha", "beta"], worker has no skills field, expect derived agent to inherit ["alpha", "beta"].
  2. 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 main and 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.

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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions Bot added area/kernel Core kernel (scheduling, RBAC, workflows) ready-for-review PR is ready for maintainer review labels Apr 25, 2026
@houko
houko merged commit 53dde25 into main Apr 25, 2026
22 checks passed
@houko
houko deleted the fix/hand-skills-regression-test branch April 25, 2026 15:53
@github-actions github-actions Bot added size/M 50-249 lines changed and removed ready-for-review PR is ready for maintainer review labels Apr 25, 2026
@houko houko mentioned this pull request Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/kernel Core kernel (scheduling, RBAC, workflows) size/M 50-249 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hand-level skills allowlist does not propagate to per-role agent manifests

1 participant