gowalk-cicd 1.0.135 → 1.0.136

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 1.0.135
1
+ 1.0.136
@@ -18,6 +18,27 @@ import native_pods_process
18
18
  from native_prepare_evidence import report
19
19
 
20
20
 
21
+ # The Ruby bundle is only one of the things this script can refuse over, but every
22
+ # refusal used to carry the lockfile remediation below. printer-ai run 34374868740
23
+ # failed because CocoaPods could not clone a dependency from github.com, and the
24
+ # receipt told the session to "reconcile dependency locks locally" — locks that were
25
+ # never wrong. A configuration command that fails inside its own child publishes its
26
+ # own receipt and signals; point the reader at those instead (2026-09-09).
27
+ BUNDLE_REMEDIATION = ("Use the app's committed Gemfile and Gemfile.lock with a compatible Ruby/Bundler "
28
+ "runtime; reconcile dependency locks locally and retain deployment guards.")
29
+ COMMAND_REMEDIATION = ("The configuration command failed inside its own child, not in the Ruby bundle. "
30
+ "Read that child's own receipt and native_prepare_failed signals for the cause, "
31
+ "and repair what they name.")
32
+ BUNDLE_CODES = frozenset({
33
+ "native_gemfile_required", "native_gemfile_commit_required", "native_gemfile_lock_required",
34
+ "native_gemfile_lock_commit_required", "native_bundle_install_failed", "native_bundle_inputs_changed",
35
+ })
36
+
37
+
38
+ def remediation(code: str) -> str:
39
+ return BUNDLE_REMEDIATION if code in BUNDLE_CODES else COMMAND_REMEDIATION
40
+
41
+
21
42
  def command(argv: list[str], cwd: Path, log, *, timeout: float = 900) -> int:
22
43
  try:
23
44
  return native_pods_process.command(argv, cwd, log, timeout=timeout)
@@ -101,8 +122,7 @@ def main(argv: list[str]) -> int:
101
122
  answer = run(args.root, args.folder, args.proxy_helper, command_args)
102
123
  except (guard.Refused, OSError, subprocess.SubprocessError) as exc:
103
124
  code = str(exc) if isinstance(exc, guard.Refused) else "native_bundle_operation_unverified"
104
- answer = {"ok": False, "code": code, "next": "Use the app's committed Gemfile and Gemfile.lock with a "
105
- "compatible Ruby/Bundler runtime; reconcile dependency locks locally and retain deployment guards."}
125
+ answer = {"ok": False, "code": code, "next": remediation(code)}
106
126
  if getattr(exc, "diagnostic", ""):
107
127
  answer["diagnostic"] = exc.diagnostic
108
128
  report(answer, "bundle")
@@ -19,6 +19,15 @@ PARTIAL = re.compile(r"\bcurl(?:\s+18\b|:\s*\(18\))", re.I)
19
19
  # downloaded: <url> Response: Timeout was reached". A timeout leaves the successfully
20
20
  # fetched specs cached, so the second attempt resumes rather than starting over.
21
21
  TIMED_OUT = re.compile(r"Response:\s*Timeout was reached|\bcurl(?:\s+28\b|:\s*\(28\))", re.I)
22
+ # A handshake that dies mid-negotiation names no curl code and no verdict about the
23
+ # peer, so neither pattern above can see it: printer-ai run 34374868740 lost the iOS
24
+ # build to `LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443`
25
+ # while CocoaPods cloned a dependency, and 2phone-ios run 34374984763 lost the same
26
+ # step to bundler's `SSL_connect returned=1 ... unexpected eof while reading`
27
+ # (2026-09-09). Both are a connection the exit dropped before either side spoke, which
28
+ # the next attempt usually completes. A CERTIFICATE verdict is a different fact and
29
+ # stays permanent above: TERMINAL still vetoes this class whenever it appears.
30
+ HANDSHAKE = re.compile(r"SSL_ERROR_SYSCALL|unexpected eof while reading", re.I)
22
31
 
23
32
 
24
33
  def interrupted_transfer(body: str) -> bool:
@@ -30,11 +39,17 @@ def timed_out(body: str) -> bool:
30
39
  return bool(TIMED_OUT.search(body) and not TERMINAL.search(body))
31
40
 
32
41
 
42
+ def handshake_reset(body: str) -> bool:
43
+ return bool(HANDSHAKE.search(body) and not TERMINAL.search(body))
44
+
45
+
33
46
  def retryable(body: str) -> str:
34
47
  """Name the transient class this failure belongs to, or "" when it is not one."""
35
48
  if interrupted_transfer(body):
36
49
  return "partial_transfer"
37
- return "transient_timeout" if timed_out(body) else ""
50
+ if timed_out(body):
51
+ return "transient_timeout"
52
+ return "handshake_reset" if handshake_reset(body) else ""
38
53
 
39
54
 
40
55
  def install(argv: list[str], folder, log, snapshot: dict, *, timeout: float = 900) -> tuple[int, int]:
@@ -10,6 +10,12 @@ SIGNALS = {
10
10
  "bundler_version_missing": ("Could not find 'bundler'",),
11
11
  "tls_verification": ("certificate verify failed", "CERTIFICATE_VERIFY_FAILED"),
12
12
  "connection_timeout": ("Connection timed out", "execution expired", "Read timed out"),
13
+ # Distinct from tls_verification above: the peer never returned a verdict about its
14
+ # certificate, the connection died mid-handshake. printer-ai run 34374868740
15
+ # published signals=[] for `SSL_ERROR_SYSCALL in connection to github.com:443`
16
+ # (2026-09-09), so the session read an unclassified failure and repaired the wrong
17
+ # thing. Neither token appears in a certificate verdict.
18
+ "tls_handshake_reset": ("SSL_ERROR_SYSCALL", "unexpected eof while reading"),
13
19
  "dns_resolution": ("Could not resolve host", "getaddrinfo"),
14
20
  "partial_transfer": ("curl 18", "curl: (18)"),
15
21
  "disk_full": ("No space left on device",),
@@ -16,6 +16,16 @@ PARTIAL = "error: RPC failed; curl 18 transfer closed with outstanding read data
16
16
  # redaction — the form `retryable` actually sees.
17
17
  TIMEOUT = "\n".join(["CDN: trunk URL couldn't be downloaded: [URL redacted] "
18
18
  "Response: Timeout was reached"] * 30)
19
+ # Verbatim from printer-ai Mobile Deploy 34374868740, after the diagnostic's own URL
20
+ # redaction: CocoaPods cloning a dependency when the exit dropped the connection.
21
+ HANDSHAKE = ("Cloning into '[long value redacted]'...\n"
22
+ "fatal: unable to access '[URL redacted]': LibreSSL SSL_connect: "
23
+ "SSL_ERROR_SYSCALL in connection to github.com:443")
24
+ # The same fault one layer earlier, from 2phone-ios run 34374984763: bundler fetching
25
+ # specs. It names no curl code and no SSL_ERROR_SYSCALL, only the truncated read.
26
+ BUNDLER_EOF = ("Retrying fetcher due to error (2/2): Bundler::HTTPError Could not fetch specs "
27
+ "due to underlying error <SSL_connect returned=1 errno=0 state=error: "
28
+ "unexpected eof while reading>")
19
29
 
20
30
 
21
31
  class RetryTests(unittest.TestCase):
@@ -121,6 +131,43 @@ class RetryTests(unittest.TestCase):
121
131
  with self.subTest(body=body):
122
132
  self.assertEqual(native_pods_retry.retryable(body), "")
123
133
 
134
+ def test_dropped_handshake_recovers_within_the_same_deadline(self):
135
+ for failure in (HANDSHAKE, BUNDLER_EOF):
136
+ with self.subTest(failure=failure.splitlines()[-1][:40]):
137
+ (self.root / "attempts.json").unlink(missing_ok=True)
138
+ self.script([failure])
139
+ code, result = self.fixture.run_cli()
140
+ self.assertEqual((code, result["pod_attempts"]), (0, 2))
141
+ attempts = json.loads((self.root / "attempts.json").read_text())
142
+ self.assertEqual(len(attempts), 2)
143
+ for attempt in attempts:
144
+ self.assertEqual(attempt["argv"], ["install", "--deployment", "--no-repo-update"])
145
+ self.assertTrue(attempt["proxy"].startswith("http://127.0.0.1:"))
146
+ self.assertEqual((self.root / "Podfile.lock").read_text(), "fixture-lock")
147
+
148
+ def test_repeat_dropped_handshake_stops_after_second_attempt(self):
149
+ self.script([HANDSHAKE, HANDSHAKE, HANDSHAKE])
150
+ code, result = self.fixture.run_cli()
151
+ self.assertEqual((code, result["code"]), (1, "native_pods_install_failed"))
152
+ self.assertEqual(len(json.loads((self.root / "attempts.json").read_text())), 2)
153
+
154
+ def test_a_certificate_verdict_beside_a_dropped_handshake_stays_permanent(self):
155
+ for failure in ("certificate verify failed", "SSL peer shut down incorrectly",
156
+ "The requested URL returned error: 403", "curl: (60) unknown trust failure"):
157
+ with self.subTest(failure=failure):
158
+ (self.root / "attempts.json").unlink(missing_ok=True)
159
+ self.script([HANDSHAKE + "\n" + failure])
160
+ self.assertEqual(self.fixture.run_cli()[0], 1)
161
+ self.assertEqual(len(json.loads((self.root / "attempts.json").read_text())), 1)
162
+
163
+ def test_a_dropped_handshake_is_its_own_named_class(self):
164
+ self.assertEqual(native_pods_retry.retryable(HANDSHAKE), "handshake_reset")
165
+ self.assertEqual(native_pods_retry.retryable(BUNDLER_EOF), "handshake_reset")
166
+ for body in ("the peer read the file", "eof while reading the manifest",
167
+ "connection established", "SSL is configured"):
168
+ with self.subTest(body=body):
169
+ self.assertEqual(native_pods_retry.retryable(body), "")
170
+
124
171
  def test_one_deadline_and_no_guess_from_generic_eof(self):
125
172
  for body in ("fatal: early EOF", "curl 180 failure", "unknown network error"):
126
173
  self.assertFalse(native_pods_retry.interrupted_transfer(body))
@@ -30,6 +30,32 @@ class EvidenceTests(unittest.TestCase):
30
30
  self.assertEqual(receipt["phase"], phase)
31
31
  self.assertEqual(receipt["signals"], ["pod_version_conflict"])
32
32
 
33
+ def test_a_dropped_handshake_is_named_and_is_not_a_certificate_verdict(self):
34
+ for diagnostic, expected in [
35
+ ("fatal: unable to access '[URL redacted]': LibreSSL SSL_connect: "
36
+ "SSL_ERROR_SYSCALL in connection to github.com:443", ["tls_handshake_reset"]),
37
+ ("Bundler::HTTPError Could not fetch specs due to underlying error "
38
+ "<SSL_connect returned=1 errno=0 state=error: unexpected eof while reading>",
39
+ ["tls_handshake_reset"]),
40
+ ("SSL_connect returned=1 errno=0 state=error: certificate verify failed",
41
+ ["tls_verification"]),
42
+ ]:
43
+ err = io.StringIO()
44
+ with self.subTest(diagnostic=diagnostic[:40]), contextlib.redirect_stderr(err):
45
+ report({"ok": False, "code": "native_pods_install_failed", "diagnostic": diagnostic}, "pods")
46
+ self.assertEqual(json.loads(err.getvalue().strip().split("::", 2)[2])["signals"], expected)
47
+
48
+ def test_a_failed_child_command_is_not_reported_as_a_ruby_bundle_fault(self):
49
+ self.assertEqual(native_bundle.remediation("native_gemfile_lock_commit_required"),
50
+ native_bundle.BUNDLE_REMEDIATION)
51
+ self.assertEqual(native_bundle.remediation("native_bundle_install_failed"),
52
+ native_bundle.BUNDLE_REMEDIATION)
53
+ for code in ("native_configuration_failed", "native_pods_operation_interrupted",
54
+ "native_bundle_operation_unverified", "native_google_proxy_required"):
55
+ with self.subTest(code=code):
56
+ self.assertEqual(native_bundle.remediation(code), native_bundle.COMMAND_REMEDIATION)
57
+ self.assertNotIn("Gemfile", native_bundle.remediation(code))
58
+
33
59
  def test_success_is_silent_and_unknown_failures_cannot_inject_annotations(self):
34
60
  err = io.StringIO()
35
61
  with contextlib.redirect_stderr(err):
@@ -1 +1 @@
1
- 1.0.135
1
+ 1.0.136
@@ -1 +1 @@
1
- 1.0.135
1
+ 1.0.136
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gowalk-cicd",
3
- "version": "1.0.135",
3
+ "version": "1.0.136",
4
4
  "description": "Zero-config GitHub Actions delivery for iOS TestFlight and Android Google Play.",
5
5
  "type": "module",
6
6
  "bin": {