Repository navigation
[ci] Drop the doc tag from the API-surface consistency checks - #64777
dstrodtman wants to merge 3 commits into
Conversation
The api_annotations and api_policy_check premerge steps verify that the annotated and documented API surfaces agree. They are code/doc surface-consistency checks, not documentation validation, so the blanket doc tag on them is redundant now that executable doc example tests route to dedicated per-library tags. Both steps keep their full library tag list and the docs-go skip, so a library code change still runs them exactly as before; their trigger set is now purely code and library tags. Signed-off-by: Douglas Strodtman <[email protected]>
(documented-exactly-once) policies to the API-doc consistency check, and (whose white_list_apis was left empty). The stricter check now flags ~30 pre-existing RLlib doc entries, failing the "doc: check API doc consistency" premerge job on every PR that merges current master. This fixes the RLlib side: Unresolved doc entries: - De-double autoclass targets that combined `.. currentmodule::` with a fully-qualified name (RLlink, ConnectorV2, ConnectorPipelineV2, the observation preprocessors, and the RLModule `apis` classes) by making the autoclass argument relative to its currentmodule. - RLModuleSpec dataclass fields -> `.. autoattribute:: ... :no-index:` (mirrors the existing MultiRLModuleSpec block). - RLModule instance attributes (observation_space, action_space, inference_only, model_config) are assigned in setup(), not on the class, so they resolve to None; exempt them via doc_only_whitelist. Documented private/dunder objects: - Whitelist the intentional override contract (RLModule._forward*, Learner._make_module). - Remove doc entries for internal helpers (Learner._check_is_built / _check_registered_optimizer / _set_optimizer_lr / _get_clip_function, Scheduler._create_tensor_variable, OfflineData/OfflinePreLearner privates, SingleAgentEpisode/MultiAgentEpisode.__len__). Duplicate documentation: - Mark intentional cross-page duplicates as intentional_duplicate_apis (AlgorithmConfig.build_learner / build_learner_group / learners; Checkpointable.save_to_path / restore_from_path, inherited and shown on each subclass page). Not a duplicate of open work: ray-project#64777 changes which CI tag runs the check and ray-project#64770 is unrelated docs content; no open PR touches cmd_check_api_discrepancy.py or the RLlib exemptions. Test: `python ci/ray_ci/doc/cmd_check_api_discrepancy.py <ray_dir> rllib` exits 0 (was exit 1). AI assistance (Claude Code) was used; the change has been reviewed and is defended by the human submitter. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Artur Niederfahrenhorst <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request updates the Buildkite configuration in .buildkite/doc.rayci.yml by removing the doc tag from the doc_api_annotations and doc_api_policy_check steps. There are no review comments, so no additional feedback is provided.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 1b3b0b7. Configure here.
| - llm | ||
| - rllib | ||
| - rllib_gpu | ||
| - doc |
There was a problem hiding this comment.
API check loses doc-infra coverage
Medium Severity
Dropping the doc tag from api_policy_check stops that step from running when its own inputs change. doc/source/api_autogen.py and doc/source/api_mock_imports.py both emit doc (see test.rules.txt / test.rules.test.txt), and lint.sh api_policy_check invokes them directly. After this change, edits to that stub/mock machinery no longer trigger the consistency check on premerge; the PR claim that those paths route to # pass does not match the current rules.
Reviewed by Cursor Bugbot for commit 1b3b0b7. Configure here.
|
Closing this unmerged: #64775 landed and inverted the premise this PR was built on. The rationale here was that after #64775, executable doc assets route to per-library tags and prose can't change the API surface, so Those are the direct inputs to The over-triggering instinct behind this PR is still right — Continuing in #64812. |


Why
The two API-surface premerge steps in
.buildkite/doc.rayci.ymldoc: check API annotations(api_annotations)doc: check API doc consistency(api_policy_check)each carry the full library tag list plus the blanket
doctag. They are code/doc surface-consistency checks — they verify that the annotated public API and the documented API surface agree — not documentation-quality validation. Thedoctag on them is now redundant:doctag to dedicated per-library tags ([ci] Reserve the doc tag for doc validation; route doc example tests per library #64775), so a documentation change no longer needsdocto reach the code that these checks guard.Concretely, the
doctag currently makes these two steps fire on.valeconfig, top-leveldoc/*.py/doc/*.rst, docs dependency locks,.readthedocs.yaml, and edits todoc.rayci.ymlitself. None of those can change the API surface.What
Remove the
doctag from both steps. They keep their full library tag list (core_python,dashboard,ray_client,data,serve,ml,tune,train,llm,rllib,rllib_gpu) and thedocs-goskip, so a library code change still runs them exactly as before. After this, their trigger set is purely code and library tags.Coordination / merge order
api_policy_checktoday generates its autosummary stub fixtures as a side effect of a fullmake -C doc/ htmlrender, so it still has a genuine rendering dependency. #64423 removes that (stubs generated standalone). Only once #64423 is in doesapi_policy_checkhave no rendering dependency and can its trigger set safely be code-and-library-tags only. Hold this merge until #64423 lands.No file overlap with #64423 or #64775 — this touches only
doc.rayci.yml, which neither of those PRs modifies — so it applies cleanly on master; the dependency is purely merge-ordering.Verification
.buildkite/test.rules.txt: after the drop, both steps are triggered only by their retained library tags;doc/source/**paths (includingconf.pyand the stub-generation machinery) route to# passand never emitteddoc, so no API-surface coverage is lost. The steps stop firing on Vale/deplock/narrative-doc changes and on self-edits todoc.rayci.yml, all intended.AI assistance was used to prepare this change; the author has reviewed every changed line and will confirm the premerge tag composition before taking it out of draft.
Not a duplicate
Searched open Ray PRs for the API-surface check steps and the doc tag reorg; the related PRs (#64775, #64423, #64420) deliberately leave these two steps' tags alone. This is the tracked follow-up that completes that reorg.