Inspect the `goal` branch and port its robust transient-retry behavior onto the
current branch. Preserve the current text-output compatibility contract and do
not bring over unrelated output-format changes. Run the tests.
