Skip to content

docs: reconcile SDK docs to reality + add a docs-honesty CI gate#11

Merged
fas89 merged 1 commit into
mainfrom
docs/honest-and-ci-gate
Jun 26, 2026
Merged

docs: reconcile SDK docs to reality + add a docs-honesty CI gate#11
fas89 merged 1 commit into
mainfrom
docs/honest-and-ci-gate

Conversation

@fas89

@fas89 fas89 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

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

  • New CI gate tests/unit/test_docs_honesty.py — scans every Markdown doc for
    from fluid_sdk… import X statements and fluid_build.<group> names and asserts
    each one resolves/imports (and is in __all__), plus that every advertised role
    harness exists and subclasses PluginTestHarness. Written test-first: it fails on
    the real bugs below, then goes green once fixed → durable anti-drift.
  • Removed documented-but-nonexistent exports: PluginHookSpec, CostEstimate,
    invoke_hook, has_hook (and the fictional "hooks" section), replaced with the
    real capabilities() + two-tier PluginError/PluginInternalError model.
  • Documented the real provision_action / catalog_entry_action helpers + the
    typed Severity/ActionStatus/Phase domains.
  • Labelled an illustrative scaffold-engine transcript as non-literal.
  • Added an SDK↔CLI compatibility matrix (architecture.md) and a concrete
    plugin 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

  • 144 tests pass (8 new gate tests); ruff + black clean.
  • Security review: no findings — the gate's importlib.import_module is
    hard-prefixed to first-party fluid_sdk.* (no escape to arbitrary modules), file
    reads are fixed-pattern globs, and it's a test (not shipped API).

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
fas89 merged commit 8b67a0b into main Jun 26, 2026
9 checks passed
@fas89
fas89 deleted the docs/honest-and-ci-gate branch June 26, 2026 21:38
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).
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.

1 participant