Skip to content

🚥 feat: Gate Synchronous Tool Results Before Release - #597

Open
lia-by-librechat[bot] wants to merge 43 commits into
mainfrom
lia/pii-tool-results
Open

lia-by-librechat[bot] wants to merge 43 commits into
mainfrom
lia/pii-tool-results

Conversation

@lia-by-librechat

@lia-by-librechat lia-by-librechat Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds default-off RunConfig.toolResultProtection for trusted synchronous text tools. Mandatory awaited inspection precedes native callbacks, completions, references and ToolMessage/model reuse; optional hooks cannot replace it.

  • Covers direct, host/eager, nested local/Code API and foreground-child results/errors.
  • Validates external descriptors/containers, detaches callback-held messages/errors and revalidates replacements.
  • Binds replay receipts before classification, preserves checkpoint identity and atomic terminal receipts, and bounds retention without repeating settled tools.
  • Admits valid removal controls and both SDK multi-agent message channels. Protected execution uses exactly the admitted root and descendant checkpoints across awaits.

IDs/status, approvals, authority and batch accounting are preserved. No argument or arbitrary structured-payload rewriting. Selected artifacts, files/media, background outputs, uncertified aliases/tool shells, Cloudflare-native outputs and client delegation remain unsupported/gated. Absent/unselected behavior stays unchanged. No activation, publication or documentation changes.

Latest review fixes and main refresh

Head: 0410722adef273cabc87968b71b9f8720a54dcbe
Base/merge-base: 9db504f2777cad90fc1fef2791eb9945e958a556 (main). Existing PR, no history rewrite.

IR24/IR25 are fixed: fresh and pending messages bind immutable checkpoint-owned proposals before source authority is extended. Admission collects original root/descendant sources, rechecks preflight tuples and preserves this execution's writes. Run-step updates are detached before native use.

The refresh preserves main's graph-subagent and parallel approval scoping, canonical updates/configuration and execute-once behavior. Newly introduced compaction windows, interrupt payloads and traversal fields pass the same message/descriptor gates. Arguments and routing identities are not rewritten.

CX22/CX23/CX24/CX25 are fixed: message prototype proxies reject without traps; saver put-return configs are detached and identity-checked; selected producer interrupt payloads reject before native publication; uncertified protected delta reconstruction remains unsupported. Ordinary deltas retain admitted cursor routing. Payload-free control interrupts discard producer diagnostics.

IR26 is fixed: reloaded committed histories are checked against retained preflight source identities before extending namespace authority. Previously admitted source occurrences remain bound across saver reads. Receipt-bound completed results preserve partial graph approvals when siblings reuse call IDs; contradictory source and receipt evidence still rejects. Real root/descendant reload canaries cover both message channels and retain allowed writes, completed replay and parallel approval controls.

IR27 is fixed: saver lookup/history routing is checked against captured selected identities before content admission. Config/body checkpoint IDs must agree; parent routing cannot change thread or namespace. Backend lookup configurations are detached from callers. Explicit, latest, legacy and history selections retain their supported behavior.

Refreshed against main's Zod 4/dependency migration (#649) without changing main's dependency files. Policy placement remains top-level. Prior head 4112cc133 completed independent source review with no findings; it does not cover this refreshed head.

Exact-head verification

Check Result
Result/reference/backend/saver and Zod/schema controls 1,288 passed
Lifecycle/tracing/provider composition and parallel approvals 882 passed
Child/authority/forks/hooks/handoffs/budgets/compaction 614 passed; 1 existing benchmark skipped
Compaction-window, protected-history and replay controls 288 passed
Separate tsc --noEmit Passed
CJS/ESM/declaration builds, capability and exports Passed
Touched ESLint/import order; dependency cycles Passed
Light-entrypoint checks 18 passed
Built CJS/ESM selected-read, native-release and partial approval controls Passed
GitHub CI 13 passed

Independent review completed on 0410722adef273cabc87968b71b9f8720a54dcbe: no findings. Full-diff source review only; the reviewer did not run local SDK tests, typechecks or builds. All inline review threads are resolved.

