Skip to content

fix: stop discarding attachments, titles and state text at fixed caps - #5651

Merged
Sinity merged 1 commit into
masterfrom
claude/limits
Sep 27, 2026
Merged

Sinity merged 1 commit into
masterfrom
claude/limits

Conversation

@Sinity

@Sinity Sinity commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Summary

Removes three caps that dropped valid source material, and records the rest of a limits census as beads.

Problem

  • converge_drive_attachments downloaded a Drive attachment, then marked it a terminal unavailable row if it exceeded 50 MiB: the provider-served bytes were discarded and never retried.
  • The Codex state_5.sqlite title read stopped at 100,000 rows and refused any title longer than 4,096 characters, so later threads and long curated titles were missing from enrichment.
  • parse_codex_goals_db / parse_codex_memories_db clipped rows (10,000) and text (64,000 chars). Only tests called them; production uses iter_codex_state_parts, which materializes every row and text chunk.

Solution

  • Drop the attachment size refusal; size is never a reason to discard bytes already read.
  • Stream every threads row from the cursor with no length refusal; remove the now-meaningless truncation count from SidecarData.
  • Delete the clipping preview parsers and CODEX_STATE_MAX_ROWS; replace their tests with tests of the complete route, including chunk reassembly at a 4-character chunk size.
  • sqlite-degradation-baseline.json: the two rewritten optional-enrichment handlers replace their predecessors' anchors (no net growth).

Other correctness-affecting caps found by the census (lineage depth, classification probes, browser-capture ingress, Drive live fetch, Codex replacement context, sidecar dispatch, machine receipts, structural identity, query/delete scopes) are filed as separate bugs because each needs a streaming or paging design.

Verification

  • devtools verify --quick → verify: PASSED exit=0
  • Focused devtools test over the 24 test files touching assembly_codex, codex_state and attachment_convergence: queued behind the shared pytest pool at publication time; result to follow in a comment.
  • Anti-vacuity: the new attachment test fails with any byte ceiling reinstated; the title test fails with a LIMIT or length ceiling; the memory test fails if a field is clipped at the chunk size.
  • devtools schema closure: sources/assembly.py and sources/assembly_codex.py are IN, so this must land before a fresh rebuild.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4

Drive attachment convergence dropped already-downloaded bytes above
50 MiB as terminal unavailable rows. The Codex state_5.sqlite title read
stopped at 100k rows and refused titles over 4096 characters. The
test-only goals/memories preview parsers clipped rows and text while the
production route already materializes every row and chunk.

Remove the attachment cap, stream every thread title from the cursor,
and delete the clipping preview parsers, testing the complete route
instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T18:56:45.479083Z 497befb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Sinity

Sinity commented Sep 27, 2026

Copy link
Copy Markdown
Owner Author

Focused devtools test over the 24 files: 714 selected, 710 passed, 4 failed. None of the four touches this diff:

  • test_revision_backfill.py::test_frozen_inactive_generation_refuses_corrupt_required_shard: the test's corrupt_after_seal double lacks the prepared_artifact keyword that revision_backfill.py:2379 now passes.
  • test_revision_backfill.py::test_census_batching_reduces_commit_count: 10 explicit commits vs 9 expected; this diff changes no commit path.
  • test_live_batch_support.py::test_source_only_full_ingest_streams_admitted_zip_members_without_decoding: already failing on the base.
  • test_codex_state_bounds_and_excision.py::test_large_goal_export_last_row_is_reachable: hit its 300 s timeout under a saturated pytest pool; the materialization route it drives (iter_codex_state_parts) is unchanged here.
    The first three are for the pre-existing-failure owners.

@Sinity
Sinity enabled auto-merge (squash) September 27, 2026 19:13
@Sinity
Sinity merged commit 06d405f into master Sep 27, 2026
3 checks passed
@Sinity
Sinity deleted the claude/limits branch September 27, 2026 19:14
Sinity added a commit that referenced this pull request Sep 27, 2026
#5651 added a no-size-cap test that buffers 51 MiB through the removed
bytes-returning download; test_attachment_download_streams_to_disk_and_has_no_size_cap
already proves the same property through the streaming contract.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_013Vn4qhKjhyaVBG4aPiqNW4
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