You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reject malformed optional VCS operation hooks during extension registration #763
Extension VCS registration validates that an operation's load field is callable, but does not validate the optional watchSignature and watchPlan hooks.
An untyped extension can therefore register an operation such as:
{load: async()=>result,watchSignature: "not a function",}
Registration accepts the operation. Watch planning later attempts to invoke the truthy value and fails with a delayed TypeError rather than reporting a registration problem.
The current conversion also widens every key-specific operation through ExtensionVcsOperation<VcsReviewInput>, erasing the relationship between the operation key and its input type.
Proposed direction
Require watchSignature and watchPlan to be absent or callable during registration.
Normalize only the known VCS operation keys into VcsOperations.
Preserve each key's input type through an explicit switch or key-preserving converter rather than widening handlers to the full input union.
Continue dropping malformed operations so callers receive the existing unsupported-operation behavior.
Acceptance criteria
Registration rejects or drops an operation with a non-callable watchSignature.
Registration rejects or drops an operation with a non-callable watchPlan.
Valid optional hooks continue to run through the existing error normalization.
Unknown operation keys do not enter the internal operation map.
Add adversarial extension robustness tests for malformed optional hooks.
Activity