Production audit: zero vulnerabilities. Full audit: six low-severity Jest development-chain findings inherited from main. Full-source strict lint reports 56 warnings and zero errors in 16 files verified unchanged from main; no touched file has warnings. Dependency files match main exactly. No unrelated dependency or lint changes.

Full SDK suites were not run locally. Live provider/Langfuse/Cloudflare, external savers, app/SSE/replay adapters and D1 serialized-exporter certification were not performed. No activation, merge or publication.

C2 prerequisite

Wait for an approved SDK release containing C1, pin that exact version, require capability/policy version 1, and certify trusted adapters plus app/SSE/replay sinks. Merge alone does not authorize release or activation. Unsupported paths remain gated across rollback/mixed versions.

AI-2213

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 68df78e

C1 mandatory synchronous tool-result gate. Direct/native callbacks, host success/error, eager completion, post-hook replacement, references, nested local/programmatic execution and child inheritance use canonical releases. Required failures are terminal; unsupported artifacts/files/media/background paths stay gated.

Focused baseline: 355 tests plus 3 added child/approval cases passed. Workspace types, CJS/ESM/declarations, touched lint/import order and dependency cycles passed. Tracing/approval/resume regressions and independent review are running against this head. No docs, activation or package publication. C2 requires an approved SDK release/pin and adapter/sink certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: c0e10d2

Fixed independent R1-R5 in 3f3c3a8: raw-free eager rejections/cardinality, nested pre-call errors and local denial text, terminal remote protection failures. Also covered remote bash dispatch, SDK safety interruptions, native callback/error-handler ownership and opaque/accessor message aliases. Integrated current main at 265d97f without rewriting history.

Current-head checks: 375 focused tests, 353 approval/tracing tests and 232 child/host-argument tests passed. Workspace types, CJS/ESM/declarations, touched lint/imports, dependency cycles and built C1 exports passed. Fresh independent review follows for this exact head. No docs, activation or package publication; C2 still requires an approved SDK release containing C1 plus exact pin/capability and adapter/sink certification.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@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-31T02:36:44.470625Z 0410722 Manual request
ℹ️ 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: c0e10d264c

ℹ️ 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 thread src/protection/toolResult.ts Resolved
Comment thread src/tools/ToolNode.ts Resolved
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 3d39e2f

Fixed R6-R8 in 3d39e2f after a producer/reuse/projection invariant sweep. Checkpoint-owner-validated replay re-inspects canonical content without repeating settled side effects. Full approved references remain separate from model previews. Text-only tuple-format exceptions retain native error status and callbacks.

378 focused SDK tests and 353 approval/tracing tests passed. Separate types, CJS/ESM/declarations, declared exports, touched lint/import checks and dependency cycles passed. No docs, activation or publication. Fresh independent review is running for this exact head; C2 still needs an approved SDK release/pin, capability checks and adapter/app sink certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 0333d5f

Fixed Codex CX1/CX2 and independent R9/R10 in 0333d5f. Host envelopes are validated before accessor reads, timestamping and host-result tracing. Cloudflare native outputs remain unsupported and gate before sandbox work. Direct approval responses are inspected in full before truncation. Local runners drain accepted bridge requests before checking required failures. Error-handler replacements are re-inspected before reuse.

432 focused/backend tests and 353 approval/tracing tests passed. Separate types, CJS/ESM/declarations, declared exports, touched lint/import checks and dependency cycles passed. Fresh independent review follows for this exact head. No docs, activation or package publication. C2 requires an approved SDK release containing C1, exact pin, capability/policy checks and adapter/app sink certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 61dad14

Fixed independent R11-R13. Uncertified executable/request aliases reject before execution; standalone native boundaries validate supplied policy versions; accepted local bridge handlers drain even after client disconnect.

75 C1 dispatch regressions and separate types passed. Broader focused/backend, approval/tracing, child/authority and static/build checks are running against this head alongside CI and fresh independent review. No docs, activation or publication. C2 still requires an approved SDK release containing C1, an exact pin, version-1 capability/policy checks and trusted adapter/app sink certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: d1ec9ff

