Skip to content

fix: resolve v1.0.0 release blockers#11

Merged
spignotti merged 1 commit intomainfrom
fix/pre-release-v1-fixes
Apr 11, 2026
Merged

fix: resolve v1.0.0 release blockers#11
spignotti merged 1 commit intomainfrom
fix/pre-release-v1-fixes

Conversation

@spignotti
Copy link
Copy Markdown
Owner

Summary

Resolves critical and high-priority issues identified in the v1.0.0 pre-release review:

Security Fixes

  • Path traversal in PDF injection: _injected_pdf_path() now only uses sanitized filenames via safe_filename() and enforces path containment checks
  • Error message sanitization: Added _sanitize_error() to redact API keys and tokens from LLM error output

Bug Fixes

  • Resume --inject-pdfs gap: Added missing --inject-pdfs option to the resume command
  • Missing settings wiring: pdf_token_budget and abstract_fallback settings are now functional
  • Citation expansion rate limiting: Added S2 request throttling to match discovery/enrichment behavior

Tests Added

  • test_stages_citation_expansion.py: 5 tests (disabled skip, reference fetching, min_cross_refs filtering, rate limiting)
  • test_sources_openalex.py: 7 tests (headers, search, field mapping)
  • test_exporters_zotero.py: 7 tests (item types, author parsing, DOI handling)

Validation

  • uv run nox passes all sessions (lint, typecheck, test)

Files Changed

  • src/litresearch/stages/analysis.py — security fix, settings wiring
  • src/litresearch/cli.py — resume inject_pdfs
  • src/litresearch/config.py — new settings fields
  • src/litresearch/llm.py — error sanitization
  • src/litresearch/stages/citation_expansion.py — rate limiting
  • CHANGELOG.md — rapidfuzz clarification
  • 3 new test files

- security: prevent path traversal in PDF injection by sanitizing filenames
- security: redact API keys/tokens from LLM error messages
- fix: add --inject-pdfs option to resume command
- fix: wire pdf_token_budget and abstract_fallback settings
- fix: add S2 rate limiting to citation expansion stage
- fix: clarify rapidfuzz is optional in CHANGELOG
- test: add citation_expansion stage tests (rate limiting, filtering)
- test: add OpenAlex source tests (field mapping, client behavior)
- test: add Zotero export logic tests (item types, author parsing)
- test: verify resume --inject-pdfs appears in CLI help
@spignotti spignotti merged commit b6ec2df into main Apr 11, 2026
2 checks passed
@spignotti spignotti deleted the fix/pre-release-v1-fixes branch April 11, 2026 07:32
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