fix: complete SubsystemLogger mock in directive-tags test#23479
Closed
YuzuruS wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix: complete SubsystemLogger mock in directive-tags test#23479YuzuruS wants to merge 1 commit intoopenclaw:mainfrom
YuzuruS wants to merge 1 commit intoopenclaw:mainfrom
Conversation
The `logGateway` mock in `chat.directive-tags.test.ts` only provided `warn` and `debug`, but `SubsystemLogger` requires all log-level methods plus `subsystem`, `isEnabled`, `raw`, and `child`. This caused a TS2352 type error in CI. Co-Authored-By: Claude Opus 4.6 <[email protected]>
18 tasks
Contributor
Author
|
Closing: the same issue was already fixed on main in 8e00965 (test: use real SubsystemLogger in directive-tags test), which uses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chat.directive-tags.test.tsfails CI with TS2352 type error —logGatewaymock only haswarnanddebug, butSubsystemLoggerrequires all log-level methodscheckjob (tsgo) on all open PRslogGatewaymock to include allSubsystemLoggermembers (subsystem,isEnabled,trace,info,error,fatal,raw,child)Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
None
Security Impact (required)
NoNoNoNoNoRepro + Verification
Environment
Steps
pnpm check(specificallypnpm tsgo)Expected
Actual
{ warn: Mock; debug: Mock }to typeSubsystemLoggermay be a mistakeEvidence
CI results:
pnpm check(format + tsgo + lint) passeschat.directive-tags.test.ts— 2/2 tests passHuman Verification (required)
pnpm checkpasses, test file runs and passesSubsystemLoggertype definition insrc/logging/subsystem.tsCompatibility / Migration
YesNoNoFailure Recovery (if this breaks)
src/gateway/server-methods/chat.directive-tags.test.tsRisks and Mitigations
None
🤖 Generated with Claude Code
Greptile Summary
Completed
logGatewaymock in test fixture to match all requiredSubsystemLoggerinterface members, fixing TS2352 type conversion error that was blocking CI. The mock now includes all log-level methods (trace,info,error,fatal), utility methods (raw,child), and properties (subsystem,isEnabled).Confidence Score: 5/5
isEnabledreturns a boolean as expected, andsubsystemis set to a test string. No production code changes and no risk of runtime issues.Last reviewed commit: 50ec1c9
(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!