fix(core): log internal OpenAI JSON requests#4081
Conversation
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
fe89404 to
d3fe53a
Compare
d3fe53a to
3cd88e3
Compare
Review —
|
wenshao
left a comment
There was a problem hiding this comment.
LGTM — full review in the comment above (#4081 (comment)). Fix is narrowly scoped: internal prompts stay suppressed in UI-visible paths (logApiRequest, response_text, chatRecordingService) and are only re-enabled in the opt-in OpenAI JSON file sink, with a sanitized filename tag for traceability. Sanitization, chronological sort, and the safelyLogOpenAIInteraction error envelope are all correctly preserved. Tests cover both generateContent and generateContentStream across all four internal prompt id shapes. Non-blocking nits: doc note on model.enableOpenAILogging and the → test variable rename can land in a follow-up.
wenshao
left a comment
There was a problem hiding this comment.
LGTM — full review in the comment above (#4081 (comment)). Fix is narrowly scoped: internal prompts stay suppressed in UI-visible paths (logApiRequest, response_text, chatRecordingService) and are only re-enabled in the opt-in OpenAI JSON file sink, with a sanitized filename tag for traceability. Sanitization, chronological sort, and the safelyLogOpenAIInteraction error envelope are all correctly preserved. Tests cover both generateContent and generateContentStream across all four internal prompt id shapes. Non-blocking nits: doc note on model.enableOpenAILogging and the options → loggedPromptId test variable rename can land in a follow-up.
Superseded by the corrected approval just below — first body had backticks stripped by shell parsing.
* fix(core): log internal OpenAI JSON requests * fix(core): avoid duplicate OpenAI log metadata
* fix(core): log internal OpenAI JSON requests * fix(core): avoid duplicate OpenAI log metadata
Summary
/rename --autoharder to debug without improving UI privacy.Validation
cd packages/core && npx vitest run src/utils/openaiLogger.test.ts src/core/loggingContentGenerator/loggingContentGenerator.test.ts;npm run build && npm run typecheck;git diff --checkScope / Risk
Testing Matrix
Testing matrix notes:
Linked Issues / Bugs