test: cover list_sessions cwd privacy boundary#583
Draft
DeluxeRaph wants to merge 1 commit into
Draft
Conversation
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.
What changed
AppState::list_sessions_v1regression test that verifieslist_sessionsomits cwd-derived project metadata from both structured MCP output and rendered text.eventsrows withcwd = /work/acme-secret-merger, builds a realClickHouseConversationRepository, then calls the public MCP handler.Why
Fixes #580. The earlier coverage added
originator,origin_cwd, andprojectto the mocked repository response, but those fields are not part ofMcpSessionListItem, so the test could pass before the public MCP response path was meaningfully exercised.Validation
Passed locally:
Results:
moraine-mcp-core list_sessions_v1: 12 passed, 1 ignoredmoraine-conversations list_mcp_sessions: 4 passedNot run successfully yet:
MORAINE_ALLOW_DESTRUCTIVE_TESTS=1 \ MORAINE_BENCH_CLICKHOUSE_URL=http://clickhouse:8123 \ cargo test -p moraine-mcp-core live_public_list_sessions_omits_cwd_derived_metadata_from_structured_and_text_output --locked -- --ignored --exactI attempted to boot the Moraine sandbox after Docker was enabled, but the sandbox runtime image build hung during the
npm install -g @anthropic-ai/claude-code && claude --versionDockerfile layer before a sandbox container was created. No sandbox containers were left running.