@@ -55,9 +55,14 @@ type ConformedRuntimeBinding = Readonly<{
5555 /**
5656 * A plan route admits several declared cells in order; name the one this table refuses on and
5757 * the ones the plan admits before reaching it. A single-use route derives its one cell from the
58- * command registry instead.
58+ * command registry instead. A route variant that shares another command's descriptor (its own
59+ * key is not a registry name) names that command here.
5960 */
60- plan ?: Readonly < { refused : RuntimeOperation ; admitted : readonly RuntimeOperation [ ] } > ;
61+ plan ?: Readonly < {
62+ refused : RuntimeOperation ;
63+ admitted : readonly RuntimeOperation [ ] ;
64+ command ?: string ;
65+ } > ;
6166} > ;
6267
6368const available = Object . freeze ( { available : true } as const ) ;
@@ -139,6 +144,19 @@ export const conformedRuntimeBindings = {
139144 } ) ,
140145 ) ,
141146 } ,
147+ // The `auto` argument is its own admission cell (`unlockOrientation`) on the `orientation`
148+ // descriptor, so it owes its own refusal row across every conformance device.
149+ 'orientation auto' : {
150+ plan : { refused : 'unlockOrientation' , admitted : [ ] , command : 'orientation' } ,
151+ resolve : async ( device , bindings ) =>
152+ refusable (
153+ await resolveBoundOrientationRuntime ( {
154+ device,
155+ positionals : [ 'auto' ] ,
156+ ...bindings ,
157+ } ) ,
158+ ) ,
159+ } ,
142160 'tv-remote' : {
143161 resolve : async ( device , bindings ) =>
144162 refusable ( await resolveBoundTvRemoteRuntime ( { device, positionals : [ 'down' ] , ...bindings } ) ) ,
@@ -188,7 +206,7 @@ export type ConformedRuntimeCommand = keyof typeof conformedRuntimeBindings;
188206export function refusedRuntimeOperation ( command : ConformedRuntimeCommand ) : RuntimeOperation {
189207 const binding : ConformedRuntimeBinding = conformedRuntimeBindings [ command ] ;
190208 if ( binding . plan ) return binding . plan . refused ;
191- const uses = commandRuntimeUseRequirements ( command ) ;
209+ const uses = commandRuntimeUseRequirements ( registryCommandOf ( command ) ) ;
192210 const required = uses ?. length === 1 ? uses [ 0 ] : undefined ;
193211 if ( required ?. length !== 1 ) {
194212 throw new Error (
@@ -198,6 +216,12 @@ export function refusedRuntimeOperation(command: ConformedRuntimeCommand): Runti
198216 return required [ 0 ] as RuntimeOperation ;
199217}
200218
219+ /** The registry command one conformance key resolves to; a route variant names its own. */
220+ export function registryCommandOf ( command : ConformedRuntimeCommand ) : string {
221+ const binding : ConformedRuntimeBinding = conformedRuntimeBindings [ command ] ;
222+ return binding . plan ?. command ?? command ;
223+ }
224+
201225export type UnavailableExactOwnerFactCase = Readonly < {
202226 command : ConformedRuntimeCommand ;
203227 device : DeviceInfo ;
0 commit comments