Skip to content

fix(cli): reliable batch update and partial removal outcomes - #1129

Merged
777genius merged 7 commits into
mainfrom
fix/batch-update-partial-removal-20261127
Nov 27, 2026
Merged

777genius merged 7 commits into
mainfrom
fix/batch-update-partial-removal-20261127

Conversation

@777genius

@777genius 777genius commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Post-merge acceptance: complete for this PR's scope

The scoped update/removal changes are merged as a88b22c209b3c657890543df767ae98fa378a287. Final verification on 2026-11-28 confirms that both production files and all eight added PM cases remain present in main.

Required on current main a8e0f1716f207f210be5118d930d2c7df2803e7b passed. PM E2E on merged main ee6d714f9f684a5baf4b6740e4e8cb0481918be5 passed on all six platforms, with all six retained archives accepted through the completed byte audits detailed below. The seven subsequent main commits do not change CLI, installation or PM test inputs; the PM execution remains attributed to ee6d.

The original actual-merge Required failure is preserved below. The owner independently merged its fixture correction in #1130. Our locally prepared alternative was superseded and was never published. No second PR or direct-main write was made for this task.

Why

A Directory release marked current can still need regenerated command projections. update --all skipped preparation before this decision, leaving old projections untouched and bypassing the associated drift/security checks. Batch preflight also discarded original error values and output failures. Grouped removal could describe one client as fully removed although another client's failure prevented managed cleanup.

Changes

  • Route current Directory installations through the existing preparation and authoritative no-change path, retaining recorded owners, signed source eligibility and existing refusals.
  • Preserve actual preparation, recheck, client-detection and writer causes behind the exact safe preflight summary; retain sole JSON-result ownership even after a partial write.
  • Render external_completed as incomplete managed cleanup when the enclosing removal did not complete. Existing JSON phases and counts remain unchanged.

Production changes are confined to two existing CLI files. Eight public-command regressions join the existing PM evolution catalog; a ninth test covers presentation boundaries. No release is included.

Plan and review

Markdown plan and review dispositions

Two independent agent plan-review rounds preceded implementation. Two agent code-review rounds completed; the first found the remaining typed client-detection cause and it was reproduced and fixed. Three independent agents reviewing the final source found no blocking issue. The last test-only lint delta was reviewed separately. These are agent reviews, not human GitHub approvals or reviews from the external review services.

Executed local evidence

  • Tests-only commit 947afe7192449d6248da9e7937f4324d86eebe35: intended RED for all three defects, with independent positive/refusal controls passing.
  • Implementation 4111541a816648c25c7efe9f4cc8fd52a074d9c2: all nine focused tests pass; all 22 existing PM evolution cases execute and pass, including the eight additions.
  • make lint: PASS after mechanical preallocation/type-inference fixes. No lint exclusions changed.
  • make test-core: attempted locally, not a pass. This executor lacks Linux process-containment /proc/.../children support and denies Unix sockets. The hosted Core/Required evidence below provides the required execution.

The signed Directory fixture uses production verification with test-only Ed25519 trust. Source acquisition/detected clients and injected failures are controlled; these command fixtures do not establish production-issuer or vendor-native qualification.

Base integration

The former head's Windows authoring check failed TestSkillRootAndParentReplacement and TestSkillStageReplacementPreservesUnrelatedContent. Main already contains guarded-snapshot oracle corrections for these tests from #1131 and #1132; both updated-source Windows ARM64 and AMD64 runs have passed with no test skips. The AMD64 archive also confirms actual run/pass events for both formerly failing tests and their subcases. Main 2e8b2eb5d235c76f26720c728e286eb41d2a4333 was integrated through an ordinary two-parent merge. The independent integration review found no overlap, and complete tree verification confirms all eight scoped PR file blobs and modes are unchanged. The inherited main changes are two authoring test files and two conformance documentation files.

