Skip to content

Replace legacy CliWrap execution with shared Process lifecycle - #26

Merged
ShutenOishi merged 3 commits into
mainfrom
fix/phase8-process-compat
Oct 4, 2026
Merged

ShutenOishi merged 3 commits into
mainfrom
fix/phase8-process-compat

Conversation

@ShutenOishi

@ShutenOishi ShutenOishi commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

English

Windows net48 completion stalls after CliWrap's stdin/stdout/stderr/process Tasks are all complete. PR #25's controlled startup-context fix passes its regressions but still reproduces the stall in stress and the initial full suite. Remove that dependency async-iterator/promise path and share the existing explicit Process lifecycle on every target.

ADR-0024 supersedes ADR-0008/0023. Legacy compatibility is limited to attributed .NET native argument serialization, subscribe-before-HasExited exit waiting, and best-effort Windows descendant termination using System.Management 10.0.10. Keep the bounded 64KiB/16-segment input bridge, ordered EOF, blocked-writer release, caller stream ownership and deadlines through output drain. Preserve the former legacy finite-command EOF without an input source; modern finite inherited input and native APIs remain unchanged. Legacy Unix runtimes lacking native tree termination retain their immediate-child limitation.

Real-process regressions cover exact troublesome tokens/environment, already-exited processes, nonzero stderr/status, early session exit, blocked producers and legacy default EOF. Existing stream-fault/noncooperative-output tests now also run on net48. Clean development package consumers are audited independently of frozen alpha.2: legacy runtime graph is only System.Management/10.0.10 + System.CodeDom/10.0.10, modern execution dependencies are empty. Retain .NET MIT source attribution and current architecture/readmes/notices.

Final head 19ef88f, tree 6e96d4002fd2e9079df5e8fedc2642d886f53890, CI 37193749167 passed all 18 jobs at attempt 1. Independently verified Windows 39 TRX/2172 passing tests, 30/3/3 actual exit-0 rounds, 1170 paired completion/drain records, native Windows/macOS PG18.6 and Linux PG10–18 evidence. Merged as d66a1e2; exact-main CI 37194612585 passed all 18 jobs at attempt 1. Actual main Windows/native/Linux/package artifacts were independently checked; final receipt: #26 (comment). Prior run 37192663590 was cancelled after its Windows stress command remained pending beyond the step limit; this is not a passing stress receipt. A diagnostic-only revision now records each owned command PID, start/end/exit and enforces a 180-second command boundary without retries or changing test deadlines/counts. Local strict Release build: zero warnings/errors; Python: 35 passed; no local VSTest run. Intermediate CI 37192226343 passed Windows full/stress and native Windows/macOS but failed the new audit's initially incorrect build/runtime classification; the explicit correction and failure remain documented in comments. Require final full PR CI and actual Windows artifacts before merge, then exact-main verification. No proven historical root cause is claimed.

Public API, supported versions/frameworks and postponed publication remain unchanged. Do not retarget alpha.2 or its lock; no tag/Release/NuGet publication.

日本語

下位4Taskが完了後もnet48の上位完了が保留され、同期コンテキスト修正後にも停止したため、CliWrapの非同期列挙・promise経路を外します。ADR-0024に従い既存Processの終了監視を共有し、旧APIに不足する引数整形・終了通知・Windows子孫終了を補います。

入力上限・順序・EOF・呼出元stream所有権・キャンセル・期限を保持します。旧互換実行の入力未指定時EOFを維持し、modernの入力継承は変えません。実引数と環境、終了済みの子、非ゼロ終了とstderr、早期終了時の入力待ち解除などを追加検証し、I/O障害・非協調streamのテストをnet48にも広げます。

新開発パッケージの利用側グラフはSystem.ManagementとSystem.CodeDomの2依存です。固定alpha.2の監査・lockは保持します。最終head 19ef88f、CI 37193749167は全18ジョブ成功し、実成果物も独立確認済みです。main d66a1e229へマージし、正確なmain CI 37194612585も初回・全18ジョブ成功し、実成果物まで確認しました。最終記録はコメント5978994921に保持します。旧run 37192663590はWindows反復コマンドの停止後に取消となり、成功の証拠には数えません。診断変更で所有コマンドのPID・開始/終了・実終了コードを記録し、180秒のコマンド上限を設けます。テスト期限・反復回数は維持し、失敗後の再試行は行いません。ローカルbuildは警告/エラーゼロ、Python35件成功。中間CIの依存分類ミスと修正、Windows通常/30/3/3反復・native成功はコメントに保持します。最終全CIと成果物、マージ後の正確なmain CIを必須にし、成功するまで再試行はしません。公開API・対応範囲を保持し、外部公開は後回しです。

