Skip to content

fix(binary): retain unconfirmed composite clients until close succeeds - #12599

Merged
morluto merged 2 commits into
morluto:mainfrom
Plastic-time:rrfz/composite-close-unconfirmed-children
Nov 20, 2026
Merged

morluto merged 2 commits into
morluto:mainfrom
Plastic-time:rrfz/composite-close-unconfirmed-children

Conversation

@Plastic-time

@Plastic-time Plastic-time commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem and outcome

Fixes #12591. When two child clients failed to close, confirming release for one could make the composite report cleanup complete while the other child still had an unconfirmed close. This happened when that child returned an error without a cleanup record.

Change and scope

The composite now records successful closes per child. An aggregate error follows the existing owners of reported cleanup resources and waits for a successful retry from each failed child without a cleanup record. Previously completed clients still skip the next close attempt. A retained aggregate keeps the small release records alive after retry.

Contract and boundary impact

The composite provider owns the child close results. Callers using the existing cleanup error can now observe an outstanding close even when the child supplied no resource identifiers. This changes cleanup reporting within the existing provider lifecycle. There are no new target operations, CLI or MCP schemas, package requirements, or Evidence formats.

Evidence and validation

On d648cb2aa, 38 focused tests and check:fast passed. Two additional regressions failed on the first reviewed head. The synthesized cleanup error now carries the child's release receipt, while a genuinely pending typed rejection retains its original cleanup owner. The controls cover exact rejection identity and selective retry.

Windows, Node.js 24.22.1, npm 11.19.1. The tests exercise the production composite and close adapter with controlled child clients.

  • On base 18f102d69, the 17 composite tests from d648cb2aa had 4 failures and 13 passes. With the change, the four focused files passed 38/38. npm run test:local -- src/application/binary/CompositeProvider.test.ts src/providers/AnalysisClientCleanup.test.ts src/domain/analysisCleanupRelease.test.ts tests/composition/analysis-sessions/compositeProvider.test.ts
  • Five individual mutations of the changed code each caused a focused test failure.
  • npm run check passed.

External provider processes, end-to-end CLI/MCP sessions, and the full test suite were outside this local run.

Author readiness

Human owner: @Plastic-time

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@Plastic-time
Plastic-time marked this pull request as ready for review November 20, 2026 00:12
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T00:29:54.614550Z d648cb2 New commits
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The reviewed changes appear safe to merge.

Summary

The PR keeps composite cleanup pending until every reported owner confirms release or every child without a cleanup record closes successfully.

  • Composite closes wait for every child that has not been confirmed.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Close child] --> B{Outcome}
  B -->|Success| C[Confirm child's release record]
  B -->|Pending typed rejection| D[Keep original error and owner]
  B -->|Other rejection| E[Create cleanup error]
  E --> F[Bind child's release record]
  D --> G[Composite follows reported owners]
  F --> G
  G --> H[Retry children whose close has not succeeded]
Loading

Reviews (3) · Last reviewed commit: "fix(binary): settle synthesized close fa..." · Reviewed by Greptile

@morluto
morluto enabled auto-merge (squash) November 20, 2026 00:28
@morluto
morluto merged commit 0be83b6 into morluto:main Nov 20, 2026
41 of 42 checks passed
@morluto morluto added area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Composite client reports cleanup complete while a child close is still unconfirmed

2 participants