Skip to content

fix(kb): give foundation review the full offered evidence - #315

Closed
tzhouam wants to merge 1 commit into
mainfrom
fix/kb-foundation-context-20261006
Closed

tzhouam wants to merge 1 commit into
mainfrom
fix/kb-foundation-context-20261006

Conversation

@tzhouam

@tzhouam tzhouam commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Unlimited foundation extraction offered adjacent source chunks and full bounded files/docs, but citation checks rejected ranges spanning chunk seams and the independent reviewer saw only selected excerpts. Review now receives the same pinned, numbered source/doc packet as extraction, so existing support in callers or configuration remains visible.

The new unlimited prompt version 4 keeps source at 100,000 bytes and docs at 30,000 bytes, validates every shown line and selected anchor, and asks for at most two concise claims without unsupported absence assertions. Native replay binds the exact generator system/input and full reviewer packet. Historical version 3 receipts retain their original system, selected-evidence protocol and raw interval identity; finite-mode prompts remain unchanged.

Validation: All 145 combined context, foundation, native approval, checkpoint/publication, knowledge coverage and subscription cases passed on exact commit 47371bb. Independent source/native review found no actionable issues and passed 129 focused cases. Tests include adjacent/overlap versus real gaps, late and noncited lines, source/doc caps, pin/text/header/read failures, genuine version 3 replay, version 4 native context binding, unchanged rejection, and interrupted/prepared replay. Knowledge and adapter tree hashes are unchanged from the base.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 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-05T21:59:52.670616Z 47371bb 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: 47371bbf67

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

raise InitError("foundation shown packet exceeds generation byte cap")
start, end = item.get("start", 1), item["end"]
try:
raw = stage.observer.file_text(stage.record.pin, item["path"])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Cache validation of the full evidence packet

In an unlimited foundation run with multiple requested facets, this rereads every offered file for each judge call because _judge_evidence calls foundation_evidence per section, and coordinator/native validation calls it repeatedly again. PinnedObserver.file_text starts separate git ls-tree and git cat-file processes, so a maximal 66-file packet with six accepted facets causes thousands of Git subprocesses per job; large feature catalogs can therefore become prohibitively slow or exhaust process resources. Validate the immutable packet once per job/replay context and reuse the resulting evidence for its facet reviews and receipt checks.

Useful? React with 👍 / 👎.

@tzhouam tzhouam closed this Oct 5, 2026
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