Copy link
Copy Markdown
Owner Author

Intermediate head b3fba6f, tree 00d26c2acc9afdda6149dac382fdbd0b5f8ed1de, CI 37192226343 attempt 1: Windows completes 561/559/559 full tests and all 30 net48 + 3 net8 + 3 net10 stress rounds (14/12/12 per round). Native Windows/macOS PostgreSQL jobs and modern suites also pass. Linux package audit fails because the initial expected dependency set mistakenly included private build dependencies. Clean-consumer runtime graph is only System.Management/10.0.10 and System.CodeDom/10.0.10; correct the audit/notices rather than weakening it. The new revision also preserves the former legacy finite-command EOF without an input source, with a dedicated net48 regression; modern inherited input is unchanged. Fresh final CI is required. This intermediate run is not an all-platform completion receipt.

日本語: 中間版はWindows通常テストと30/3/3反復、両native PostgreSQLを通過しましたが、Linuxの新依存監査の期待値がビルド専用依存を含めていたため失敗しました。クリーン利用側の実グラフ2依存へ修正し、旧互換実行の入力未指定時EOFも専用テストで保持します。最終版の全CIは改めて必須で、中間版を完了扱いにはしません。

Copy link
Copy Markdown
Owner Author

CI 37192663590 at head 2a1b77d, checkout 7b76eee/tree fcb2ee2389ffaae2a8c25c2a414b3c13c148932c: normal full suites, native Windows/macOS and corrected clean-consumer audit pass. Independently downloaded native Windows artifact 11299682370 (SHA256 1122994e8e58502b9ad140ff6c3eb9a6b011093b4a211ac441b4a57d3b4be751), native macOS 11299831087 (9f43652cdad1d278c2fe2c7fdd7df1df3a7291901120f9ba9685f7a61a52b812), and development package 11299218157 (bb4f3911a38c70701c47c2be63a155d817d7ca7f3135e2492ccf495fdfa349c1) match digest/head/source/report/TRX. Actual legacy clean-consumer runtime dependencies are System.Management and System.CodeDom only; modern runtime graph contains only PgCliSharp.

Windows stress step started 09:38:10 UTC and remained in-progress beyond its 10-minute cap (observed through 09:54 UTC); job log download returned BlobNotFound and no Windows artifact was available. Do not infer a library recurrence or a pass. Connector exposes no cancel-run operation. A meaningful diagnostic revision now records each owned test command's start/PID/TFM/round/end/elapsed/exit, independently bounds command lifetime including collector shutdown to 180s, targets only that owned invocation tree on timeout, reports 124, and stops without retry. Existing 15s/2m/10m deadlines and 30/3/3 counts remain unchanged. Workflow concurrency supersedes the unresponsive older run. Python fault/cleanup/nonzero checks: 35 passed; library source is unchanged in this diagnostic revision. Keep Draft and require new complete final CI before merge.

日本語: 通常テスト・両native・新依存監査は成功し、実成果物hash・ソース対応・TRXを確認しましたが、Windows反復が上限後も実行中でログと成果物が未取得です。成功/本番再停止とも断定せず保留します。各自所有コマンドの終了・PID・所要時間を記録し、180秒で独立監視して期限切れを失敗とする診断revisionを追加します。既存期限・回数は維持し、失敗を再試行しません。35件のPython検証は成功し、本番ライブラリはこの診断revisionでは変更しません。全CI完了前にはマージしません。

Copy link
Copy Markdown
Owner Author

English

Final replacement validation receipt (pre-merge): source head 19ef88f7d44f3edea5bab62c40674128f9612e01, PR checkout 9ed2dae09e9bf2307a811d694a8b0f398f507856, identical tree 6e96d4002fd2e9079df5e8fedc2642d886f53890, CI 37193749167 attempt 1. Windows full suites pass 562/559/559; all 30/3/3 stress commands finish with real exit 0 (36 started/finished, max 18.063 seconds). Independently downloaded Windows artifact contains 39 TRX / 2172 Passed / zero failures, 1170 paired parent completion-finished / child eof+drained records, actual CLR4 smoke Marker=1729 Token=37 Completed=True, and no DMP. Its SHA-256 is bfea98689a0861ee55a10d4127b78248acfe83df79a5327f8fb5d77c931331a7.