Fixed independent R14/R15. Checkpoint references now retain SDK source/version/protection provenance. Selected earlier-turn values are re-inspected before restoration or substitution; legacy or newly selected uncertified reference snapshots fail closed. Unselected host outcome/outcome_patch controls survive routing validation; selected aliases stay gated.

145 result/reference regressions passed, including direct/host source replay, allowed controls, reblocking, legacy/mixed-version gating and real eager outcome controls. Types, builds, touched lint/imports, cycles and built CJS/ESM dispatch passed. Broader exact-head checks, CI and fresh independent review follow. No docs, activation or publication. C2 still requires an approved SDK release containing C1, exact pin, capability/policy version checks and trusted adapters plus app sinks.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 99da8a3

Fixed independent R16/R17. Required host releases use frozen dispatched identities and reject changes before inspection, during inspection and after host cleanup. Required failures take precedence over approval interrupts. SDK-owned required host handler absence/throws fail raw-free before native callback logging. Native producer identity/format mutation is gated before callbacks.

100 C1 dispatch regressions and separate types passed. Focused/reference/backend, approval/tracing, child/authority and static/build checks follow for this exact head alongside CI and fresh independent review. No docs, activation or publication. C2 still requires an approved SDK release containing C1, exact pin, capability/policy checks and trusted adapter/app sink certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: ae4213e

Fixed independent R18/R19. Required child-host exceptions are rejected raw-free before native callback logging. Restored registry values are inspected under the current policy before reference resolution; serialized protection flags cannot recreate live policy bindings. Unchanged live values keep their policy-bound admission, avoiding redundant inspection. Batch turns remain reserved before awaits.

163 result/reference regressions, separate types and touched lint/import checks passed. Exact-head broader checks, builds, CI and fresh independent review follow. No docs, activation or publication. C2 requires an approved SDK release containing C1, exact pin, capability/policy checks and trusted adapters plus app sinks.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 386dd9b

Fixed independent R20. Validated producer messages are snapshotted before awaited inspection. Changes to identity, status, content, artifacts or metadata reject before native callbacks. Canonical provenance includes the immutable envelope, and metadata is copied rather than shared with the producer.

179 result/reference regressions, types and touched lint/import checks passed. Broader exact-head checks, module builds, CI and fresh independent review follow. No docs, activation or publication. C2 requires an approved SDK release containing C1, exact pin, capability/policy checks and trusted adapters plus app sinks.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 0781d19

Fixed independent R21. Configured local bridge cancellation becomes a raw-free terminal error before text or JSON responses. The failure latch survives ignored HTTP failures and bridge drain; SDK safety reasons retain identity.

189 result/reference regressions, types and touched lint/import checks passed. Real localhost HTTP tests cover ordinary/string canaries, typed policy errors and SDK safety controls in both response modes. Broader exact-head checks, builds, CI and fresh independent review follow. No docs, activation or publication. C2 requires an approved SDK release containing C1, exact pin, capability/policy checks and trusted adapters plus app sinks.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@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: 0781d1938c

ℹ️ 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 thread src/protection/toolResult.ts Resolved
Comment thread src/protection/toolResult.ts Resolved
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 8112d9a

Fixed Codex CX3/CX4 in 8112d9a. Reference collections are copied from validated indexed data before selection or inspection; proxy/subclass/iterable collections, overridden methods, accessors and symbol aliases reject before use. Detached reference fields stay stable across awaits. Envelope validation examines every own key, including non-enumerable symbols, before native callbacks or metadata copying.

208 result/reference regressions, types and touched lint/import checks passed. Broader exact-head checks and fresh independent review are running alongside CI. No docs, activation or publication. C2 still requires an approved SDK release containing C1, exact pin, capability/policy checks and trusted adapter/app sink certification.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: fa2abf1

