Repository navigation
refactor(requirements): collapse single-use evaluation helpers - #129753
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 11:10 PM ET / August 26, 2026, 03:10 UTC. ClawSweeper reviewWhat this changesThe PR collapses private binary, platform, environment, and config requirement helpers into the exported evaluator used by skill and hook status flows. Merge readinessNo blocking findings: the refactor preserves the shared evaluator’s decision order and result contract, while current main still contains the older helper split. Keep this maintainer-labeled PR open for normal exact-head CI and maintainer handling. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherSkill and hook metadata is evaluated against local and optional remote capabilities by one shared requirements owner. Its availability result feeds status reports that explain whether each entry can load or run. flowchart LR
A[Skill metadata] --> C[Shared requirements evaluator]
B[Hook metadata] --> C
D[Local capabilities] --> C
E[Remote capabilities] --> C
C --> F[Eligibility and diagnostics]
F --> G[Skill status]
F --> H[Hook status]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -132. Total -132 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep one exported requirements evaluator as the canonical path, with the existing boundary tests protecting remote capability handling and the Do we have a high-confidence way to reproduce the issue? Not applicable: this is a behavior-preserving refactor, and current source plus existing tests define the evaluated contract. Is this the best way to solve the issue? Yes: integrating single-use private logic into the existing canonical evaluator removes indirection without introducing a parallel path or changing callers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 03262dfb0497. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
19a66f1 to
bf2ef7c
Compare
|
Merged via squash.
|
What Problem This Solves
Skill and hook eligibility share one requirements evaluator, but its actual decision path was spread across seven single-use private helpers and a redundant context type. That indirection made platform restrictions, remote binary checks, and the interaction between
alwaysand operating-system compatibility harder to inspect together.Why This Change Was Made
Collapse normalization and capability evaluation into the existing canonical requirements owner while preserving its exported types, evaluator signature, result shape, callback ordering, and remote-execution behavior. The earlier helper privatization in #106837 makes these removals internal; the compatibility invariant established in #123731 remains explicit:
alwaysnever bypasses operating-system requirements.User Impact
No user-visible behavior changes. Skills and hooks retain identical local and remote binary detection, any-binary groups, platform aliases, environment/config diagnostics, and platform-incompatibility reporting. No CLI, configuration, Plugin SDK, or security contract changes.
Evidence
+49/-181(132 fewer lines) in one owner module; tests unchanged.node scripts/run-vitest.mjs src/shared/requirements.test.ts src/shared/entry-status.test.ts src/skills/discovery/status.test.ts src/skills/discovery/status-workspace.test.ts src/hooks/hooks-status.test.ts.node scripts/check-changed.mjs --base 0036788055b5631f95d5eaeff9a1ba684fd78bb3.always/OS invariant.