Independently downloaded native Windows/macOS reports and TRX pass representative PostgreSQL 18.6 scenarios; source/head/run match this checkout. All nine Linux PostgreSQL 10–18 reports and TRX were downloaded, digest checked and exact source/head/run/scenarios checked (including owned lifecycle, applicable rewind and 16→18 copy upgrade). Existing exclusions remain. Development package digest/provenance/nuspec and runtime graph confirm no CliWrap, legacy Management+CodeDom only and no modern execution dependency. Frozen alpha.2 remains its separate immutable source.

Inspected artifact IDs/digests:

  • 11300560358: sha256:58b38a602774f569efbec817fffb44814ba6abddd111621386badc5117bcb245 (native-postgresql-18-windows-latest-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11300331630: sha256:fb125d574cb349003718055b5700cbece1da26c915c49a064d9992e52c422b91 (real-postgresql-17-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11300307828: sha256:a08cb6e7ac3d7f7287b64f5dbf7e3032e74a81ecfbb37f514273d6617da0b762 (real-postgresql-14-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11300303063: sha256:6ab79d2cb1b5fc76e995b184e68be4a42dd6f7b4f52e5b139b685679826667f6 (real-postgresql-12-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11300268208: sha256:f966d880bc5a5dcc23d3b64a02ecc9d915a2724c64ec01c04ff80dd560256ef4 (real-postgresql-15-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11300203188: sha256:a71e1f0d4a8783199cec005cc88de54ae821819f76bbaa45b9fffb9a9b1bfa6e (real-postgresql-10-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11300043665: sha256:215cce972e932457c3648fbc94e2bd64003526765cd6d693acc80d1234f35cb3 (real-postgresql-18-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11300003180: sha256:5b28ffec2fbbbca9be9492ae792d5cc11646336d857a10866ea8fc95d93d51b8 (native-postgresql-18-macos-latest-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11299934026: sha256:832f9b8b2ebd76537cd9134cf4791e18941a73cfc453b56029b9b51f0488a04f (real-postgresql-16-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11299788559: sha256:0a1bd718f14bf023c9202f24cca48fe8e430c747febe8454ea038e1bea0a3664 (pgclisharp-development-packages-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11299638895: sha256:2ed23bb32a0a635e6afa9a0f576269d641c791848befa3072eb43e7ef8795fcb (real-postgresql-11-9ed2dae09e9bf2307a811d694a8b0f398f507856)
  • 11299589795: sha256:3fa61e04ab572ef54c257ee661c71681526d43812c712485f3e6c8a2f881ba3e (real-postgresql-13-9ed2dae09e9bf2307a811d694a8b0f398f507856)

Prior incomplete stress run 37192663590 completed as cancelled at 10:01:30 UTC after concurrency cancellation; its Windows job logs remain unavailable (404 BlobNotFound). It is not a passing receipt nor a demonstrated library recurrence. Baseline/partial-fix failures remain documented in PR #25. Final overall CI and exact-main receipt are recorded separately; external publication remains postponed.

日本語

最終PRのWindows通常562/559/559件、反復30/3/3回が成功しました。実成果物の39TRX・2172件成功、1170組の親子完了・排出、CLR4既知値とDMP未含有を独立確認しました。両native PG18.6とLinux10〜18の実レポート・TRX・ハッシュ・対象commit/runを確認し、適用されるrewindと16→18 upgradeの結果も確認しました。新NuGetのCliWrap除外と2つの旧互換依存も確認しています。取消runは成功に数えず、未取得ログから原因を断定しません。全CIの最終結果と正確なmainは追記します。外部公開は延期のままです。

@ShutenOishi
ShutenOishi marked this pull request as ready for review October 4, 2026 10:12
@ShutenOishi
ShutenOishi merged commit d66a1e2 into main Oct 4, 2026
18 checks passed

Copy link
Copy Markdown
Owner Author

English

Final exact-main receipt: merged commit d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c, tree 6e96d4002fd2e9079df5e8fedc2642d886f53890 (identical to tested PR tree). CI https://github.com/ShutenOishi/pgcli-sharp/actions/runs/37194612585 completed success, all 18 jobs, attempt 1. No rerun used. Local main is clean and matches this exact commit/tree.

Actual main artifacts were independently downloaded and digest checked. Windows: 39 TRX, 2172 Passed, zero failures; all 30/3/3 commands recorded start and real exit 0; 1170 paired parent completion-finished / child eof+drained records; actual owned CLR4 smoke 1729/37/True; no DMP. Native Windows/macOS PostgreSQL18.6 report and TRX pass. All nine Linux PostgreSQL10–18 reports and TRX pass with matching exact source/head/run, recorded server/CLI versions and scenario/exclusion scope. Development package provenance/nuspec match exact main, no CliWrap runtime graph, Management+CodeDom legacy only, modern execution dependencies empty. Frozen alpha.2 audits and read-only preflight pass separately; they do not contain this new backend or become a 1.0 candidate.

Main inspected artifact IDs/digests:

  • 11300119091: sha256:ade44a35b9e3bf0365078dd29a695d025731cdb8bb7114b97c3c07ea044de2b2 (native-postgresql-18-macos-latest-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11299939205: sha256:5325010c17696c9b877eee240a09f928776f4f29eaeaad62b0170e9e321dd05f (pgclisharp-development-packages-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11300039555: sha256:1c13e3aa7f34dc2a49004575f8e2e784da17a16b37c6b8fb6d23f6994dcabdd5 (native-postgresql-18-windows-latest-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11301055410: sha256:50295530acc7fab4452145ce2bc4a57fb7a1b29c002ac708ca8f176f6c62a2b8 (real-postgresql-16-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11300950696: sha256:0b05777e7a4ef058a42c72cca4efdbe30f49aec010c1c73b29b2fdd05f203d0b (real-postgresql-10-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11300456773: sha256:02c877e3d26b06e991a1c408aae9035c2e662fe10857f0463024db7c8311872c (real-postgresql-13-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11300398646: sha256:7e9c5672b6d33b6998ade1e256da64da1238ce1f9ce965a29d545cffcfe0eb39 (real-postgresql-15-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11300347331: sha256:d7459db32db6d048e9797828db25e5b62cce289d0da2127bbc6f0be0c6b41d60 (deterministic-tests-windows-latest-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11300144586: sha256:46d262bfccb52ccaf6d65bee8728c36dbf1413973b0988fdd2efad3d67794011 (real-postgresql-14-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11300074776: sha256:85732dc1a8a8bedf839746d996c32de715292fafac24ff499128172afc1c69f2 (real-postgresql-11-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11300004787: sha256:1b3183fff80a29a7de2170dea8b244d3693e853b5bb9584c1323f5f48f334c61 (real-postgresql-17-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11300676153: sha256:9d9d8d1fa4223edf16bc0f2bc32de9f8137fe813c98749035f508c616280083f (real-postgresql-12-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)
  • 11300646262: sha256:295d7f6fe46879e8ebf1e7fbd72801ba7d109ba4a5e62980f116b89e6f64799a (real-postgresql-18-d66a1e229d230d5f6d7b6fdd8db0c79a85bba89c)

ADR-0024 replacement implementation and bounded regression acceptance are complete. Prior failures/cancellation and unproven historical cause remain recorded; successful bounded runs are not a proof of all possible future concurrency behavior. PR #25 is superseded without merging its partial fix. No version/tag/Release/NuGet publication or 1.0 promotion is performed. A new exact-source distribution candidate and scoped 1.0 acceptance remain separate work.

日本語

main d66a1e229のCI 37194612585は初回・全18ジョブ成功です。検証済みPRと同じtreeで、ローカルmainも一致・未コミット変更なしです。Windowsの39TRX/2172件成功、反復30/3/3回の実終了0、1170組の完了/排出、CLR4実ダンプ自己検証、生DMP未含有を独立確認しました。両native18.6とLinux10〜18の実成果物・TRX・hash・commit/run、NuGetの出所と2つの旧互換依存も確認しました。固定alpha.2の監査は別ソースの成功で、この置換を含む1.0候補ではありません。

CliWrap置換の実装・マージ・上限付き回帰検証は完了です。旧失敗と取消は保持し、歴史的原因の断定はしません。PR #25は置換済みとして閉じます。外部公開は延期し、新配布候補の固定と1.0昇格の判断は別途残します。

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