Fixed independent IR15 in fa2abf1. Saver reads admit detached message channel values and all pending message writes before native Pregel reduction, including writes appended under an unchanged checkpoint ID. The same gate covers initial preflight, execution reloads and foreground children. Certified results, own writes, removals and unrelated channels remain supported.

467 focused result/reference/saver controls, separate types and scoped static checks passed. Real warm/rebuilt interrupted graphs reproduce root and descendant pending-write leaks and now reject before native callbacks, approvals or model reuse. Broader exact-head tests, built entrypoint controls and independent review are running. No docs, activation or publication. C2 release/exact pin/capability and adapter/app-sink certification remain prerequisites.

@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: fa2abf1e12

ℹ️ 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 thread src/protection/toolCheckpoint.ts Resolved
Comment thread src/graphs/Graph.ts Resolved
Comment thread src/run.ts Resolved
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: b25b502

Fixed independent IR16 and IR17 in b25b502. Checkpoint admission now returns detached run-step carriers, nested entries and receipts, including pending Overwrite values. Startup inputs are admitted again after awaited hooks, with separate message arrays and routing identities before native graph invocation. Arguments and opaque unselected payloads are not rewritten.

481 result/reference/saver controls, separate types and scoped static checks passed. Real saver tests mutate carriers during inspection; hook tests cover replacement, append, delayed message/array/routing mutation, allowed contexts and absent-policy behavior. Broader exact-head tests, built SDK controls, CI and independent review are running. No docs, activation or publication; C2 release/exact pin/capability and adapter/app-sink certification remain prerequisites.

@lia-by-librechat

lia-by-librechat Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Head: 21a689f
Base/merge-base: c56fc5e (main).

Fixed IR16/IR17 in b25b502: return detached run-step carriers/receipts, including Overwrite; readmit and detach startup-hook inputs before native callbacks. Fixed CX19/CX20/CX21 across b25b502/21a689fe0: admit listed tuples and detach native configuration/metadata/version containers; reject fresh input accessors/proxies before reads. All three inline threads have fixing-commit replies and are resolved.

Exact-head check Result
Result/reference/backend/saver controls 862 passed
Lifecycle/tracing/restart/provider composition 562 passed
Child/authority/forks/hooks/compaction 479 passed; 1 existing benchmark skipped
Separate TypeScript check Passed
CJS/ESM/declaration builds and exports Passed
Touched lint/import order; dependency cycles Passed
Built CJS/ESM carrier/hook/native loading/checkpoint/pending-write controls Passed
GitHub CI 13 passed

Independent exact-head review is running. Its result is not yet claimed. Full SDK suites were not run locally. Live provider/Cloudflare, app/SSE/replay adapter and D1 serialized-exporter certification were not performed. No docs, activation, merge or publication. C2 requires an approved C1 release, exact pin and capability/policy plus adapter/app-sink certification.

@lia-by-librechat

lia-by-librechat Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Head: 1604e06
Base/merge-base: c56fc5e (main).

Fixed independent P1 findings IR18/IR19/IR20 in 1604e06:

  • Selected producers execute in a callback-free async scope, preserving signal and authority.
  • Approval responses bind to admitted pending-call identities and are inspected before native root/child Commands.
  • Message-bearing Send state is admitted and detached in checkpoint task channels, pending writes, Command goto/update and fresh input.
Exact-head check Result
Result/reference/backend/saver controls 902 passed
Lifecycle/tracing/restart/provider composition 562 passed
Child/authority/forks/hooks/handoffs/compaction 517 passed; 1 existing benchmark skipped
Separate TypeScript check Passed
CJS/ESM/declaration builds and exports Passed
Touched lint/import order; dependency cycles Passed
Built CJS/ESM native callback/approval/Send and earlier admission controls Passed
GitHub CI 13 passed

Independent exact-head review is running; its result is not yet claimed. Full SDK suites were not run locally. Live provider/Langfuse/Cloudflare, app/SSE/replay adapter and D1 serialized-exporter certification were not performed. No docs, activation, merge or publication. C2 requires an approved C1 release, exact pin and capability/policy plus adapter/app-sink certification.

@lia-by-librechat