The former head's hosted Core test-core and hermetic check passed. Those are historical results, not qualification for the updated head. Its macOS Intel PM execution passed but artifact upload failed with ENOTFOUND; the updated head subsequently completed the qualification recorded below.

Final qualification

Qualified PR head: 520a1f5909dec13ebe9fa4da587bd60c63546b61
Tree: cdcec57ec8feae2f63e762610e101231207e6a3a
PR synthetic merge: 9a5fc749015c54e28b6877d2ea8f5b08cd92fcb3 (same tree; parents are current main and this head).

Gate Qualified PR run Status
Core 45942386514 PASS for the required make test-core execution and all other jobs; the separate optional coverage failure is disclosed below
Required 45942386658 PASS, all ten jobs, including actual hermetic staged-package execution
PM E2E, four PR platforms 45942386559 PASS on Linux, Windows, macOS ARM64 and Intel; all four actual ZIP reports inspected
Native Client Runtime 45942386607 PASS, all 11 runtime cells; actual ZIP reports and separate browser evidence inspected
Authoring native offline, including inherited Windows fixture correction 45942386663 PASS, all five execution jobs and the required aggregate; 28 focused aggregate controls passed

Completed Authoring logs establish both real CLI entrypoints, the expected head, and clean build provenance. Both Windows architectures have no test skips. Each Linux architecture retains one existing explicitly optional-unproven special-file case because its Unix socket fixture could not bind; that case is not claimed as tested on either Linux host.

The packed Linux job completed its existing expected-head build/pack/seal checker successfully. Exact-source checker review confirms enforcement of candidate/run identity, all 17 command phases, the required Go selection, 741 invocations, no failed/skipped Go or TAP events, and clean terminal source. The 684,961,045-byte archive exceeds the connector's 536,870,912-byte download limit; the raw packed archive and its internal JSON were not manually inspected. No workaround, workflow change or duplicate run was used.

Required execution evidence

The completed Required workflow includes make test-required, all four lint jobs and all three management-SDK cells. The main Node suite reports 1,231 passed and six existing opt-in/separate-stage skips, with no failures; the separately executed hermetic staged-package case passed without skips. Pinned loader conformance reports 133 passed with no errors/skips. Each SDK platform ran all 50 tests and the isolated packed consumer successfully. These execution counts are distinguished from the workflow's overall success.

Core execution and recovery

The first current-head test-core job started on garm-cnukdiishbzo at 12:42:44 UTC and entered real make test-core at 12:43:13. At 12:53:45 it ended with GitHub's explicit annotation that the self-hosted runner lost communication with the server. The test step and post-steps remained incomplete; the complete-log endpoint returned BlobNotFound. Visible partial package passes do not establish a successful core run. The underlying CPU/memory/network/process cause is not established.

Only that interrupted job was submitted once through GitHub's official targeted-rerun API. Attempt 2, job 140519954692, completed successfully on the same route and exact source. The full decoded log verifies actual make test-core from 13:21:52 to 13:31:16 UTC, with all 77 package results successful and no failed package result in that required command. The fourteen prior successful executions remain the evidence for those jobs; carry-forward records in attempt 2 are not described as new test executions. Source, workflows and runner routing were not modified.

The later optional Report core coverage command is not a successful test run: its existing || true masks TestGitRootPrefetchFailingSourceReturnsTheSerialError/tree_other/pc//plugins/pc, which reports roots started after the failure: [acme/pb//plugins/pb]. The required command above and this failed coverage invocation are separate evidence. Primary source review and two independent agent reviews found that the unchanged fixture observes the first source callback, while the unchanged engine records admission and launches workers in key order. The earlier pb worker is admitted before failing pc and may enter its callback later; earlier keys are deliberately retained to preserve serial error order. The serial-error and single-failing-read assertions preceding this assertion passed. This observation does not establish new post-failure admission or state/ownership corruption. At that PR qualification point, the test, Git-root helper, ordered engine and workflow were byte-identical to base 2e8b2eb5d235c76f26720c728e286eb41d2a4333; the exact scheduling trigger was not established. This independent test-observation limitation remains disclosed, without weakening assertions, changing workflow behavior or rerunning unchanged source to seek green.

PM archive acceptance

All four actual ZIP archives were downloaded and independently inspected by an agent and the primary agent. Each report.json records the expected synthetic merge/tree above, dirty: false, empty working changes, stable source identity, full_qualification: true, and no excluded tests. Every platform passed all 16 phases: 14 exit-zero phases plus the two expected exit-one missing-lock/malformed-package refusal checks. Raw Go event streams contain run/pass for every required catalog, installation and composition case, including all eight new evolution IDs; no failed or skipped test events occur. All 128 archived stdout/stderr hashes and all four ZIP digests/CRCs were recomputed successfully. Both catalog hashes match exact-head source bytes. Existing artifacts do not include the built executables, so their recorded binary hashes were not independently recomputed.

Native runtime acceptance

All 11 current-run native archives match the expected head/tree and official transport hashes. Their required test inventories were compared with the exact-source selection; all 70 selected top-level test executions ran and passed, with no skipped tests. Archived member hashes and nested admitted-package ZIPs were checked. This uses real pinned Claude, Codex and OpenCode clients with scripted loopback providers; it does not qualify production models or OAuth. The separate browser evidence archive was also inspected, including eight PNGs. Codex Linux browser/terminal receipts confirm four installations, three remaining after selective removal, zero after final removal, preserved foreign content and no model request; both Playwright runs passed without skips.

Independent live-audit finding — remains unqualified

The Windsurf prepared-installation audit failed on Firebase row 6: HeldTree._capture raised retention total bytes exceed bound at the existing 256 MiB aggregate custody limit. The actual checkout was the synthetic merge above. The saved artifact was inspected and its transport hash/CRC verified. This check remains failed; its partial summary is not a 30/30 pass or proof that every later case failed. The artifact does not record the exact retained path, accumulated size, leaf size or public-command exit at that failure.

Two independent agent investigations and primary source review found this failure independent of #1129: the retention, Windsurf and live-audit source files are byte-identical to main 2e8b2eb5…; add/repeat-add do not enter updateAllSession, and removal uses JSON while this PR changes only human removal rendering. A separate baseline main execution was not performed. This assessment covers the observed retention failure; other unsupported/refusal rows are not converted into passes. At pre-merge review, #1078 touched the separate audit area but contained no prepared fix for this byte-bound failure. The then-current #1133 head added diagnostic custody observations while preserving the refusal and unqualified result; that independent work is not absorbed here. In accordance with the plan's explicit exclusion of unrelated audit work, this PR preserves the failed check and evidence without extending scope, changing the limit, adding a waiver or rerunning unchanged source to seek a green result.

Coverage review disposition

The Codecov comment was checked against the exact-head line report and source. The collector's missing update_all.go:166 statement is the original-error append in the late checkPrepared failure branch. Source review confirms that exact scoped error reaches the common safe result/join path; direct execution of this particular late-check branch is not claimed from the PM archive evidence. The partial remove_multi_presentation.go:24 statement refers to the existing human-writer failure return on line 25; the new contextual-status helper and its outcomes are covered. No correctness blocker was found. This bounded coverage gap is recorded explicitly; no source change or coverage exclusion was added for a percentage target.

The pre-merge 2026-11-27 12:45 UTC inventory of all 13 open PRs found no direct overlap with our eight paths. Changed heads #1130 (713053bf…, 123 files) and #1133 (486fdfd9…, 10 files) were checked through complete changed-file lists; other heads are unchanged. At that review, #1130 contained adjacent enterprise-policy implementation requiring combined update-preparation and JSON-ownership revalidation after integration; the merged-main qualification below now provides that follow-up. Held #1114, #530 and #832, runner routing and sites remain outside this PR.

Actual merge and final main qualification

The ordinary expected-head squash merge completed at 13:42:58 UTC on 2026-11-27.

  • Actual merge: a88b22c209b3c657890543df767ae98fa378a287; parent 2e8b2eb5d235c76f26720c728e286eb41d2a4333.
  • Actual tree: cdcec57ec8feae2f63e762610e101231207e6a3a, exactly the qualified PR tree; all eight scoped blobs and modes were preserved.
  • Original actual-merge Required 46009502171: FAILED, as detailed below. All independent lint, SDK and hermetic jobs subsequently completed successfully; the push classifier was skipped.
  • Original actual-merge PM 46009501751: all six platform jobs completed successfully. Five archives were manually inspected during the original session. Complete six-platform archive acceptance is established below on the later fixed main source.

Original mandatory failure and independent resolution

The original main test job 140541096626 ran make test-required from 14:28:41 to 14:38:25 UTC and failed inside repotests/TestCLIModule: TestGitRootPrefetchFailingSourceReturnsTheSerialError/tree_other/pc//plugins/pc reported roots started after the failure: [acme/pb//plugins/pb] at line 342. This also occurred without coverage instrumentation. Node execution was not reached; the later manifest, generated-artifact, vet and conformance steps were skipped and remain unqualified for that run.

A narrow alternative correction was reviewed and prepared locally, but never committed or pushed. Its local compilation attempts were killed before tests executed, so they provide no test qualification. The owner independently merged #1130 as ee6d714f9f684a5baf4b6740e4e8cb0481918be5 on 2026-11-28 at 13:59:53 UTC, superseding that local candidate.

Independent source review confirms that #1130's actual fixture correction controls the failure window using the serial distinct-root prefix and admitted worker window before injecting the error. It retains the original assertion against callbacks starting after the controlled failure, serial-error comparison, single failing read, bounded extra reads, serial-read inclusion, cancellation and cleanup controls. The ordered-prefetch production engine is unchanged. This is the correction from #1130, not our unpublished alternative.

Focused stress run 46139581815, job 140962309362 executed go test -race -p=2 -count=20 -timeout=12m -json: all five selected prefetch/error/cancellation root tests ran and passed 20 times, without failure, skip or race report. Execution was on fe7c6951ebd27260d6adacd63b2b4ff2e09e5901; its tested fixture blob 2b5e3d7cc32f8eecf98d9436c1e5718398a5acb0 is the merged fixture. This evidence is attributed to that source, rather than described as a new stress run on current main.

Current main Required

Required 46157224291, attempt 1, completed successfully at 17:11:57 UTC on 2026-11-28, on exact current main a8e0f1716f207f210be5118d930d2c7df2803e7b. All nine execution jobs passed; the change-classification job was skipped on this push. Full decoded logs establish:

  • Actual make test-required, including uncached workspace test execution. The Node suite reports 1,231 passed, zero failures and six existing skips; the separate hermetic staged-package execution passed.
  • All four manifest controls, generated-artifact verification and make vet passed. Pinned strict loader conformance reports 133 passed, no failures/errors/skips.
  • All four lint jobs passed with zero issues, including the existing Windows containment/managed-stdio selections and shrink-only negative controls.
  • Linux, Windows and macOS SDK jobs each ran all 50 tests and their isolated packed consumer successfully.

The initial failed Required run remains failed. The later pass follows the merged fixture correction and is not an unchanged-source retry or a waiver.

Merged-main PM execution and retained-byte acceptance

PM E2E 46152361142, attempt 1, passed on Linux x64/ARM64, Windows x64/ARM64 and macOS Intel/ARM64. All six actual runtime logs bind to ee6d714f9f684a5baf4b6740e4e8cb0481918be5, tree fa9f279164dc3060ebe300db608963060a9d4d19.

Two already completed hosted, read-only artifact audits inspected the six original ZIPs:

The primary agent and an independent agent read the pinned auditor implementations and actual successful audit logs. The six receipts match the original run/job/artifact identities and official sizes/digests. This is acceptance of actual hosted byte inspection; no local ZIP recomputation is claimed for these six later artifacts.

Each archive passed ZIP size/SHA256/CRC validation, clean exact source/tree/platform identity, catalog-byte hashes, all 23 phase statuses and expected exit codes, and all 46 stdout/stderr hashes. Exact-source inventory comparison requires 140 canonical names: 107 catalog names, 19 installation names, six composition names and eight collection names. Raw Go events contain all required run/pass pairs and 463 total run/463 pass events per host, with no failed or skipped test events in these streams. All eight cases added by this PR are individually required by that inventory. All six collection commands and the 17 agreement/ownership root selections also passed.

The Windows held-reader supplement executed only on Windows x64, matching the existing workflow condition: all six required roots and 24 raw run/pass events are verified. It is explicitly not applicable on the other five hosts. Preservation assertions use executed controlled fixtures; complete filesystem snapshots and built executable bytes are not retained. This PM evidence does not qualify production model calls or vendor authentication.

Integration and scope boundary

Verified ancestry is a88b22c… → ee6d714… → current a8e0f17…. Both production files, the PM evolution mapping and all eight added case IDs remain unchanged after this PR. The seven commits from ee6d to current main change 13 files in other workflows, evidence/docs, audit helpers and the landing lockfile; they change no CLI, installation, Go-module or PM workflow/helper/catalog inputs. PM execution is therefore reported at ee6d, with Required separately executed at current main.

The latest open-PR inventory was reviewed; this task adds no further PR and does not absorb held #530, #832 or #1114. Historical optional coverage, unrelated live-audit failures and the bounded direct-branch coverage gap remain disclosed above. The separate current-main Published Marketing Kit Project E2E run 46157224346 is failed and outside this update/removal scope; this completion does not label every repository workflow or every historical invocation successful. No release, tag or npm publication is included.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 2e8b2eb and 520a1f5.

Files selected for processing: 8

  • cli/internal/agentpluginscli/package_manager_evolution_test.go
  • cli/internal/agentpluginscli/remove_multi_presentation.go
  • cli/internal/agentpluginscli/remove_partial_presentation_test.go
  • cli/internal/agentpluginscli/testdata/package_manager_e2e_cases.json
  • cli/internal/agentpluginscli/update_all.go
  • cli/internal/agentpluginscli/update_all_directory_projection_test.go
  • cli/internal/agentpluginscli/update_all_preflight_errors_test.go
  • docs/plans/2026-11-27-batch-update-partial-removal.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@777genius
777genius marked this pull request as ready for review November 27, 2026 02:01
@strix-security

Copy link
Copy Markdown

Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here.

So far, Strix has reviewed 392 pull requests, surfaced 113 security issues (1 critical/high) and blocked 3 risky merges across this workspace.

Include the existing guarded Windows authoring snapshot fixes from #1131 and #1132 after the old-head native authoring check reproduced that baseline failure. Preserve all eight reviewed #1129 file blobs.
@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.40%. Comparing base (f75a1b9) to head (520a1f5).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ernal/agentpluginscli/remove_multi_presentation.go 83.33% 0 Missing and 1 partial ⚠️
cli/internal/agentpluginscli/update_all.go 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1129      +/-   ##
==========================================
+ Coverage   64.38%   64.40%   +0.02%     
==========================================
  Files        2353     2353              
  Lines      143080   143089       +9     
==========================================
+ Hits        92121    92159      +38     
+ Misses      37894    37874      -20     
+ Partials    13065    13056       -9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@777genius
777genius merged commit a88b22c into main Nov 27, 2026
128 of 130 checks passed
@777genius
777genius deleted the fix/batch-update-partial-removal-20261127 branch November 27, 2026 13:43
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