Repository navigation
Add wf.installations namespace (sync and async) - #3
Merged
Merged
Conversation
All six installation operations are GA and were already generated, but only reachable through wf.call(...) on the generated module. This adds a typed namespace (eligible_targets, list, get, create, mint_token, revoke) plus install_or_mint_token, which folds in the API's 409 already_installed answer by minting a token for details.installation with the same scopes. The six per-operation examples are new (off the curl-only allowlist) and the install-target guide now uses the namespace. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
rivetbot
approved these changes
Oct 6, 2026
rivetbot
left a comment
There was a problem hiding this comment.
Reviewed 9b985a9. No actionable correctness findings. Sync/async namespaces consistently use generated operations, preserve create/mint envelopes, distinguish omitted scopes from [], and reuse supplied scopes on the already-installed fallback.
CI generated parity and Python 3.11–3.13 lint, format, pyright, pytest and build passed: https://github.com/Wefunder/wefunder-python/actions/runs/37417736487
Source review only; I did not run local tests or make live calls. Live sandbox e2e was skipped.
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.
Summary
Mirrors wefunder-node #21.
wf.installationson bothWefunderandAsyncWefunder:eligible_targets(),list(),get(),create(),mint_token(),revoke(), andinstall_or_mint_token(). All six operations are GA in the public spec and were already generated, but only reachable viawf.call(op, ...).install_or_mint_token(body)handles the API's 409already_installedanswer: it mints a token fordetails["installation"], re-requesting the samescopesso a retry never widens the grant. Any other error still raises, including analready_installedwith nodetails["installation"].mint_token(id, scopes=None)sends no body whenscopesis omitted (the install's ceiling) and a real{"scopes": []}for an explicit empty list, which grants nothing.guides/install-targetsnippet now uses the namespace.examples_manifest.jsonrebuilt. README updated.Verification
ruff check,ruff format,pytest(all passing, incl. newtests/test_installations.pywith sync + async coverage, and the existing install-target guide test against the rewritten example),python scripts/build_examples_manifest.py.main); CI runs it against the installed package.🤖 Generated with Claude Code