lia-by-librechat Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Head: aa3fd44
Base/merge-base: c56fc5e (main).

Fixed independent P1 IR21 in aa3fd44. Send admission binds results to enclosing proposals and receipts across stored/pending tasks, Command goto/update and fresh input. Nameless/renamed results and conflicting packet-local proposals cannot downgrade selected sources. Unattributed results reject before native callbacks. Certified selected and established unselected sources remain supported; both message channels share the same gate. No argument or identity rewriting.

Exact-head check Result
Result/reference/backend/saver controls 966 passed
Lifecycle/tracing/restart/provider composition 562 passed
Child/authority/forks/hooks/handoffs/compaction 517 passed; 1 existing benchmark skipped
Separate TypeScript check Passed
CJS/ESM/declaration builds and exports Passed
Touched lint/import order; dependency cycles Passed
Built CJS/ESM enclosing-source and prior release-boundary controls Passed
GitHub CI 13 passed

Independent exact-head review is running; its result is not yet claimed. Full SDK suites were not run locally. Live provider/Langfuse/Cloudflare, app/SSE/replay adapter and D1 serialized-exporter certification were not performed. No docs, activation, merge or publication. C2 requires an approved C1 release, exact pin and capability/policy plus adapter/app-sink certification.

@lia-by-librechat

lia-by-librechat Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Head: 97aa082
Base/merge-base: c56fc5e (main).

Fixed IR22 (P1) and IR23 (P2) in 97aa082. Ordinary resume writes bind to admitted descendant source identities before native Commands, without promoting update proposals into trusted sources. Bindings distinguish batch/message identity, namespace and completed result identity, preserving chronological provider call ID reuse. Ambiguous or conflicting claims reject. Known completed replay, selected/unselected reused history and unrelated unselected update controls pass.

Exact-head check Result
Result/reference/backend/saver controls 1,005 passed
Lifecycle/tracing/restart/provider composition 562 passed
Child/authority/forks/hooks/handoffs/budgets/compaction 555 passed; 1 existing benchmark skipped
Separate TypeScript check Passed
CJS/ESM/declaration builds and exports Passed
Touched lint/import order; dependency cycles Passed
Built CJS/ESM ordinary descendant writes, reused occurrences and previous admission controls Passed
GitHub CI 13 passed

Independent exact-head review is running; its result is not yet claimed. Full SDK suites were not run locally. Live provider/Langfuse/Cloudflare, app/SSE/replay adapter and D1 serialized-exporter certification were not performed. No docs, activation, merge or publication. C2 requires an approved C1 release, exact pin and capability/policy plus adapter/app-sink certification.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@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: 97aa0824c2

ℹ️ 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 thread src/protection/toolResult.ts Resolved
Comment thread src/protection/toolCheckpoint.ts Resolved
Comment thread src/protection/toolResult.ts Resolved
Comment thread src/protection/toolCheckpoint.ts Resolved
# Conflicts:
#	src/run.ts
#	src/tools/subagent/SubagentExecutor.ts
#	src/tools/toolBatchReplay.ts
@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: 4497bb6
Base/merge-base: 2cbe0b2 (main).

Fixed IR24/IR25 in bef01a3 and refreshed against current main in 4497bb6. Fresh messages and pending writes are admitted against immutable checkpoint proposals before extending source authority. One admission context binds root and descendant reads, including writes appended after preflight. Run-step writes share the same snapshot gate.

Integrated main's graph-subagent approvals and compaction windows without dropping canonical update/config or per-member replay scoping. New tests cover protected parallel root/graph children, warm/rebuilt direct/host approve/respond, compaction window carriers and checkpoint traversal getters. 926 refreshed integration controls plus separate types and scoped lint/import checks passed. Broader exact-head tests, builds, CI and independent review are running. No docs, activation or publication. C2 release/exact pin/capability and adapter/app-sink certification remain prerequisites.

@lia-by-librechat

lia-by-librechat Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Head: e138c01
Base/merge-base: 2cbe0b2 (main).

