omnigraph/.github
Andrew Altshuler 587fbeabd8
ci(publish-crates): set User-Agent + treat "already exists" as success (#117)
Two related fixes uncovered while recovering the v0.5.0 publish.

1. crates.io API requires a User-Agent header. The `publish_if_new`
   skip check was doing a bare `curl -fsSL https://crates.io/api/...`
   which crates.io rejects with HTTP 403. With `-f` curl exits
   non-zero, the pipeline returns empty, the script doesn't recognize
   already-published crates, and we fall through to a real publish
   attempt. On a re-run that means cargo publish errors with
   "already exists on crates.io index" for crates that DID publish
   successfully on the previous run.

   Fix: send a `User-Agent: ModernRelay-omnigraph-ci (URL)` header.

2. Defense in depth: even with the UA, the API could hiccup. If the
   skip check misses an existing version and cargo publish errors
   with "already exists on crates.io index", treat as success
   instead of failing the whole run. This makes the workflow
   re-runnable after any partial publish without needing manual
   intervention.

Both fixes are required to recover from the v0.5.0 partial publish
where omnigraph-compiler@0.5.0 made it through but the run failed
before omnigraph-policy / engine / server / cli — re-triggering the
workflow now succeeds end-to-end.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 14:19:17 +01:00
..
scripts codeowners: yml source of truth + generator + drift CI (#88) 2026-05-13 17:26:06 +03:00
workflows ci(publish-crates): set User-Agent + treat "already exists" as success (#117) 2026-05-23 14:19:17 +01:00
branch-protection.json branch-protection: allow admin bypass on main (#94) 2026-05-15 03:32:12 +03:00
CODEOWNERS codeowners: yml source of truth + generator + drift CI (#88) 2026-05-13 17:26:06 +03:00
codeowners-roles.yml codeowners: yml source of truth + generator + drift CI (#88) 2026-05-13 17:26:06 +03:00