Skip to content

release: v0.5.0 - #12

Closed
TARSDrakon wants to merge 1 commit into
mainfrom
loop/release-0.5.0
Closed

TARSDrakon wants to merge 1 commit into
mainfrom
loop/release-0.5.0

Conversation

@TARSDrakon

Copy link
Copy Markdown
Contributor

Release v0.5.0

Minor release. 0.4.0 is declared on main but was never tagged in this repository, so 0.5.0 also carries the 0.4.0 changes for anyone upgrading from 0.3.x (the CHANGELOG says so).

What's in 0.5.0 (from CHANGELOG)

  • New opt-in LangChain handler options (both default False, so default behaviour does not change):
    • fail_closed: with raise_on_block=True, a ShieldCortexError from a scan raises ContentBlockedError(result=None) with the original error as __cause__. Passing it without raise_on_block=True raises ValueError at construction.
    • block_on_quarantine: QUARANTINE is treated exactly like BLOCK.
  • Type-level change: ContentBlockedError.result is now typed ScanResult | None. It is None at runtime only with fail_closed=True, but strict type checkers will ask callers to narrow before reading error.result.
  • on_tool_end now scans structured tool outputs (ToolMessage content, content blocks, dicts) instead of skipping them.
  • Client path parameters are percent-encoded as a single URL segment. Empty, . and .. values raise ValueError before any request is sent.
  • Two Known limitations are documented: bare (non-chat) LLM calls served from the LangChain cache are not scanned, and with the async handler a sync-only tool under ainvoke is not stopped by BLOCK or by a fail_closed raise.

Files changed

  • pyproject.toml: version = "0.5.0"
  • src/shieldcortex/_version.py: __version__ = "0.5.0"
  • CHANGELOG.md: [Unreleased] renamed to 0.5.0 — 2026-10-17, with a summary paragraph and the 0.4.0-untagged note added and a fresh empty [Unreleased] above it. The bullets are unchanged and the 0.4.0 section is not touched.

README has no version pin or "What's new" section, so it is unchanged. git grep '0\.4\.0' now matches only the historical CHANGELOG references.

Gates (isolated venv, pip install -e ".[dev,langchain]" as in .github/workflows/test.yml, Python 3.14.7)

Gate Command Exit Result
Lint ruff check src/ 0 All checks passed!
Type check mypy src/shieldcortex/ --ignore-missing-imports 0 Success: no issues found in 12 source files
Tests python -m pytest -q 0 297 passed in 3.92s
Build python -m build --outdir <scratch>/dist 0 Successfully built shieldcortex-0.5.0.tar.gz and shieldcortex-0.5.0-py3-none-any.whl

Tag v0.5.0 is pushed by the maintainer loop after independent review and merge; this PR does not publish.

🤖 Generated with Claude Code

Bump version to 0.5.0 in pyproject.toml and src/shieldcortex/_version.py.
Move the Unreleased CHANGELOG entries under "0.5.0 — 2026-10-17" with a
summary paragraph, a note that 0.4.0 was not tagged, and a fresh empty
Unreleased section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TARSDrakon

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #11, which opened first for the same v0.5.0 cut. Both bump pyproject.toml and _version.py to 0.5.0 and cut [Unreleased] as 0.5.0 — 2026-10-17.

For #11's reviewers: #11 branched from 069d2d3, before #10 merged. A trial merge of #11 head a02ea63151b3c319bb4bfac2e0d7965a5339c758 with current main (5b73afe) is clean and files #10's LLM-cache bullet under 0.5.0 → Known limitation, which is right. Two things this PR's summary carried that #11's summary paragraph does not, offered as optional wording for #11:

  • the bare-LLM cache limitation from docs(langchain): document that bare-LLM cache hits are not scanned #10 (bare non-chat LLM calls served from the LangChain cache are not scanned);
  • a plain note that ContentBlockedError.result is now typed ScanResult | None (it is None at runtime only with fail_closed=True, but strict type checkers will ask callers to narrow).

Gates at this head (c127eb1) for reference: ruff 0, mypy 0, pytest 297 passed, sdist+wheel build 0; CI matrix 3.9-3.13 green. The improvement loop will review #11 instead.

@TARSDrakon TARSDrakon closed this Oct 17, 2026
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