Fixed CX22/CX23/CX24/CX25 (P1) in e138c01: reject proxy prototype chains without traps; admit and identity-check saver write-return configs; reject selected producer interrupt payloads and detach empty control diagnostics; gate protected delta reconstruction while routing ordinary delta reads to admitted cursors. All four inline threads have fixing-commit replies and are resolved.

IR24/IR25 authority fixes and the current-main refresh are included. Protected parallel root/graph-child approvals, partial addressing and compaction windows retain admission and member authorization.

Exact-head check Result
Result/reference/backend/saver 1,142 passed
Lifecycle/tracing/provider composition/parallel approvals 882 passed
Child/authority/forks/hooks/handoffs/budgets/compaction 614 passed; 1 existing benchmark skipped
Compaction-window/protected-history/replay 288 passed
Separate types; CJS/ESM/declaration builds and exports Passed
Touched lint/import order; dependency cycles Passed
Built CJS/ESM release boundaries, fresh/resume attribution and partial root/graph-child approvals Passed
GitHub CI 13 passed

The initial independent review execution ended without a verdict. The same frozen-head review thread has resumed; no clean review is claimed. Full SDK suites were not run locally. Live provider/Langfuse/Cloudflare, app/SSE/replay adapter and D1 serialized-exporter certification were not performed. No docs, activation, merge or publication. C2 requires an approved C1 release, exact pin and capability/policy plus adapter/app-sink certification.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: f5864cb
Base/merge-base: 2cbe0b2 (main).

Fixed independent IR26 in f5864cb. Execution-time checkpoint histories are validated against retained preflight sources, including admitted descendant identities, before namespace authority is extended. Previously admitted batch/result identities are merged, not replaced by reloaded proposals. Both message channels share the gate.

801 focused result/reference/saver controls, separate types and scoped static checks passed. Real SDK reload tests reproduce coordinated source/result renames, missing names and replaced batch IDs, with root/descendant and allowed reload controls. Completed replay and protected parallel approvals still pass. Broader exact-head tests, builds, CI and independent review are running. No docs, activation or publication. C2 release/exact pin/capability and adapter/app-sink certification remain prerequisites.

@lia-by-librechat

lia-by-librechat Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Head: 3b17a35
Base/merge-base: 2cbe0b2 (main).

Fixed IR26 (P1) in f5864cb/3b17a35fe: execution-time checkpoint reloads validate committed history against retained preflight sources before extending namespace authority. Coordinated name/batch changes and nameless results cannot replace admitted descendant identities. Receipt-bound completed results remain distinct from pending siblings with reused call IDs. Contradictory proposal/receipt identities reject. The locally detected partial-approval regression is fixed in 3b17a35.

Exact-head check Result
Result/reference/backend/saver 1,179 passed
Lifecycle/tracing/provider composition/parallel approvals 882 passed
Child/authority/forks/hooks/handoffs/budgets/compaction 614 passed; 1 existing benchmark skipped
Compaction-window/protected-history/replay 288 passed
Separate types; CJS/ESM/declaration builds and exports Passed
Touched lint/import order; dependency cycles Passed
Built CJS/ESM reload canaries, partial root/graph-child approvals and previous native gates Passed
GitHub CI 13 passed

Independent review is running on this exact head. Review f5864cb was cancelled after the local partial-approval failure; it does not cover this head. Full SDK suites were not run locally. Live provider/Langfuse/Cloudflare, app/SSE/replay adapters and D1 serialized exporters were not certified. No docs, activation, merge or publication. C2 requires an approved C1 release, exact pin/capability/policy and adapter/app-sink certification.

@lia-by-librechat

lia-by-librechat Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Reviewed head: 4112cc1
Independent review completed: no findings.

Source review only. The isolated reviewer did not run SDK tests, typechecks or builds. No live provider/tracing/external saver/app-sink certification.

Main advanced to 9db504f during review. The existing branch is being refreshed for the Zod 4/dependency update. This completed review covers only 4112cc1, not the next head.

@lia-by-librechat

