Detect ingest content class and label every object write - #452
Conversation
Cursor review round 1 (detached worktree, PR #452)BOM text, CRLF text, and a multi-megabyte PDF are accepted, and this change adds no dependency. Every production
VERDICT: REQUEST_CHANGES Dispositions
The substantive fixes were pushed as |
Cursor review round 2 (detached worktree, PR #452, head e111ec9)The first-round signature fixes hold for printable
Object writes, dependencies, and the cases that already match the new tests do not add another defect. Every VERDICT: REQUEST_CHANGES Dispositions
The two permitted Cursor rounds are complete. These final adopted fixes were validated locally and pushed after round 2; the lead engineer performs the final review. |
…ction-and-storage-class
|
Cursor review record for the merged PR head:
Adopted the byte/family, PDF predicate, metering, typed-error documentation, and fixture findings. D117's parked-route MIME correction stays in place and is now explicit in D132. The stock PDF converter and managed PDF billing are separate D139/product work; this PR does not add a text-layer route. The second-round fixes were pushed after the two-round Cursor cap and are being checked by CI on |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
Problem
Uploader-declared MIME could route contradictory bytes before E0 storage, and object writes omitted storage-class metadata.
Scope
D132 byte-class admission before raw/catalog writes; typed HTTP refusals; explicit hot/cold class on every object-store write. Merged current main and reconciled D133/D138 family routing and D139's PDF classification rule. No new format-registry implementation.
Important decisions
Recognized PDF, media, Office, Parquet, and Photoshop bytes determine the stored class even with a misleading filename. Compatible registry hints preserve text-bearing, archive, and dataset families; converters validate complete structures. Unknown binary follows D138's binary-card path. A recognized PDF always stores as
application/pdf; this PR adds no text-layer shortcut. Content-hash rows retain their first MIME except D117's existing parked-route correction. Historical wrong routable classes need a separate migration and reprocessing plan. Required storage labels are compatible with UMC D82's gateway, which accepts labelled writes.Sources inspected
CLAUDE.md, plan/README.md, design-corpus skill, decisions D38/D51/D55/D117/D132/D133/D138/D139, E0 and format-conversion designs, registry and E0 implementations, object-store adapters, managed text metering, CI workflow and tests.
Validation / review
Head
2e2867e1:make lintpassed;uv run ruff format --check src/ benchmarks/passed (614 files);make typecheckpassed (0 errors, 0 warnings);python3 .github/ci/check_test_inventory.pypassed (137 unit, 69 integration, 206 discovered);uv run lint-importspassed (5 contracts);python scripts/generate_docs_llms.py --checkandpython scripts/check_docs_truth.pypassed. Focused detector/metering/registry/routing tests: 167 passed.make teststarted on checkpoint3469e6f7and passed (2,822 passed, 916 skipped, 1 warning); final-head CI packs are the integration authority.GitHub CI on this head passed: Unit 2,647 passed/7 skipped; Contract smoke 141 passed; adapters 679 passed/4 skipped; surfaces 1,146 passed/2 skipped; workers 826 passed. Quality, Compose quickstart, engine image, docs builds, client compatibility, PR gate, and CLA also passed. The docs deploy job was skipped by its workflow.
Cursor rounds one and two both returned
REQUEST_CHANGES; their verbatim output and disposition tables are indesign/reviews/REVIEW_cursor_pr452_merge_2026-09-29.mdanddesign/reviews/REVIEW_cursor_pr452_merge_round2_2026-09-29.md. Adopted findings and the later CI fixture fixes are pushed. The task caps Cursor at two rounds; the PR comment links both records.Limitations
Signature checks establish a class; converters validate full structure. The stock PDF text-layer converter and oversized-PDF behavior already on main are outside this PR; D139's every-page OCR implementation remains separate. Local PostgreSQL 17 lacks
pg_textsearch, so migration-backed suites could not complete locally (contract attempt: 123 passed, 15 failed, 3 errors at extension creation). The throwaway cluster was stopped and removed; CI passed with the repository's PostgreSQL 19 image.Follow-up work
Lead engineer handles final review and merge. Historical MIME correction and D139 converter implementation remain separate tracks.
Contributor agreement
Signing on behalf of a legal entity (leave blank if accepting individually):