JuliusBrussee/caveman · error

%s %s/%s: invalid HTTPS source %q

Error message

%s %s/%s: invalid HTTPS source %q

What it means

Thrown by the catalog YAML loader when a source entry fails url.ParseRequestURI or is not an absolute https:// URL with a host. Sources are provenance links; HTTP, scheme-less, or malformed URLs are rejected so every citation is a clickable, transport-secure reference.

Source

Thrown at shared/platform/catalog/catalog.go:294

		if verified.After(time.Now().UTC().Add(24 * time.Hour)) {
			return nil, fmt.Errorf("%s %s/%s: verified_at is in the future", label, entry.Provider, entry.Model)
		}
		if entry.CapabilitiesVerifiedAt != "" {
			capVerified, err := time.Parse(time.RFC3339, entry.CapabilitiesVerifiedAt)
			if err != nil || capVerified.IsZero() {
				return nil, fmt.Errorf("%s %s/%s: capabilities_verified_at must be RFC3339", label, entry.Provider, entry.Model)
			}
			if capVerified.After(time.Now().UTC().Add(24 * time.Hour)) {
				return nil, fmt.Errorf("%s %s/%s: capabilities_verified_at is in the future", label, entry.Provider, entry.Model)
			}
		}
		if len(entry.Sources) == 0 {
			return nil, fmt.Errorf("%s %s/%s: at least one source is required", label, entry.Provider, entry.Model)
		}
		for _, rawURL := range entry.Sources {
			u, err := url.ParseRequestURI(rawURL)
			if err != nil || u.Scheme != "https" || u.Host == "" {
				return nil, fmt.Errorf("%s %s/%s: invalid HTTPS source %q", label, entry.Provider, entry.Model, rawURL)
			}
		}
		key := entry.Provider + "\x00" + entry.Model + "\x00" + entry.Region
		if _, duplicate := seen[key]; duplicate {
			return nil, fmt.Errorf("duplicate provider/model/region row %s/%s@%s", entry.Provider, entry.Model, entry.Region)
		}
		seen[key] = struct{}{}
	}
	return decoded, nil
}

// catalogCandidates lists the paths to try, in order: an explicit env override,
// the deploy-image and CWD-relative locations, then a walk up from the working
// directory so the catalog resolves when binaries or tests run from subdirs.
// Both repo layouts are tried: the monorepo keeps the catalog under public/,
// the published caveman repo has it at the top level.
func catalogCandidates() []string {
	rels := []string{

View on GitHub (pinned to 27d5a3981a)

Solutions

  1. Use the full absolute HTTPS URL: https://host/path.
  2. If the canonical page is http-only, link the https variant of the same page or find the vendor's https pricing page — the catalog does not accept http.
  3. Keep the value a bare URL; put commentary elsewhere.

Example fix

# before
sources:
  - example.com/pricing
  - http://example.com/pricing

# after
sources:
  - https://example.com/pricing
Defensive patterns

Strategy: validation

Validate before calling

func validHTTPSSource(raw string) bool {
    u, err := url.ParseRequestURI(raw)
    return err == nil && u.Scheme == "https" && u.Host != ""
}

Try / catch

Fail catalog load at startup naming the offending URL; do not auto-upgrade http:// to https:// (the target must actually serve TLS).

Prevention

When it happens

Trigger: Source values like "http://example.com/pricing" (wrong scheme), "example.com/pricing" (no scheme), "/pricing" (relative), or strings with characters that fail request-URI parsing; also empty-host URLs like "https:///pricing".

Common situations: Pasting a bare domain; a source captured as http:// because it was copied from a redirect; trailing prose glued to the URL ("https://x.com pricing page").

Related errors


AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15). Data as JSON: /api/errors/04164ecae154fdf9. Report an issue: GitHub.