lia-by-librechat Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Head and independently reviewed SHA: 0410722
Base/merge-base: 9db504f (main). Existing PR retained and current main included.

Independent review: complete, no findings. Reviewed the full 23-file diff and merge resolution, including callbacks, hooks, completion, references, replay, checkpoint, child and both multi-agent channels. Source-only review: no reviewer-local SDK tests, typecheck or build. All inline review threads are resolved.

Exact-head verification Result
Result/reference/backend/saver/Zod schema 1,288 passed
Lifecycle/tracing/provider composition/parallel approvals 882 passed
Child/authority/forks/hooks/handoffs/budgets/compaction 614 passed; 1 existing benchmark skipped
Compaction-window/protected-history/replay 288 passed
Separate tsc --noEmit Passed
CJS/ESM/declaration builds, capability and exports Passed
Touched ESLint --max-warnings 0; import order; dependency cycles Passed
Light entrypoints 18 passed
Built CJS/ESM selected-read, native-release and partial approval controls Passed
GitHub CI 13 passed
Production audit 0 vulnerabilities

Recent finding dispositions:

Finding Severity Disposition
IR24/IR25 fresh/pending source authority P1 Fixed bef01a3, retained through main refresh
CX22–CX25 prototypes, saver writes, interrupts and deltas P1 Fixed e138c01
IR26 retained reload sources P1 Fixed f5864cb/3b17a35fe
SA1 receipt-bound partial sibling approvals P1 Fixed 3b17a35
IR27 selected saver read routing P1 Fixed 4112cc1

Main's Zod 4 dependency files are unchanged. Full audit has six low-severity Jest development-chain findings. Full-source strict lint has 56 warnings and zero errors, all in 16 files verified unchanged from main; touched files have no diagnostics. No unrelated dependency or lint edits.

Not run/certified: full SDK suite locally; live provider/Langfuse/Cloudflare/external saver backends; app/SSE/replay adapters; D1 serialized exporters. C2 requires an approved C1 release, exact pin/capability/policy and trusted adapter/app-sink certification. No committed documentation, activation or publication. PR remains open, not merged.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@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: 0410722ade

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

descriptors.tool_calls = { ...descriptors.tool_calls, value: detached };
if (Object.hasOwn(descriptors, 'lc_kwargs') && descriptors.lc_kwargs.value != null && Object.hasOwn(descriptors.lc_kwargs.value as object, 'tool_calls')) Object.defineProperty(descriptors.lc_kwargs.value, 'tool_calls', { value: detached, enumerable: true, writable: true, configurable: true });
}
const copy = Object.create(Object.getPrototypeOf(message), descriptors) as BaseMessage;

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 Rebuild checkpoint messages with trusted prototypes

When a protected run receives a restored or caller-supplied message subclass with ordinary own data fields, a non-proxy prototype can override getType() (or another message method) and this copy preserves that untrusted implementation. Subsequent code such as findLastMessageOfType in run.ts:3701 invokes the method after admission, so it can throw an error containing raw selected-tool output and bypass normalization. Rebuild admitted messages with a trusted SDK message prototype, or reject prototypes that are not recognized message prototypes.

AGENTS.md reference: AGENTS.md:L147-L147

Useful? React with 👍 / 👎.

Comment thread src/graphs/Graph.ts
Comment on lines +760 to +761
const values = snapshotToolCheckpointRecord(snapshot.values, ['messages', 'agentMessages', 'runStepState', 'summarizationRequest', 'handoffState']);
snapshot.values = values;

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 Snapshot handoff state before checkpoint admission

When a protected multi-agent run restores a custom checkpoint whose handoffState is a proxy or contains accessor-backed fields, this only copies the reference and never admits its nested state. HandoffRouting.restore subsequently reads fields such as version, entryAgentId, and transitions, so an accessor can throw an error containing raw selected-tool output after checkpoint validation; on the resume path this occurs at run.ts:2457 before the guarded stream. Deep-snapshot and validate handoffState before returning the admitted checkpoint.

AGENTS.md reference: AGENTS.md:L147-L147

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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.

2 participants