Skip to content

fix(kb): keep replay capture growth from stopping nightly intake - #338

Merged
tzhouam merged 1 commit into
mainfrom
fix/kb-replay-capture-20261009
Oct 9, 2026
Merged

tzhouam merged 1 commit into
mainfrom
fix/kb-replay-capture-20261009

Conversation

@tzhouam

@tzhouam tzhouam commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Nightly knowledge intake stopped before drafting because the complete knowledge and companion-text snapshot grew to 16.08 MB, exceeding the 16 MB replay capture limit. All 28 pending inputs hit the same failure.

Allow complete replay envelopes up to a bounded 64 MB, keeping TraceStore redaction, compression, hashing and dataset validation. Record a distinct capture deferral for larger envelopes without saving partial inputs. Ordinary pinned drafting can continue after that deferral; an active or disabled evolved KB workflow, or an unverifiable active registry, leaves the event pending. Other capture failures still block. Publication, calibration and model gates are unchanged.

Validation: 189 focused tests passed (1 skipped), including exact 16.08 MB runtime capture/collection, UTF-8 byte bounds, active/disabled/corrupt registry cases and PR review capture fallback/rollback. Documentation links, citations and strict SPEC freshness pass. Full CI must pass before merge and native rollout.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 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-10-09T08:31:08.886240Z e80e048 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e80e0484df

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +100 to +101
store.append('decision', context=context, result={'type': 'replay_capture_deferred', 'reason': 'size_limit',
'input_bytes': len(encoded), 'limit_bytes': REPLAY_INPUT_MAX_BYTES, 'input_sha': input_sha})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid appending duplicate deferrals on every retry

When an oversized item belongs to an active workflow, run_intake deliberately leaves it pending, so each subsequent intake interval calls capture again and appends another identical deferred record. collect queries only the oldest 10,000 workflow records and filters for replay_input afterward; once repeated deferrals fill that window, every newer valid capture becomes permanently invisible to dataset collection. Deduplicate deferred records for the same item/hash or make collection paginate/filter without counting these records toward its limit.

Useful? React with 👍 / 👎.

@tzhouam
tzhouam merged commit f7f245b into main Oct 9, 2026
2 checks passed
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