Skip to content

fix(kb): use bounded review feedback on foundation resumes - #316

Closed
tzhouam wants to merge 2 commits into
mainfrom
fix/kb-foundation-review-feedback-20261006
Closed

tzhouam wants to merge 2 commits into
mainfrom
fix/kb-foundation-review-feedback-20261006

Conversation

@tzhouam

@tzhouam tzhouam commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Unlimited version 4 foundation resumes retried missing facets without the previous independent review reasons. Resumed jobs now receive advisory feedback for the same owner, page and still requested facets, with references to validated earlier input/result hashes. Corrective payloads have distinct hashes, preserving prior attempts and approvals.

Each facet permits an initial extraction and at most three corrections. Exhausted facets remain explicitly unknown and keep publication targets unmet. Wrong owner/page/facet, legacy jobs, unrelated drops and passing verdicts cannot provide rejection reasons. Uncheckpointed interruptions do not consume a correction. Feedback never acts as source evidence or approval.

The original version 4 system, global run identity, model roles, source pin, catalog/base binding, full evidence packet, byte caps and native proof validators remain unchanged. Historical approvals replay with their original inputs.

Validation: All 70 combined checks passed on exact head 960af6d: 13 new regressions and 57 existing context, native foundation, resume and publication checks. Independent exact-head source review found no remaining issues; independent test verification is finishing. A genuine corrected native artifact rejects feedback tampering even after checkpoint hashes are recomputed. No formal knowledge, adapter or active runtime files are changed.

@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-05T22:33:50.788253Z 960af6d 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: 960af6db0f

ℹ️ 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 +398 to +401
if prior.get("result_sha256") != _hash({k: v for k, v in prior.items() if k != "result_sha256"}):
raise InitError("foundation feedback prior result hash mismatch")
if prior.get("result_sha256") not in getattr(stage, "_foundation_validated_results", set()):
_validate_result(stage, prior)

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 Authenticate rejected verdicts before reusing their feedback

A checkpoint containing only a rejected facet has no artifact—and therefore no archived judge receipt—for _validate_result to authenticate. Anyone able to alter that checkpoint can replace verdicts[*].reasons, recompute the ordinary result_sha256, and have these lines accept the fabricated reasons as retry feedback; the next native generator trace then permanently binds the tampered prompt and passes subsequent replay. Store and verify a native rejection receipt, rather than treating a recomputable result hash as validation, before supplying rejection data to a correction.

Useful? React with 👍 / 👎.

Comment on lines +411 to +414
if attempts:
latest = attempts[-1]
key = f"knowledge:{original['owner'].owner}:{facet}"
verdict = latest.get("verdicts", {}).get(key, {})

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 Preserve the latest review across transient retry errors

When an initial draft receives useful rejection reasons but its first correction is checkpointed with a generator/model error, latest is the errored attempt and has no verdict, so the following correction receives an empty last_review_reasons instead of the still-relevant independent review. Because errored attempts count toward the three-correction limit, subsequent retries can be exhausted without ever seeing the guidance they were introduced to use; select the newest attempt with a qualifying verdict separately from the newest attempt supplying last_error.

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