Skip to content

Let screen return casefile JSON without writing a case directory - #10

Merged
samrusani merged 1 commit into
mainfrom
screen-no-write
Aug 19, 2026
Merged

Let screen return casefile JSON without writing a case directory#10
samrusani merged 1 commit into
mainfrom
screen-no-write

Conversation

@samrusani

@samrusani samrusani commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • coldscreen screen ... --no-write (and MCP no_write) skips the case directory for that run only: no mkdir, no memo, no casefile, no evidence.
  • CLI --no-write prints the casefile JSON to stdout the same way --json does. The HTTP cache still stores 200s. --overwrite --no-write does not delete an existing directory. rerun did not grow the flag.
  • Default persist path is unchanged. Findings, language control, and verdict enforcement still run in memory.

Test plan

  • uv run pytest (744 passed)
  • uv run ruff check . / ruff format --check .
  • uv run mypy
  • uv run python scripts/check_language.py
  • CI checks 3.11 / 3.12 / 3.13, package, and audit

Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds an explicit no-persistence mode while preserving the default audit-pack behavior and HTTP caching.

  • Adds CLI --no-write support that emits casefile JSON without creating or modifying a case directory.
  • Adds MCP no_write support with a null case_dir and an in-memory memo and verdict.
  • Updates pipeline persistence gating, tests, architecture, operational guidance, and privacy documentation.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or non-blocking defects identified.

The no-write flag is propagated consistently through CLI and MCP entry points, skips every case-directory mutation, preserves HTTP caching, and leaves the existing persistence path unchanged.

Important Files Changed

Filename Overview
src/coldscreen/pipeline.py Adds a keyword-only no-write mode that bypasses overwrite checks and case persistence while retaining the complete in-memory screening pipeline.
src/coldscreen/cli.py Exposes --no-write, emits casefile JSON once, and reports persistence and failure status through stderr appropriately.
src/coldscreen/mcp_server.py Adds the no_write tool argument and returns successful no-write results with a null case_dir.
tests/test_cli.py Covers JSON output, absent and existing case directories, overwrite interaction, help text, and continued HTTP caching.
tests/test_mcp_server.py Covers the expanded MCP schema and successful no-write payload without case-directory creation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[CLI or MCP screen request] --> B[Run screening pipeline]
    B --> C[Build casefile and memo in memory]
    C --> D{no_write?}
    D -- Yes --> E[Skip case-directory persistence]
    E --> F[Return casefile, memo, verdict, and null case_dir]
    D -- No --> G[Write memo, casefile, and evidence]
    G --> H[Return persisted case directory]
    B --> I[HTTP cache reads and successful writes]
    I --> C
Loading

Reviews (1): Last reviewed commit: "Let screen return casefile JSON without ..." | Re-trigger Greptile

@samrusani
samrusani merged commit 5fc3506 into main Aug 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant