Skip to content

Validated follow-up: reparenting and async test fixes; upstream submission blocked - #8

Closed
Hylouis233 wants to merge 51 commits into
audit/upstream-20260911from
audit/bridge-repair-20260911
Closed

Hylouis233 wants to merge 51 commits into
audit/upstream-20260911from
audit/bridge-repair-20260911

Conversation

@Hylouis233

@Hylouis233 Hylouis233 commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

Final status — 2026-09-11

This author-owned validation PR remains closed without merging. Its historical PR head is not the current follow-up branch.

The original upstream contributions have been squash-merged:

  • document-skills upstream #6: contribution 04f2d42, merge 1acf3b368ee8d110daf1f6c050faff20fc56993e, 2026-09-11T06:36:15Z.
  • cli-agent-bridge upstream #7: contribution 53b51f2, merge dda9e0b4e72e0fc4ff10c7cf938e89a732d25f2c, 2026-09-11T06:36:31Z.

Those merges do not contain the later stability repairs. The new, clean follow-up is:

  • Repository: Hylouis233/MiniMax-Code-Plugins-1.
  • Branch: fix/bridge-stability-20260911.
  • Head: a3aa17c5a58b95e4b1a37bc603f4bff6ea5453a9.
  • Upstream base: dda9e0b4e72e0fc4ff10c7cf938e89a732d25f2c.
  • Two commits (a71f962, a3aa17c), only four changed files under cli-agent-bridge: process-tree.mjs, tests/process-tree.test.mjs, tests/server.test.mjs, tests/workspace-lock.test.mjs.
  • Final root tree: 04eed3dab7ac22fca0ecea5808429e0ca572d656.
  • Final bridge subtree: eac2902a283b73cbc431d91f5648ecbbc4c6a827.

New upstream PR creation was actually attempted and returned 403 Resource not accessible by integration, including the final attempt with this fully validated head. No new upstream PR number exists. Submission still requires an account/API connection with the necessary upstream access. This record does not claim the follow-up is merged or submitted.

Repairs and controlled comparisons

  1. Verified Linux child reparenting. A parent may exit after its final identity check and before its queued child is read. Accept a changed PPID only through repeated stable exact run-marker observations and another immutable start-identity check. Missing/wrong markers, PID reuse, unreadable state, and prior uncertainty remain fail-closed. Seven deterministic regressions were added; two fail on the original implementation, and all 52 process-tree tests pass after the repair.
  2. Windows semantic smoke budget. An unchanged baseline independently exceeded the artificial 5-second budget (5064 ms, expected backend stderr present). Only the argv/stream/exit semantic fixture now uses runCommand's existing bounded default, adds an explicit no-timeout assertion per call, and has a 180-second whole-test bound. All original assertions and dedicated cancellation/deadline tests remain.
  3. Deferred rejection assertion timing. The first post-merge integration exposed an unhandled rejection while fixture I/O was awaited before assert.rejects was registered. Immediately observe the complete outcome with allSettled and replay the original value/error to the original assertion. Production lease code and exact error-type checks remain unchanged. A controlled 100-ms yield fails on the old harness and passes on the repaired harness.

Production timeout behavior, Windows Job containment, root test concurrency, and the unsupported-POSIX production gate were not changed.

Final post-merge validation

Run 34575397571 validated the final indexed tree before publishing a3aa17c. The published commit has the exact same root tree listed above.

  • Linux complete npm run check: 431 tests, 420 passed, 0 failed, 0 cancelled, 11 existing conditional skips. Job 103186594442; artifact 10189599255.
  • Linux complete changed workspace-lock file: 27 passed, 0 failed, 0 skipped.
  • Windows complete changed workspace-lock file: 27 tests, 26 passed, 0 failed, 0 cancelled, one existing platform skip. Job 103186594634; artifact 10189428117. This is the complete changed test file, not a fresh complete bridge suite.
  • Merged document fixtures: 6 passed, 0 failed, 0 skipped, including real LibreOffice DOCX rendering.
  • Old-harness negative control: one expected unhandled-rejection failure; repaired-harness control: one pass. Negative-control failures are not candidate passes.
  • Publication artifact 10189604637 records final commit/root/component identities.

Earlier complete cross-platform coverage

Run 34572843946 tested the preceding three-file candidate 2553d839439bd87538b6c47ffa565e4b5c74199a, tree 1bd5b91444984d11e86f28b827bbfa238fd094d5:

  • Linux full root check: 431 tests, 420 passed, 0 failed, 11 existing skips.
  • Windows complete four-file bridge suite: 226 tests, 210 passed, 0 failed, 16 existing conditional skips.
  • All 52 process-tree tests passed on both platforms.
  • Historical Linux tag-only and cross-process-deadline cases passed three additional rounds each; Windows semantic smoke passed two more complete rounds.

That complete Windows run predates the final workspace-lock test-harness correction. Production bridge code and the other three test files are identical; the changed fourth test file was fully rerun on Windows in the final run. No fresh complete Windows run on the final root is claimed.

All results are author-fork hosted, not upstream-hosted or a fresh CodeQL result. The original plugin/cli-agent-bridge branch retains 2553d839 as work history; use the new follow-up branch for the next upstream PR.

Historical failures retained and evidence limits

  • First post-merge run 34574490523: 431 tests, 419 passed, one unhandled-rejection failure, 11 skips. Document fixtures did not execute. This failure led to the final harness correction, not merely a retry.
  • Two-file candidate 34571057851: Linux passed; Windows had 209 passes, one semantic timeout, 16 skips; no candidate publication.
  • Timing comparison 34572345325: unchanged baseline failed its first original-budget round; the candidate passed three original-budget rounds. No further baseline rounds are claimed.
  • Prior 53b51f2 Windows validation 34563611860: 203 passes, 16 skips; focused 34564398933: 18 passes.
  • Ubuntu 34563611871 first attempt had one tag-only cleanup failure; second attempt passed. CodeQL 34563611880 applies only to that earlier head.
  • September 5 failures remain in run 33947265965 and closed tracking PR Historical Windows failure audit — superseded by repair validation #8 #5.

The reparenting defect has deterministic red/green evidence, but old intermittent tag-only/holder-response logs cannot establish the cause of every historical occurrence. No claim of universal absence of future timing failures or expanded POSIX support is made.

The eight temporary audit workflows/patch-staging files were removed from the isolated audit branch in cleanup commit c2a8d116a5bf7fe36a187d521d8d890ef52980d6. Validated repair branches and historical test evidence were retained. No force push, upstream merge action, release, or deployment was performed by this follow-up.

Hylouis233 and others added 30 commits August 15, 2026 17:03
Delegate coding tasks from MiniMax Code to locally installed coding CLIs (Claude Code, Codex, Kimi Code, ZCode, DSH) through a dependency-free stdio MCP server with git-diff review. See NOTICE for upstream credits.
- claude template gains --permission-mode acceptEdits so headless runs can
  actually edit files (verified end-to-end with Claude Code 2.1.226)
- kimi keeps plain -p prompt mode: --auto/-y are mutually exclusive with -p
  on current Kimi Code versions
- git snapshot now lists untracked files (git ls-files --others) so new files
  created by workers appear in changed files
- README/SKILL document permission defaults and honest backend verification
  status
npm-style .ps1/.cmd shims cannot be spawned directly on Windows, so runCommand retries them through the bundled ps1-runner.ps1 (Windows PowerShell 5.1) with verbatim argument forwarding. README documents the fallback and the custom-wrapper caveat.
- per-workspace serialization of delegate_task
- SIGTERM then SIGKILL force kill after timeout grace
- snapshots include staged, untracked files and committed deltas
- delegate_task marked destructiveHint, isError on failures
- notifications/cancelled kills the worker
- honest protocol version negotiation
- fail closed when git snapshot commands fail
- ring-buffer output capture without repeated large copies
- README discloses supported operating systems
SKILL workflow and README tool description now cover before/after snapshots, committed deltas, same-workspace serialization, isError semantics, force-kill timeouts, and cancellation.
Seven self-contained tests cover protocol negotiation, tool list, snapshots, dirty-tree guard, unknown backends, cancellation, and before/after snapshots. SKILL wording now notes same-workspace serialization.
- workspace lock is now keyed by the canonical realpath of the git worktree
  root (git rev-parse --show-toplevel + fs.realpath), so the same checkout
  reached via a subdirectory, casing, or symlink shares one mutex (P1)
- a delegation cancelled while queued for the lock re-checks the cancel flag
  after acquiring it and returns before spawning the worker (P1)
- timeout and cancellation now terminate the whole process tree: taskkill
  /PID /T /F on Windows, signal to the detached process group on POSIX,
  instead of only killing the top-level child (P1)
- git snapshots tolerate an unborn HEAD (fresh git init) and committedDelta
  reports the first commits when the worker started from no commits (P2)
- codex templates delimit the prompt with -- so option-like tasks are not
  parsed as CLI flags (P2)
- README comparison example now requires two independent git worktrees; the
  queued same-checkout second run is documented as follow-up work (P2)
- SKILL resume guidance no longer implies results carry backend session ids

Tests extended to 11 (protocol, tools, snapshots, dirty guard, unknown
backend, in-flight cancel, before/after, worktree-root lock serialization,
cancel-while-queued, unborn HEAD, codex -- delimiter); 3 consecutive runs
green locally
- gitSnapshot/committedDelta executed their git commands via Promise.all;
  git status and git diff both refresh the index, so concurrent processes
  raced for .git/index.lock and intermittently failed with exit code 128,
  surfacing as random 'git snapshot unreliable' errors (reproduced 1-in-15
  on Windows; the fail-closed guard turned it into a JSON-RPC error)
- commands now run serially per repository; 10/10 Windows runs and a full
  npm run check in a Linux node:22 container pass
- test harness: every server now stops in a finally block (a leaked server
  kept stdin/stdout pipes open and hung node --test when an assertion
  failed - the cause of the stalled CI validate job), in-flight cancel test
  bounds its worker with an explicit timeoutMs
…ribution

- disclose repository concurrency: linked worktrees share refs, so snapshots
  detect other active leases plus completed runs' history records and mark
  attribution as potentially overlapping (repositoryConcurrency)
- attribute only genuinely new commits: ranges exclude all pre-delegation
  refs, so a branch checkout is reported as a HEAD move with no new commits,
  and non-commit refs (blob tags) are reported without failing the run
- verify process identity before signaling: Windows tracks creation times,
  POSIX groups are signaled only while the original leader identity matches,
  and reused PIDs are dropped from the tracked tree
- make lease state updates interruptible by the request cancellation/deadline
  and resync the interrupted release by owner token
- move quarantined leases to a recoverable state: removing the quarantine
  marker authorizes the next delegation to reclaim
- catch process-tree inspection failures in the close handler (fail closed
  instead of an unhandled rejection) and slow the Linux /proc monitor to 250ms
- tests: 55 total (checkout attribution, blob refs, concurrency disclosure,
  lease interruption, quarantined reclaim, PID-reuse identity)
- deduplicate HEAD and branch-ref targets so a commit on the checked-out
  branch is logged, diffed, and counted once with both labels
- diff new refs from their merge-base with the pre-delegation state, so a
  branch forked from a divergent branch never attributes pre-existing
  differences to the worker
- register list_backends in activeRequests and terminate a hanging version
  probe on cancellation, skipping the remaining probes
- signal the process group when enumeration is unavailable (containment wins
  when identity cannot be verified)
- strip only Git's line terminator from rev-parse --show-toplevel so a
  worktree root ending in whitespace canonicalizes correctly
- tests: 60 total, all green locally
Add cross-process repository locking, fail-closed process containment, safe Git attribution, explicit quarantine recovery, Windows Job Object execution, and regression coverage for reviewed lifecycle and documentable safety boundaries.
Hylouis233 and others added 20 commits August 17, 2026 15:44
…est script.

These tests share git/tmpdir fixtures and deadline-sensitive waits, so they take turns via an exclusive directory lock while the repository-wide `node --test` runner stays file-parallel.
…ck so Node 22 file-parallel runs cannot skip-fail.
Return structured lock-deadline MCP results and realpath-aware Trace2 worktree matching.
Qualify the built-in Add-Type command without relaxing control/worker environment filtering. Compare short and long runtime paths by filesystem identity, bound test RPC/named-pipe waits, retain raw diagnostics, and isolate the complete Windows suite from root CI.
Normalize CRLF only, with LF/CRLF positive cases and negative cases for missing delimiters, mismatched names, and missing instructions. Keep all validation and containment checks enabled.
@Hylouis233 Hylouis233 closed this Sep 11, 2026
@Hylouis233 Hylouis233 reopened this Sep 11, 2026
@Hylouis233 Hylouis233 changed the title audit: validate Windows bridge startup repair against current upstream Blocked: validate Windows bridge repairs and unresolved full-suite cleanup failure Sep 11, 2026
@Hylouis233 Hylouis233 changed the title Blocked: validate Windows bridge repairs and unresolved full-suite cleanup failure Windows repair validated; retain Linux full-suite instability follow-up Sep 11, 2026
@Hylouis233 Hylouis233 changed the title Windows repair validated; retain Linux full-suite instability follow-up Validated: Linux reparenting repair and Windows semantic smoke follow-up Sep 11, 2026
@Hylouis233 Hylouis233 closed this Sep 11, 2026
@Hylouis233 Hylouis233 changed the title Validated: Linux reparenting repair and Windows semantic smoke follow-up Validated follow-up: reparenting and async test fixes; upstream submission blocked Sep 11, 2026

