Skip to content

chore: document files subsystem in CLAUDE.md + drop dead pathlib import#138

Open
rdwj wants to merge 1 commit into
mainfrom
chore/session-close-cleanups
Open

chore: document files subsystem in CLAUDE.md + drop dead pathlib import#138
rdwj wants to merge 1 commit into
mainfrom
chore/session-close-cleanups

Conversation

@rdwj
Copy link
Copy Markdown
Contributor

@rdwj rdwj commented Apr 29, 2026

Two small session-close cleanups.

CLAUDE.md

Extend the server-module-structure decision block — it was listing app.py / models.py / sessions.py / tracing.py / collector.py / metrics.py / otel.py / propagation.py / sqlite.py but missing the file-upload subsystem files added in 0.16.0–0.17.0 (files.py, bytes_store.py, parser.py, scanner.py) plus a few stragglers (feedback.py, pricing.py, budget.py, http.py).

Add a new File upload subsystem decision block covering:

  • The four ABCs (FileStore, BytesStore, FileParser, VirusScanner) and that the subsystem is server-layer only.
  • The metadata/bytes split per ADR-0001 — composing SqliteFileStore/PostgresFileStore with any BytesStore.
  • Parser dispatch (PlaintextParser → DoclingParser via [files] extra).
  • Optional extras ([files] ~5–6 GB, [s3] ~30 MB).
  • Endpoints surface and file_ids chat-completion behavior.
  • FilesConfig.sqlite_path co-locating metadata DB on the bytes PVC.
  • Pointer to ADR-0002 and tracking issue feat(server): chunking + pgvector retrieval for /v1/files #137 for the chunking implementation.

tests/test_files_endpoint.py

Drop the duplicate from pathlib import Path at line 259. Path is already imported at line 242 within the same test class for the only Path usage in that scope. Caught by ruff during /session-close.

Verification

  • pytest: 970 unit tests pass.
  • ruff check src tests: clean.
  • No behavior changes.

Test plan

  • Unit suite green
  • Lint clean
  • CLAUDE.md renders correctly on GitHub (decision blocks, ADR links resolve)

Two small session-close cleanups:

- CLAUDE.md: extend the server-module-structure decision block to list
  files.py / bytes_store.py / parser.py / scanner.py / feedback.py /
  pricing.py / budget.py / http.py. Add a new decision block for the
  file upload subsystem covering FileStore + BytesStore split per
  ADR-0001, parser dispatch tiers, optional [files] / [s3] extras,
  endpoints, and pointers to ADR-0002 + tracking issue #137 for the
  chunking work.

- tests/test_files_endpoint.py: drop the duplicate
  ``from pathlib import Path`` at line 259. Path is already imported
  at line 242 within the same test class for the only Path usage.
  Caught by ruff during /session-close.

No behavior changes. Tests stay green (970 passed); ruff now clean.

Assisted-by: Claude Code (Opus 4.7 1M)
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