Skip to content

feat(application): read bounded source-local SDK clones - #1018

Merged
pengfei-threemoonslab merged 3 commits into
mainfrom
codex/911-agent-clones
Oct 10, 2026
Merged

pengfei-threemoonslab merged 3 commits into
mainfrom
codex/911-agent-clones

Conversation

@pengfei-threemoonslab

@pengfei-threemoonslab pengfei-threemoonslab commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Application comparison can now read an OpenAI Agents SDK clone from a unique source-local SDK agent, retaining inherited tool, handoff and MCP lists and explicit overrides. Narrowing the clone produces rows for the clone while preserving the source agent.

Refs #911. Stacked on #1017 (codex/874-instance-tool-flow). This is a bounded source-local increment: imported/custom-instance/template receivers and full GRAAL acceptance remain open. Corpus scores, ledgers, goldens, baselines and released-build evaluation are deferred by the owner.

Boundaries

  • At most eight clone hops; exact SDK constructor/method, namespace and retained-handle proofs remain required.
  • A literal name override names the clone; other identities use stable source construction labels. Construction provenance is retained separately, so an unread replacement at the same site is uncertainty, never an established deletion.
  • Literal function-tool name filters can narrow the list. Object display names supply no runtime filter proof; other conditions remain source text.
  • Shallow shared lists retain their mutation limits across source/clone holders, including aliases, conditionals and second-level inheritance. New list literals, spreads and list copies do not become shared list containers.
  • Optional agent_settings carries recognized source literals, not runtime authority. Tools remain bound under tool_choice="none". Conflicting or unread settings carry row-specific uncertainty.
  • Default static scan does not expand clone observations. No baseline, waiver, policy or workflow was changed.

Authorship

  • A coding agent wrote some or all of this change. Agent: Codex.
  • A person read the whole diff before opening this pull request.

Validation

  • 92 new clone tests passed, including real Git/CLI before/after comparisons, constructor and alias refusals, handoffs/MCP, identity movement, unread replacements, settings conflicts and shallow-copy mutations.

  • Independent review passed 310 related tests and the final 214-test selection, plus explicit no-alias sharing and separate-new-list probes.

  • Final stable constructor compatibility selection: 913 passed. After the final binding-scope absence correction, clone/source-identity/unobserved compatibility: 214 passed independently and locally.

  • An earlier related selection had no assertion failures but six frozen-engine fixture errors because the implementation moved during that run. The affected constructor modules were rerun against unchanged source and all 913 cases passed.

  • Ruff and diff whitespace checks passed.

  • Original committed-source verifier/control at a63f0c817ef0: complete, release decision passed.

  • Sequential restack at 8ed96b350e60: candidate-object refusals and candidate uncertainty annotations were retained alongside clone filtering and inherited handoffs. 94 candidate/clone tests passed before the unchanged scope-fix replay; extra independent combination review passed 383 tests and found no actionable P1/P2; candidate uncertainty, inherited conditions and refusal routes were preserved. Committed control is complete / passed; the first stacked CI exposed a stale clone-is-unread assertion; its independently reviewed correction is recorded below.

  • CI compatibility correction at 3618a3077f31: the existing imported-tool fixture now requires all three supported clone/source changes, their exact source and empty uncertainty/gaps. Clone-method replacement and escaped-handle cases still require partial / not_established with side-specific refusal evidence.

  • Complete imported-tool/clone compatibility selection: 289 passed; independent test-only follow-up: all 4 original parameter cases passed, including both refusal subcases. No production source was changed. Committed control is complete / passed; exact-head GitHub CI passed all 14 applicable checks, including six suite shards and aggregate coverage; the release-tag-only check was skipped.

  • Six-increment combination at a4ea56e5987bf: 1,546 passed, 1 skipped. Final product source is identical after the test-only correction; independent combination review passed 383 tests with no actionable P1/P2.

Independent review and fixes

  1. Fixed two P2s: same-name clones with different settings were merged/compared as certain; object display names were used as runtime filter names. Conflicting settings now taint each affected row; object-filter membership stays uncertain.
  2. Fixed P2s in absence and setting evidence: replacing a literal/fallback clone with an unread factory looked like deletion; a model override could look like a known setting deletion. Structured construction and binding-target labels, including unpacked/loop/annotated assignments, imported objects and both syntactic/global/nonlocal binding scopes, now protect absence, and unread setting decisions carry uncertainty. Settings-only row explanations identify the actual changed declaration.
  3. Fixed a P2 in shallow-copy sharing: adding a tool through a clone could leave the source falsely complete. The existing in-place mutation route now follows shared literal, explicit-field, alias, conditional and second-level list holders. Independent final review found no remaining actionable P1/P2.

CI follow-up: the reviewer independently reproduced the obsolete partial expectation, verified the supported source-local clone's three changes and refusal variants, then reviewed the exact test-only correction. No actionable P1/P2 remained. CI coverage correctly rejected the earlier incomplete suite; no gate, expectation for a refusal, or test selection was weakened.

The SDK clone contract is a shallow copy. No code was imported or executed to discover agent behavior.

Ordered merge preparation

This increment was replayed onto main 337fb5cd44eb, after #1017. New head 5daa9a061904 has exactly the same file content as reviewed head 3618a3077f31 (full-tree diff equality). Fresh committed control is complete / passed; exact-head CI for the replay passed all 14 applicable checks; release-tag-only check skipped. The preceding main commit passed all 13 CI jobs before this merge. Baseline implementation remains deferred.

Post-merge main verification

Squash-merged as 662236c775b29b4cec1d424e87818743a9fa0ee9. The main tree exactly matches the reviewed PR head. Post-merge targeted tests passed: 289 tests. Fresh committed verification on that main commit returned complete / passed. Main CI run completed successfully with all 13 jobs passed. Baseline, corpus, ledger, Q2 and released-build evaluation remain deferred.

@pengfei-threemoonslab
pengfei-threemoonslab changed the base branch from codex/874-instance-tool-flow to main October 10, 2026 22:53
@pengfei-threemoonslab
pengfei-threemoonslab merged commit 662236c into main Oct 10, 2026
15 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