Audit baseline: aa595438650cfbaa6db310792929c6219cc003b2 (origin/main at audit start).
Problem
Advisor answer caching hashes model, question, and context inputs but omits scope, even though scope changes the generated prompt. Identical questions asked under architecture/security/etc. can return a cached answer generated for the wrong scope.
Acceptance criteria
- Include normalized scope and every prompt-affecting option in a versioned cache key.
- Different scopes miss; identical complete requests hit.
- Namespace/invalidate legacy unscoped entries.
- Add regression tests with
includeRecentWork: false for deterministic isolation.
Audit baseline:
aa595438650cfbaa6db310792929c6219cc003b2(origin/mainat audit start).Problem
Advisor answer caching hashes model, question, and context inputs but omits
scope, even though scope changes the generated prompt. Identical questions asked under architecture/security/etc. can return a cached answer generated for the wrong scope.Acceptance criteria
includeRecentWork: falsefor deterministic isolation.