docs: reconcile SDK docs to reality + add a docs-honesty CI gate#11
Merged
Conversation
A multi-agent audit found the docs advertised symbols that don't exist (carried over from the renamed-away fluid_provider_sdk) and a fabricated CLI transcript. - Add tests/unit/test_docs_honesty.py: scans every Markdown doc for `from fluid_sdk… import X` and `fluid_build.<group>` names and asserts each resolves/imports. This is the durable anti-drift guarantee (it was written by watching it fail on the real bugs below, then go green once fixed). - Remove documented-but-nonexistent exports: PluginHookSpec, CostEstimate, invoke_hook, has_hook (and the fictional "hooks" section); replace with the real capabilities() + two-tier PluginError/PluginInternalError model. - Document the real provision_action / catalog_entry_action helpers + typed domains. - Label an illustrative scaffold-engine transcript as non-literal. - Add an SDK↔CLI compatibility matrix (architecture.md) and a concrete plugin trust-boundary section (SECURITY.md: allow/block lists, type-only error logging). 144 tests pass (8 new gate tests); ruff + black clean.
fas89
added a commit
that referenced
this pull request
Jun 27, 2026
…ns, conformance, compat) (#16) Finalizes the CHANGELOG [Unreleased] section as [0.10.0] and bumps both version constants (pyproject + fluid_sdk.version.SDK_VERSION) 0.9.1 -> 0.10.0. Ships the world-class SDK series merged since v0.9.1 (no PyPI release had carried it): #10 typed domains + four real role ABCs (InfraProvider, CatalogAdapter) + PluginCapabilities + SDK<->CLI compat declaration + conformance harnesses; #11-#15 type/doc-honesty cascade and docs-honesty CI gate; #9 actions/checkout bump. SDK_PROTOCOL_VERSION stays 1 (additive, non-breaking). MIN_CLI_VERSION unchanged (0.7.0).
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 & why
Closes the packaging/docs dimension gap from the audit: the docs advertised
symbols that don't exist (carried over from the renamed-away
fluid_provider_sdk)and a fabricated CLI transcript. This makes the docs honest and adds a CI gate
so they can never drift again.
Changes
tests/unit/test_docs_honesty.py— scans every Markdown doc forfrom fluid_sdk… import Xstatements andfluid_build.<group>names and assertseach one resolves/imports (and is in
__all__), plus that every advertised roleharness exists and subclasses
PluginTestHarness. Written test-first: it fails onthe real bugs below, then goes green once fixed → durable anti-drift.
PluginHookSpec,CostEstimate,invoke_hook,has_hook(and the fictional "hooks" section), replaced with thereal
capabilities()+ two-tierPluginError/PluginInternalErrormodel.provision_action/catalog_entry_actionhelpers + thetyped
Severity/ActionStatus/Phasedomains.architecture.md) and a concreteplugin trust-boundary section (
SECURITY.md:FLUID_PLUGINS_ALLOWLIST/BLOCKLIST,type-only error logging) — now accurate because the CLI wiring landed.
Borrow-before-build
Surveyed Sphinx
nitpicky/ doctest / mkdocs link-checkers for doc-drift linting;diverged intentionally — a ~80-line zero-dep "every documented import resolves"
check fits a stdlib-only SDK far better than a full Sphinx toolchain.
Verification
ruff+blackclean.importlib.import_moduleishard-prefixed to first-party
fluid_sdk.*(no escape to arbitrary modules), filereads are fixed-pattern globs, and it's a test (not shipped API).