Skip to content

Stream source/evidence capture without reintroducing file caps #217

Description

@steipete

Capacity follow-up

Track a bounded-memory implementation of complete source/evidence capture without reintroducing per-file size caps or silently truncating review input. This follows the explicit uncapped-input contract in #215.

The current read_file_bytes retains byte chunks and joins them. file_bundle_snapshot then checks binary content and decodes the complete buffer; evidence and bundle construction retain and serialize content before prompt partitioning. The per-request prompt ceiling therefore does not bound peak capture memory.

This is a source-confirmed finite-memory scaling limitation. No host-OOM experiment, arbitrary multi-gigabyte guarantee, bounded-RAM claim, or demonstrated P1 failure of ordinary reviews is asserted. The maintainer disposition for #215 is to retain the requested uncapped behavior and address streaming separately, rather than restoring the old cap or expanding that PR into a pipeline rewrite.

Desired outcome

Use streaming or safely owned temporary spooling through the capture, evidence, bundle, partitioning, and scan owners so large complete inputs need not all be materialized simultaneously. Changing only the file-read loop would leave downstream copies and full-input serialization unaddressed.

Acceptance criteria:

  • Preserve complete review coverage without new file caps, partial-review success, or a new configuration surface.
  • Preserve exact frozen bytes, mixed base/index/working-tree attribution, source mutation and topology checks, and fail-closed binary/invalid-text handling.
  • Preserve the complete-frozen-input secret scan and the immediate scan of every actual outgoing pack, including retries; never send a partial review after a capture or scan failure.
  • Keep native reviewer isolation and cleanup ownership intact, including failure and cancellation paths.
  • Add bounded-resource regressions and controlled memory measurements that exercise the full pipeline, without risking host OOM or submitting enormous payloads to a provider.

Related: #215 and its late ClawSweeper capacity finding. This issue records the accepted limitation and improvement scope; it does not claim the limitation was fixed by #215.

Activity

  1. added
    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    on Sep 2, 2026
  2. clawsweeper commented on Sep 2, 2026

    @clawsweeper

    Codex review: this still needs some work.

    Summary
    This accepted capacity follow-up remains necessary: current main still materializes complete inputs and prompt lists, and the merged partition repair does not provide bounded-memory capture.

    Reproducibility: Current source directly establishes whole-file accumulation, decoding, evidence rendering, and retained prompt construction; no memory experiment was run and no ordinary-review failure is established.

    Root-cause cluster
    Relationship: canonical
    Canonical: #217
    Summary: This issue owns the deferred complete-input memory redesign; merged scope and partition changes leave that work open.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Maintainer decision needed

    • Question: What measurable full-pipeline memory target and private-spool lifecycle should govern this redesign?
    • Recommendation: Define the resource contract: Align the obsolete scanning criterion with current policy, specify spool ownership and cleanup, and establish controlled memory measurements before implementation.
    • Why: The accepted direction establishes complete uncapped text coverage but leaves resource targets and cleanup ownership undefined across capture, planning, retries, and cancellation.

    Next step
    Align the scanning criterion with current policy and define memory targets, private spool ownership, and cancellation cleanup before implementing the cross-stage redesign.

    Review details

    Best possible solution:

    Use private spools and incremental prompt preparation while preserving complete frozen inputs, attribution, integrity checks, isolation, and current scanner-free policy.

    Do we have a high-confidence way to reproduce the issue?

    Current source directly establishes whole-file accumulation, decoding, evidence rendering, and retained prompt construction; no memory experiment was run and no ordinary-review failure is established.

    Is this the best way to solve the issue?

    Whole-pipeline streaming or owned spooling addresses the retained copies; changing only the read loop leaves downstream allocations intact, while restoring secret scanners would contradict current policy.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The requested pre-send scanning criterion conflicts with the current intentional scanner-free policy.
    • The full-pipeline memory target and private spool lifecycle across retries, failure, and cancellation remain unspecified.

    Codex review notes: model internal, reasoning medium; reviewed against 38b67bc23842.

    Label changes

    Label changes:

    No label changes.

    Label justifications:

    • P3: This is an accepted capacity improvement without a demonstrated ordinary-review outage or host-OOM failure.
    • impact:other: Whole-input capture and retained prompt lists constrain large-review memory capacity.
    Evidence reviewed

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed October 11, 2026, 5:52 PM ET / 21:52 UTC.

  3. added
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.
    and removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Sep 3, 2026
  4. removed
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on Oct 9, 2026
  5. clawsweeper commented on Oct 9, 2026

    @clawsweeper

    🦞⚠️
    Automatic implementation stopped before completion.
    Reason: The automatic implementation worker stopped before all deterministic gates completed. Open the workflow run for the exact blocker.
    Worker: https://github.com/openclaw/clawsweeper/actions/runs/38118732074

  6. added
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    and removed
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions