Repository navigation
fix: name port 6060 in the base URL hint, and make the README match the SDK - #6
Merged
Merged
Conversation
A client built with no address raises "No Kaiten API address: pass base_url=... (your deployment's, e.g. http://localhost:6000)". Nothing answers on 6000: a Community Edition API listens on 6060, under http://localhost:6060/api. The same address was in the client's docstring and in the playbook. - src/kaitencloud/_async/client.py: the ValueError hint and the base_url docstring name http://localhost:6060; _sync/client.py is regenerated. /api is still appended when missing, so the hint resolves to http://localhost:6060/api/. - examples/README.md, examples/playbook.py: the KAITEN_BASE_URL export and the --base-url help. - tests/test_client.py: the base URL case with a port uses the same one. Signed-off-by: Alexandre Bergere <alexandre.bergere@kaiten.sh> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README opens with KaitenClient(token="ksh_..."), and the package and client docstrings show the same line. There is no default API address, so it raises ValueError unless KAITEN_BASE_URL happens to be set, which the README only says eighty lines further down. - README.md: the opening example passes base_url, as the Quick start does. - src/kaitencloud/__init__.py, src/kaitencloud/_async/client.py: the two docstring examples do too; _sync/client.py is regenerated. Signed-off-by: Alexandre Bergere <alexandre.bergere@kaiten.sh> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SDK defines flags and leaves their evaluation to OpenFeature, as the README's own Feature flags section says. Four other places still described an evaluation client: - README.md, Errors: FlagEvaluationError is not an exception of the package. The tree now ends APIStatusError on InternalServerError. - README.md, Retries and timeouts: "flag evaluations" are not among the retried requests, since the SDK sends none. The rest of the row matches the calls marked safe to repeat. - README.md, Logging: the only record the package logs is a retry, at INFO. Nothing is logged at WARNING about a flag falling back to its default; examples/README.md and the playbook's --verbose help said the same. - README.md, API reference, and the FeatureFlags docstring: there is no client.flags. The docstring points at OpenFeature instead; _sync/resources/feature_flags.py is regenerated. Signed-off-by: Alexandre Bergere <alexandre.bergere@kaiten.sh> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README and the manifest() docstring said the manifest returns every flag. The contract in openapi/openapi.yaml says otherwise: it "returns a manifest of all feature flags that have a fallback_value set in their metadata". A flag without one is absent, and a reader generating typed accessors from the manifest would not learn why. - README.md, Feature flags: the manifest holds each flag whose metadata sets a fallback_value. - src/kaitencloud/_async/resources/feature_flags.py: the same in the docstring; _sync/resources/feature_flags.py is regenerated. Signed-off-by: Alexandre Bergere <alexandre.bergere@kaiten.sh> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README said every exception derives from KaitenError. A client built with no base_url raises a plain ValueError, as the first example did until it was given one, and so do a malformed address, a datetime without a timezone and an empty slug; a usage value that is not a number raises TypeError. An `except KaitenError` catches none of them. - README.md, Errors: the tree is of the exceptions the SDK defines, and a sentence under it names what a refused argument raises instead. Signed-off-by: Alexandre Bergere <alexandre.bergere@kaiten.sh> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/test_readme.py parses the README's python blocks and checks the names they import and call. The three defects just corrected sat outside its reach: an example that parses but cannot run without an environment variable, an exception in a text block, a namespace in a <summary>. - The examples shown before the README says KAITEN_BASE_URL is assumed must pass base_url and token to the client they build. - Every name in the error tree is an exception the package exports, under KaitenError. The tree need not list them all. - Every namespace and method the API reference names exists on the client. Each of the three fails on the README as released in 1.0.0. Signed-off-by: Alexandre Bergere <alexandre.bergere@kaiten.sh> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fuzcap
approved these changes
Oct 14, 2026
backtrack5r3 (tomflenner)
approved these changes
Oct 14, 2026
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.
What does this PR change?
http://localhost:6000. The error, thebase_urldocstring, the playbook and its guide now sayhttp://localhost:6060(/apiis appended as before)._sync/is regenerated from_async/.KaitenClient(token=...)withoutbase_url, which has no default, so it raised that very error. The same line in the package and client docstrings follows.FlagEvaluationErrorleaves the error tree, "flag evaluations" the retry table, the fallback warning the Logging section, andclient.flagsthe API reference. The SDK leaves evaluation to OpenFeature, as the README says elsewhere.fallback_value, not every flag. A refused argument (a missingbase_url, a datetime without a timezone, a usage value that is not a number) raisesValueErrororTypeError, not aKaitenError.No behaviour, public name or generated model changes; no version bump.
CHANGELOG.mdis left alone: it has no unreleased section onmain, and #5 adds one at the same line.Why?
Following the README from the top failed on the first snippet, and the error it produced pointed at a port a Community Edition API does not listen on. The README also promised an exception, a namespace and a log record that do not exist in 1.0.0.
Testing
pytest: 747 passed (744 onmain, plus the three new tests), on Python 3.10 to 3.14 and on the lowest direct dependencies.ruff check,ruff format --check,mypy, and both generation checks (generate_models.py --check,unasync.py --check) are clean;uv buildandtwine check --strictpass.pythonblock of the README was executed in order against a fake API built fromopenapi/, with no socket opened: 21 blocks, 41 requests, each body valid against its schema. The same run onmainfails on the first block.README.mdandsrc/kaitencloud/__init__.py, on different lines.Checklist
CONTRIBUTING.md.Signed-off-byline.🤖 Generated with Claude Code · ✅ Tested and approved by Alex (@Alexkuva), maintainer