fix(sell): default ollama health-path to / and harden registration edges#780
Merged
Merged
Conversation
sell.go's --health-path defaulting only special-cased litellm, so the
documented "obol sell http --upstream ollama" flow (and flow-06's default
ollama branch, which hardcoded /health/readiness) never passed
UpstreamHealthy: ollama only returns 2xx at "/". Extract the defaulting into
defaultHealthPathForUpstream and add an ollama case defaulting to "/";
mirror the fix in flow-06 (ollama -> "/", litellm keeps /health/readiness)
and document it in monetize-inference.md. Emit a u.Dim note when either
default fires, and document both special cases on the --health-path flag.
Also, three low-severity hardening fixes flagged alongside it:
- normalizeAgentOrigin now rejects scheme-less ("//host") and non-HTTP
("ftp://host") origins instead of minting a malformed on-chain agentURI.
- enableRegistrationOnOffers honors a new
"obol.stack/no-auto-register: true" annotation so a deliberately
--no-register offer can stay unlisted even after a later
"obol sell register" bulk-enables everything else on its network.
- isTransientRegistrationError now classifies "already known", "nonce too
low", and "replacement transaction underpriced" as transient:
registerWithRecovery pins and reuses the same nonce across retries, so a
broadcast-timeout retry hitting one of these means no new tx was accepted
(no double-mint risk) -- treating them as transient gives
recoverRegistrationByOwnerAndURI more time to see the original broadcast
land instead of misreporting a landed mint as failed.
flow-04-agent.sh's dashboard probe now asserts dash_login is exactly 200 or
401 and dash_root is exactly 302, instead of merely rejecting 500/000.
Claude-Session: https://claude.ai/code/session_014YjPMViNrZ7zBVgUQzwEKk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Blocker #4 + sell-CLI edges from the PR #756 review. The 2xx-only UpstreamHealthy gate special-cased only LiteLLM; Ollama serves neither /health nor /health/readiness (200 only at /), so the documented ollama flow and flow-06's ollama branch never reached Ready. Adds the ollama default (/) with a notice, fixes flow-06 + docs. Also: normalizeAgentOrigin rejects scheme-less/non-HTTP origins; enableRegistrationOnOffers honors an opt-out annotation; pinned-nonce retry classifies already-known/nonce-too-low/replacement-underpriced as transient so a landed mint isn't misreported failed; flow-04 probes tightened.
https://claude.ai/code/session_014YjPMViNrZ7zBVgUQzwEKk