SessionContextPlugin (https://github.com/fuseraft/fuseraft-cli/blob/main/src/Infrastructure/Plugins/SessionContextPlugin.cs) has no test file — there is no SessionContextPluginTests.cs under tests/FuseraftCli.Tests/.
It's a small read/write handoff-notes plugin backed by a single plain-text file, with a character-count truncation cap (maxChars, default 8,000). It's the simplest of the untested plugins in src/Infrastructure/Plugins/ — no manager/store dependency, just a file path — so it's a good entry point for a first PR.
Good first areas to cover:
ReadAsync when the file doesn't exist yet returns the "no session context summary yet" info message
ReadAsync on an empty file returns "Session context summary is empty."
WriteAsync then ReadAsync round-trips the trimmed summary text
WriteAsync rejects an empty/whitespace-only summary (PluginResult.Error)
WriteAsync creates the parent directory if it doesn't exist yet
ReadAsync truncates content longer than maxChars and appends the "[session context truncated — N chars omitted...]" note, using the exact omitted-char count
- Passing
maxChars: 0 disables truncation even for long content
SelfPluginTests.cs or ArtifactPluginTests.cs (in the same tests/FuseraftCli.Tests/ directory) are good references for testing a small file-backed plugin like this one.
SessionContextPlugin(https://github.com/fuseraft/fuseraft-cli/blob/main/src/Infrastructure/Plugins/SessionContextPlugin.cs) has no test file — there is noSessionContextPluginTests.csundertests/FuseraftCli.Tests/.It's a small read/write handoff-notes plugin backed by a single plain-text file, with a character-count truncation cap (
maxChars, default 8,000). It's the simplest of the untested plugins insrc/Infrastructure/Plugins/— no manager/store dependency, just a file path — so it's a good entry point for a first PR.Good first areas to cover:
ReadAsyncwhen the file doesn't exist yet returns the "no session context summary yet" info messageReadAsyncon an empty file returns "Session context summary is empty."WriteAsyncthenReadAsyncround-trips the trimmed summary textWriteAsyncrejects an empty/whitespace-only summary (PluginResult.Error)WriteAsynccreates the parent directory if it doesn't exist yetReadAsynctruncates content longer thanmaxCharsand appends the "[session context truncated — N chars omitted...]" note, using the exact omitted-char countmaxChars: 0disables truncation even for long contentSelfPluginTests.csorArtifactPluginTests.cs(in the sametests/FuseraftCli.Tests/directory) are good references for testing a small file-backed plugin like this one.