Repository navigation
Fix the QA and Spell Check checks left red by the preconditioning hooks - #1141
Merged
ChrisRackauckas merged 2 commits intoAug 7, 2026
Merged
Conversation
…ooks `run_api_docs` requires every name in NonlinearSolveBase's public API to have a docstring and to be rendered in a `@docs` block under docs/src. SciML#1084 made nine names public without docs entries, which fails the QA group. Add docstrings for the three cache accessors (`get_u`, `get_fu`, `get_nsteps`) and render all nine in docs/src/devdocs/internal_interfaces.md. Co-Authored-By: Chris Rackauckas <[email protected]>
test/Core/core_tests__item23.jl asserts that `postcondtion` is rejected by SciMLBase's common keyword whitelist, so the misspelling is the point of the test and cannot be corrected. The Spell Check workflow has failed on every PR since SciML#1084 introduced that test. Allow it via `[type.jl.extend-identifiers]`: scoped to Julia sources and to the exact, case-sensitive identifier, so the same typo is still caught in prose, in a compound name, or in any other capitalization. Co-Authored-By: Chris Rackauckas <[email protected]>
Member
Author
|
CI confirmation for the Spell Check half, on this same branch:
So the workflow result matches the local |
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.
Important
This PR should be ignored until reviewed by @ChrisRackauckas.
Fixes two pre-existing red checks on master, both inherited from #1084 (which merged with those checks already failing):
NonlinearSolveBaseQA group — nine names wentpublicwithout docstrings /@docsentries;1. QA: undocumented public API
SciMLTesting.run_api_docsrequires every name innames(NonlinearSolveBase; all = false, imported = false)(exports +@compat publicnames on Julia >= 1.11) to (a) have a docstring and (b) appear in a```@docsblock underdocs/src.Reproduction (clean checkout of
origin/master@ 4bd97b7, Julia 1.12.4)Bisect
A single commit: 4aad487 (#1084, "Nonlinear preconditioning hooks").
git log -Son both@compat(public, ...)lines inlib/NonlinearSolveBase/src/NonlinearSolveBase.jlreturns only that commit, and it is the commit that addssrc/conditioning.jl:needs_conditioning,transform_conditioned_problem,apply_postcondition!!,get_precondition,get_postcondition,supports_postconditionconditioning.jl, never added to a@docsblockget_u,get_fu,get_nsteps@docsentryget_u/get_fupredate #1084 as functions, and #1115 (664c39d) added the polyalgorithm-cache methods, but neither made them public — #1084 did, sonames()only started reporting them there.Confirmed empirically against the parent commit 9b72448: the public API there is 55 names with
undocumented == Symbol[]andunrendered == Symbol[]; on 4bd97b7 it is 64 names with the 3 / 9 above failing. #1084 added exactly those 9.Changes
lib/NonlinearSolveBase/src/abstract_types.jl— docstrings forget_u,get_fu,get_nsteps, written from the implementations. Notablyget_fudocuments that it is the last residual the solver evaluated, which mid-step (i.e. when apostconditioncorrector is called) is the residual at the previous accepted iterate — matching what the preconditioning tutorial already tells corrector authors.docs/src/devdocs/internal_interfaces.md— two new sections following the file's existing structure:## Nonlinear Preconditioning(the six conditioning hooks, cross-linked to thenonlinear_preconditioningtutorial) and## Cache State(the three accessors, next to the existing## Cache Tolerancesthat already rendersget_abstol/get_reltol).lib/NonlinearSolveBase/Project.toml— 2.41.0 → 2.41.1.No
publicdeclaration was removed, noapi_docs = false, no ignore list — the names stay public and are now actually documented.2. Spell Check: deliberate misspelling in a test
Reproduction
The misspelling is load-bearing and must stay
The test asserts that a typo'd keyword name is rejected by SciMLBase's common-keyword whitelist. Correcting the spelling would silently turn it into a test that the correct keyword is rejected — i.e. it would assert the opposite of the intended behaviour. So the checker has to be told the token is intentional, not the test changed.
Pre-existing, not introduced by this PR
gh run list --repo SciML/NonlinearSolve.jl --workflow "Spell Check": every run before 2026-08-05 is green;nonlinear-preconditioning-hooks(the branch that became #1084 / 4aad487) fails from 97bce87 onward, and it fails on this branch too:The workflow is
on: [pull_request], so master itself is never run directly — every PR inherits the failure.Mechanism chosen:
[type.jl.extend-identifiers]Narrowest option that works, of the four considered:
[type.jl.extend-identifiers]*.jlonly[default.extend-identifiers][default.extend-words](what existing entries use)[files] extend-excludeon the filePer typos' design doc, identifiers are checked first and are case-sensitive; only if an identifier is unknown is it split into (case-insensitive) words. So an
extend-identifiersentry allows exactly this token and nothing else.A fifth option — a custom
[type.NAME]withextend-glob = ["core_tests__item23.jl"], scoping to the single file — also verified working, but rejected: "most specific glob wins" means it replaces the built-injltype for that file, dropping itsmodul/usig/egal/egalsallowances, and it pins the config to a mechanically-numbered filename. Extending[type.jl]instead merges with the built-in type — confirmed viatypos --dump-config -, which still listsmodul = "modul"et al. under[type.jl.extend-words]after the change.Local verification
Ran the pinned version (
typos-cli 1.48.0, downloaded release binary, matchingcrate-ci/[email protected]inSciML/.github/.github/workflows/spellcheck.yml@v1) at the repo root:Negative control, to show the allowance did not blanket the token — all of these are still caught:
Local test results (Julia 1.12.4)
cd lib/NonlinearSolveBase:(20/20 QA, up from 18 passed / 2 failed on the same checkout without these changes; Core fully green.)
Runic clean.
Merge-order note
lib/NonlinearSolveBase/Project.tomlis bumped to 2.41.1 (patch — docs and CI config only, no API change). There is a separate in-flight PR taking the same file to 2.42.0; whichever lands second will need a trivial rebase on that one line.🤖 Generated with Claude Code
https://claude.ai/code/session_01B9GHoo4pFa3DU9yhyTkevL