Skip to content

feat!: land the 1.0.0 public API audit decisions - #684

Merged
JuroOravec merged 6 commits into
mainfrom
docs/1.0.0-api-audit
Nov 14, 2026
Merged

JuroOravec merged 6 commits into
mainfrom
docs/1.0.0-api-audit

Conversation

@JuroOravec

Copy link
Copy Markdown
Member

Lands the decisions from the 1.0.0 public API audit (docs/design/public_api_1_0_0_audit.md) for 0.9.0, the last release that may break the API. Refs #624.

Upgrading from 0.8.x (also in CHANGELOG.md)

  • Citry(...), CitrySettings, LintSettings and URLRoute take their options by name only. A positional argument raises TypeError. URLRoute still takes the path and the handler by position.
  • URLRoute(extra=...) is removed. Citry never read it.
  • Events._topics (on a component or in extensions_defaults["events"]) now raises ValueError as an unknown config attribute. Citry never used it.

Other changes

  • Marked experimental with the Experimental: docstring section that ComponentGraph already uses (audit rows 1 to 8):

    • the template analysis API and Citry.template_analysis();
    • the API for embedding Citry tags in another template engine;
    • citry.ext.preview;
    • the "payload" render cache mode;
    • Extension.browser_plugin() and prepare_browser_render();
    • the Events hooks on_event, on_event_result and on_event_error;
    • the event_result_resolvers and event_payload_codecs settings;
    • RenderFrame.

    The reference intros and the guide pages that teach these features say so too.

  • The ExtensionManager.on_* methods and has_attrs_resolved_hook say in their docstrings that they are internal (row 9).

  • Additions: safe_eval and unsafe are re-exported from citry. CitryDeprecationWarning (a DeprecationWarning subclass) is new. I18nExtension is in citry.ext.i18n.__all__. citry.reload has an __all__ and a "Hot reload" reference page, and the docs site counts it as a public entrypoint.

  • Debug keeps its name (row 13 was not approved).

  • The audit doc records the decision for each row, and the marker choice (open question 8).

Checks

  • Focused pytest runs on the events, settings, routing, reload, warning and sandbox tests, plus the full packages/py/citry/tests suite. Its failures are the same set as on unmodified origin/main in the same venv, which has a stale compiled citry_core.
  • docs_site/tests and python -m docs_site build-check pass (0 errors). One reference test also fails on origin/main in the same environment.
  • ruff check . and ruff format --check . pass. mypy passes on the gate's file list, both natively and with --platform linux.
  • Independent reviews: a technical review, a separate prose pass, and a docs cold read. Their findings are folded into the second commit.

Mechanism 8: the reviewer could not open the private advisory survey. This change re-exports the expression sandbox entry points, changes constructor signatures, removes one Events config name, and edits docstrings and docs. The maintainer should say which kinds of bug apply.

🤖 Generated with Claude Code

JuroOravec and others added 6 commits November 14, 2026 21:56
List every public name, setting, CLI option and documented extension
hook, mark each keep, rename, make private or mark experimental, and
put the decisions and the defaults review for 0.9.0 at the top.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Correct the counts and claims the review disproved, add the Component,
Citry and CitryRender members, name the covered parts the audit does
not list, and prefer docstring marks over renames for RenderFrame and
the ExtensionManager dispatch methods.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Make Citry(...), CitrySettings, LintSettings and URLRoute (after the
  handler) keyword-only, and remove the unused URLRoute.extra field.
- Stop accepting Events._topics; it now fails at class definition as an
  unknown config attribute.
- Mark the template analysis API, the host template API, citry.ext.preview,
  the "payload" render cache mode, the browser plugin methods, the Events
  extension hooks, the event resolver and codec settings, and RenderFrame
  experimental with the Experimental: docstring section.
- Document the ExtensionManager.on_* methods and has_attrs_resolved_hook as
  internal.
- Re-export safe_eval and unsafe from citry, add CitryDeprecationWarning,
  add I18nExtension to citry.ext.i18n.__all__, and give citry.reload an
  __all__ with a reference page.
- Record each decision in the audit doc.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Keep LspPosition and LspRange out of the experimental template analysis
  intro, and say on the manager docstring that an extension's
  on_files_reset hook stays public.
- Test the exact pytest filter string for CitryDeprecationWarning, and that
  URLRoute refuses extra=.
- Clarify the changelog, the reference intros, the guide notes and the
  experimental docstrings; mark prepare_browser_render() experimental where
  the dependencies guide names it.
- Count the new hot reload reference category in the docs project test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@JuroOravec
JuroOravec merged commit 4399ba6 into main Nov 14, 2026
30 of 32 checks passed
@JuroOravec
JuroOravec deleted the docs/1.0.0-api-audit branch November 14, 2026 22:49
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