While working with Costco Wholesale Corp. on a wage-and-hour issue nine years ago, Los Angeles attorney Kelly Hensley put together a 22-page opinion letter containing legal advice and factual information gleaned from two company managers.

Little did the Sheppard, Mullin, Richter & Hampton partner realize that letter would result in a years-long battle over attorney-client privilege — one that Wednesday goes before the California Supreme Court during oral arguments in San Francisco.