Copy link
Copy Markdown
Owner Author

Submission follow-up — 2026-09-13

Rechecked the published follow-up branch fix/bridge-stability-20260911: its head is still a3aa17c5a58b95e4b1a37bc603f4bff6ea5453a9. Comparison against current MiniMax-AI/MiniMax-Code-Plugins:main reports 2 commits ahead, 0 behind, with exactly the four previously documented bridge files changed; the upstream base is still dda9e0b4e72e0fc4ff10c7cf938e89a732d25f2c.

Searched upstream for an existing PR from this follow-up branch and found none. Then attempted to create the follow-up PR titled fix(cli-agent-bridge): harden reparenting checks and async fixtures. The GitHub integration returned HTTP 403: Resource not accessible by integration. No new upstream PR was created. No additional write attempts or alternative authentication paths were used for that submission.

The proposed PR description explicitly distinguishes the September 11 exact-final-tree Linux/changed-Windows-file validation from the earlier complete Windows run. No tests were rerun during this submission check, and no new CodeQL, upstream-hosted validation, or production-platform support is claimed.

Remaining action: submit the existing validated follow-up branch through an authorized account connection or the account owner's GitHub web session. This is a submission-permission blocker, not a request to repeat the original plugin PR or redo the already documented repairs.

This historical validation PR remains closed without merging. No source, branch history, release, or deployment was changed by this follow-up.

Hylouis233 commented Sep 15, 2026 •

Copy link
Copy Markdown
Owner Author

Final current-upstream integration — 2026-09-15

The goal remains an upstream maintenance contribution. Keep this historical validation PR closed; it is not the new upstream PR.

Fresh run: https://github.com/Hylouis233/MiniMax-Code-Plugins-1/actions/runs/34949290063 — completed successfully on its first attempt at 2026-09-15T09:04:53Z.

Exact inputs and verified identities:

  • Source: a3aa17c5a58b95e4b1a37bc603f4bff6ea5453a9, unchanged branch fix/bridge-stability-20260911.
  • Upstream main: 2c4e2e66c19c2ddfce9bf5fac479e518f2365788.
  • Integration tree on BOTH native runners: f5d2dddc05e18153652109bc57682da0f258920a.
  • Bridge subtree: eac2902a283b73cbc431d91f5648ecbbc4c6a827, identical to the source branch.

The integration has no conflicts. Its only difference from current upstream is the original four bridge implementation/test files. No source-branch update or upstream merge was published.

New results (not recycled September 11 results):

  • Linux unchanged npm run check: 431 tests, 420 passed, 0 failed, 0 cancelled, 11 existing conditional skips.
  • Native Windows npm run validate: passed; 25 hosted plugins and all examples validated.
  • Native Windows COMPLETE four-file bridge suite using the upstream Windows workflow's command: 226 tests, 210 passed, 0 failed, 0 cancelled, 16 existing conditional skips.
  • Seven added process-tracking regressions and four cancellation/lease cases were individually confirmed present and passing in the Linux log.
  • Both archive digests and every file's SHA256SUMS entry were checked. Artifact IDs: Linux 10388209344, Windows 10389475189.
  • Both jobs checked the candidate tree after testing and found it unchanged. No failure rerun, new test skip, weakened assertion, or production-timeout change was used.

Both jobs use LF checkout for exact source-tree comparison. This is Linux whole-repository testing plus native Windows whole-plugin testing, not Windows whole-repository runtime testing, live vendor authentication testing, or additional production Linux/macOS support.

The one-time workflow was removed from its separate audit branch in 5449124acfa0ab7154c6146255f23f2bd7f2320a. The audit branch's final files have zero difference from its original source baseline. The contribution branch and both main branches are unchanged.

Upstream submission remains incomplete: this turn's actual Draft PR creation request returned HTTP 403 Resource not accessible by integration, so no new upstream PR number was created. The complete description and a prefilled GitHub submission form are prepared. An authorized user session is still required for the initial upstream submission; later upstream movement requires another integration check. No upstream merge, release, or deployment is requested by this record.

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