Skip to content

fix: keep Retry-After when the service says the budget is spent - #10

Merged
VikramLex merged 2 commits into
Graphicle-AI:mainfrom
rudycelekli:fix/python-retry-after
Oct 25, 2026
Merged

VikramLex merged 2 commits into
Graphicle-AI:mainfrom
rudycelekli:fix/python-retry-after

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

The service sends Retry-After on a 429 when the monthly budget is spent. The Python client raised GraphicleError without that delay, so a caller could not tell when to retry.

crates/graphicle/tests/test_sdk_retry_after.py failed on main with AttributeError: 'GraphicleError' object has no attribute 'retry_after'. After this change the same three tests pass, including an HTTP-date about two hours ahead. A 429 with no Retry-After stays a plain error.

Connector, OAuth, vector, graph and model endpoints accepted plain HTTP only for localhost, 127.0.0.1 and [::1]. A local model or connector on 127.0.0.2 (any other 127/8 address) or [::ffff:127.0.0.1] was refused with "Use HTTPS, or HTTP on loopback", although it is loopback. The graph engine's provider check already accepts all of 127/8.

Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
@VikramLex
VikramLex force-pushed the fix/python-retry-after branch from eb067b7 to f48a3d2 Compare October 25, 2026 05:12
VikramLex added a commit that referenced this pull request Oct 25, 2026
…HTTP (#11)

Code graph: the engine follows Graphify 0.9.95 (0.1.6 followed 0.9.91).
The four releases 0.9.92 to 0.9.95 are ported, and against 0.9.95 every
comparison check passes on Linux. YAML files are code, read structurally;
each C# overload is a node of its own, with calls bound by argument count;
type aliases and declarations are read in more languages; graph.json keeps
parallel edges, and every reader reads an older graph.json the same way.
The AST cache format and the code graph's episode names changed, so the
first sync after upgrading extracts every file again and builds the code
graph once more. graphicle graph update works on a graph over 512 MiB,
such as that of kubernetes. Graphicle Core leaves the YAML keys out of its
own code graph for now.

Connections: the program allows plain http to every loopback address for
the models, connectors, OAuth, vector and graph endpoints it calls, such
as a local model on 127.0.0.2 (#11, by @rudycelekli).

SDKs: the Python SDK keeps the service's Retry-After on an error, as
GraphicleError.retry_after in seconds (#10, by @rudycelekli). On top of
it, a Retry-After that is neither a number of seconds nor an HTTP date
leaves retry_after as None, and the error stays a GraphicleError.

Security: URLs with credentials, a bad port or no host are refused, and
multicast addresses are blocked. Installing or refreshing a skill no
longer writes through a symbolic link at SKILL.md or its version stamp,
and its backups never follow a link. A link that a repository commits at
.graphicle/.rebuild.lock, at the rebuild's temporary graph or at
.gitattributes is no longer followed.

Dependencies: yoke-derive 0.8.4 replaces 0.8.3, which was yanked.
server.json is again the MCP Registry entry of the latest listed release,
0.1.6.

Every crate and both SDKs are at 0.1.7, with a CHANGELOG entry.

Signed-off-by: VikramLex <vikramlex@karlexai.com>
@VikramLex
VikramLex merged commit f48a3d2 into Graphicle-AI:main Oct 25, 2026
11 checks passed
@VikramLex

Copy link
Copy Markdown
Member

Thank you again, @rudycelekli. This is merged, and it ships in Graphicle 0.1.7.

Your branch started from 0.1.5, and one import line conflicted with 0.1.6, which added import ipaddress where you added import email.utils. We rebased your commit onto main ourselves and kept both imports, with you as its author, so there was nothing for you to redo.

We added one change on top: a Retry-After that is neither a number of seconds nor an HTTP date now raises GraphicleError, with retry_after as None, instead of ValueError, so the caller still gets the status and the service's message. The test covers three such values: soon, 3600.5 and a superscript two.

Release notes: https://github.com/Graphicle-AI/graphicle/releases/tag/v0.1.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants