Skip to content

docs: fix cross-page follow-ups from the docs rework - #675

Merged
lesnik512 merged 2 commits into
mainfrom
docs/rework-follow-ups
Oct 11, 2026
Merged

lesnik512 merged 2 commits into
mainfrom
docs/rework-follow-ups

Conversation

@lesnik512

@lesnik512 lesnik512 commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Follow-ups that the docs-rework PRs (#661 to #668) reported but could not fix, because each agent could only edit its own batch of files. I checked every item against main at 912afac.

Items

# Status Notes
1 fixed The llms.txt description for providers/container.md now describes the Container reference page.
2 fixed Cause 1 in context-not-set.md is now two sentences and a link to context.md#context-propagation. The duplicated broken/works code is gone.
3 fixed duplicate-type-error.md and multi-group.md now say that one provider object registered twice also raises (group plus subclass, one group twice, one provider in two groups). They say the bound_type=None hint does not apply, give the workaround, and link #669.
4 already fine arq, Celery and Typer each say in "Framework context objects" that they register no context provider. None of the three packages contains a ContextProvider.
5 fixed Nav label Scope chain violation is now Invalid scope dependency, and the llms.txt description names InvalidScopeDependencyError.
6 fixed Link text in alias.md and good-and-bad-practices.md now uses the InvalidScopeDependencyError H1. The #when-the-dependency-is-reached-through-an-alias anchor is unchanged. alias.md's circular-dependency link now reads CircularDependencyError.
7 fixed creator-call-error.md now says a ResolutionError from container.resolve() in a creator body keeps its class and gains the creator's step in .dependency_path. errors-and-exceptions.md no longer said this.
8 fixed context-not-set.md See also links the to-4.x anchor. It exists, and errors-and-exceptions.md does not link it.
9 fixed The facts already agreed, except that finalizer-error.md said a failed finalizer's instance is always dropped. With clear_cache=False it stays cached and is not finalized again. lifecycle.md now adds that a repeated close_sync() reports the async finalizer again and that reopening returns the same object. It links both troubleshooting pages and does not copy them.
10 already fine There is no "Escape hatches" section any more, and the page has symptom/cause/fix/see-also. I added the missing # Works: marker to the first fix block.
11 fixed resolving.md link text is now ProviderNotRegisteredError.
12 already fine The errors-and-exceptions.md tables link with the class names. The ContextValueNotSetError link points at a page whose H1 is the symptom phrase. That is the class name in a class table, so I left it.
13 already fine multi-group.md already said DuplicateProviderTypeError, and request-scoped-engine.md does not link that page.
14 fixed Nav labels are now Provider not registered and Duplicate provider type, with llms.txt descriptions that name the classes. Troubleshooting: ContainerClosedError / ValidationFailedError link text in lifecycle.md and to-4.x.md is now just the class name.
15 fixed context.md links aiohttp.md#framework-context-objects.
19 fixed The writing-integrations page template now names the section sets the web and non-web pages actually use. It notes that gRPC's context section has a different name. It names FastMCP (default-value form) and Litestar (dependencies mapping) as the pages that don't use the Annotated form.
20 fixed Added a pitfall: aiogram's auto_inject sweep skips update observers (_inject_router in modern-di-aiogram main.py).
23 fixed The with container.override(...) fixture was already there. I added the cached-dependent caveat to the recipe's pitfalls and linked pytest.md's version.
24 fixed The examples already validated after Litestar(...). The prose now says the plugin registers its providers in on_app_init, which runs while Litestar(...) is being constructed.
25 fixed lifecycle See also now points sync-creator plus async-finalizer at the SQLAlchemy recipe, and await-to-construct at async-lifespan.
26 already fine pytest.md's promise matches the recipe's "Container fixtures without the plugin" section.
27 already fine litestar.md and multi-group.md both use NamedDependency.
28 fixed The nav label is now Multi-group organization. Links from celery, flask and litestar use the page H1, Organize a large container with multiple Groups.
29 already fine from-that-depends covers ContextScopes, connect_containers, resolve(func), LazyProvider and string/type Provide markers.
30 already fine from-dependency-injector covers ContextLocalSingleton, Container/DependenciesContainer, Delegate/Delegated*, Self and the Abstract* providers.

How claims were verified

I ran scratch scripts outside the repo against this checkout for:

  • the three same-object duplicate cases, the workaround (subclass only, each group once), and .first_provider is .second_provider;
  • a ResolutionError from inside a creator body: the class is kept, and dependency_path gains the creator step;
  • finalizer behavior: a failed finalizer is not retried, a reopen builds a new instance, and with clear_cache=False the same instance comes back and the finalizer is not called again;
  • async finalizers under close_sync(): the error is reported on every close_sync(), a reopen returns the same instance, and close_async() finalizes it;
  • the override cache caveat in both directions.

For Litestar I used the modern-di-litestar venv. validate() fails before Litestar(...) and passes after it. That venv has Litestar 2.24, which warns about inferred dependency fields. I checked aiogram's update skip by reading its source.

Checks

  • just test-docs -q -p no:cacheprovider --no-cov: 210 passed, 21 skipped
  • just test-docs-integrations: 329 passed, 1 skipped
  • just docs-build: no warnings
  • just lint-ci: clean
  • lychee --offline over docs and README: 0 errors

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Details
Benchmark suite Current: 436fde5 Previous: 912afac Ratio
benchmarks/test_guard_by_type.py::test_g16_resolve_by_type 6993073.011511968 iter/sec (stddev: 4.1816445361238614e-9) 4290744.632128984 iter/sec (stddev: 6.6659503576843224e-9) 0.61
benchmarks/test_guard_by_type.py::test_g17_resolve_by_type_large_registry 6923289.46805285 iter/sec (stddev: 5.3094121853693815e-9) 4330165.975706507 iter/sec (stddev: 8.519203571461124e-9) 0.63
benchmarks/test_guard_cold.py::test_g8_cold_first_resolve 44148.20588843489 iter/sec (stddev: 0.000028861230142190512) 27444.67470394427 iter/sec (stddev: 0.00004349751498491308) 0.62
benchmarks/test_guard_cold.py::test_g8b_cold_first_resolve_cached 35178.62084882766 iter/sec (stddev: 0.00012593390476136178) 21775.483810247635 iter/sec (stddev: 0.00017538314368091665) 0.62
benchmarks/test_guard_concurrency.py::test_g14_concurrent_cached_hit[1] 860.4404135169325 iter/sec (stddev: 0.000029915232612301946) 568.7644538625943 iter/sec (stddev: 0.00003228573128245504) 0.66
benchmarks/test_guard_concurrency.py::test_g14_concurrent_cached_hit[2] 832.0622704030964 iter/sec (stddev: 0.00011569130866777727) 543.3760135920036 iter/sec (stddev: 0.000032268776799891186) 0.65
benchmarks/test_guard_concurrency.py::test_g14_concurrent_cached_hit[4] 777.7677838307337 iter/sec (stddev: 0.00006865802359415128) 522.1358137482953 iter/sec (stddev: 0.00010108368207080077) 0.67
benchmarks/test_guard_concurrency.py::test_g15_concurrent_first_resolve[1] 23312.645303265665 iter/sec (stddev: 0.000005417943273836203) 15771.643426221468 iter/sec (stddev: 0.000005805457485717514) 0.68
benchmarks/test_guard_concurrency.py::test_g15_concurrent_first_resolve[2] 11460.129350477164 iter/sec (stddev: 0.000009912712982002466) 7883.583645824236 iter/sec (stddev: 0.00001692233009004272) 0.69
benchmarks/test_guard_concurrency.py::test_g15_concurrent_first_resolve[4] 5818.961911741022 iter/sec (stddev: 0.00002235703472492462) 4200.706978991961 iter/sec (stddev: 0.000030465564601637507) 0.72
benchmarks/test_guard_concurrency.py::test_g15b_concurrent_first_resolve_sibling_children[1] 16407.658110328113 iter/sec (stddev: 0.000006130203878408358) 11469.471564235118 iter/sec (stddev: 0.000007709764791735425) 0.70
benchmarks/test_guard_concurrency.py::test_g15b_concurrent_first_resolve_sibling_children[2] 6436.186126340357 iter/sec (stddev: 0.000014134556400349062) 4937.707730896672 iter/sec (stddev: 0.0000197020146565511) 0.77
benchmarks/test_guard_concurrency.py::test_g15b_concurrent_first_resolve_sibling_children[4] 3373.693010242129 iter/sec (stddev: 0.000027028852167669816) 2318.063770781517 iter/sec (stddev: 0.00004275305376682851) 0.69
benchmarks/test_guard_concurrency.py::test_g15c_worker_pool_floor_control[1] 56794.40991634103 iter/sec (stddev: 0.000001804043208351766) 43096.373906508496 iter/sec (stddev: 0.000004083485654645484) 0.76
benchmarks/test_guard_concurrency.py::test_g15c_worker_pool_floor_control[2] 26895.101707298083 iter/sec (stddev: 0.000009940834368073518) 17085.367322445436 iter/sec (stddev: 0.000011397369645917761) 0.64
benchmarks/test_guard_concurrency.py::test_g15c_worker_pool_floor_control[4] 10621.060305797062 iter/sec (stddev: 0.000019013663843795116) 7132.648115656604 iter/sec (stddev: 0.000024969750823984763) 0.67
benchmarks/test_guard_lifecycle.py::test_g6_build_child_container 2991961.273245375 iter/sec (stddev: 1.9390818268446578e-8) 1902167.4389461204 iter/sec (stddev: 3.046598137881302e-8) 0.64
benchmarks/test_guard_lifecycle.py::test_g6b_build_child_container_auto_scope 3495377.5816040854 iter/sec (stddev: 1.2836701558902134e-8) 2019299.7603422205 iter/sec (stddev: 1.4975154550247055e-8) 0.58
benchmarks/test_guard_lifecycle.py::test_g7_request_lifecycle_batch 5976.04280559648 iter/sec (stddev: 0.000011157916878571696) 3659.86467280516 iter/sec (stddev: 0.000008362717315565293) 0.61
benchmarks/test_guard_lifecycle.py::test_g7c_event_loop_floor_control 108447.87982290203 iter/sec (stddev: 0.0000013406962720831174) 64157.04449213476 iter/sec (stddev: 0.000001445709925707133) 0.59
benchmarks/test_guard_lifecycle.py::test_g7b_request_cycle_sync 726607.8942593154 iter/sec (stddev: 1.405194548126785e-7) 433468.26694753085 iter/sec (stddev: 7.144542633733348e-8) 0.60
benchmarks/test_guard_lifecycle.py::test_g13_teardown_at_scale 111106.91735818876 iter/sec (stddev: 7.035491029749189e-7) 67507.48318606662 iter/sec (stddev: 0.000001337887433437091) 0.61
benchmarks/test_guard_lifecycle.py::test_g13b_teardown_at_scale_async_no_finalizers 978.5538192073474 iter/sec (stddev: 0.0012108248331652073) 617.8159940376186 iter/sec (stddev: 0.0013599976172835304) 0.63
benchmarks/test_guard_resolve.py::test_g1_transient_resolve 4035765.7633313183 iter/sec (stddev: 1.6810250685981335e-8) 2380221.737893772 iter/sec (stddev: 2.358080009157402e-8) 0.59
benchmarks/test_guard_resolve.py::test_g2_cached_resolve 6642981.7794166505 iter/sec (stddev: 4.4269416963180935e-9) 4174745.8435650244 iter/sec (stddev: 7.434263741117928e-9) 0.63
benchmarks/test_guard_resolve.py::test_g3_deep_chain 1343780.1489644465 iter/sec (stddev: 2.4715323311692815e-8) 837001.737573568 iter/sec (stddev: 5.250838801176195e-8) 0.62
benchmarks/test_guard_resolve.py::test_g4_wide_resolve 803005.650148357 iter/sec (stddev: 3.8702402390377416e-7) 524750.2247969061 iter/sec (stddev: 4.0808126635001273e-7) 0.65
benchmarks/test_guard_resolve.py::test_g5_cross_scope 3561358.195165627 iter/sec (stddev: 1.5547189010337906e-8) 2180553.421178194 iter/sec (stddev: 2.116451878820376e-8) 0.61
benchmarks/test_guard_resolve.py::test_g9_context_resolve 2177397.589640894 iter/sec (stddev: 1.383286172184417e-7) 1707543.5517562833 iter/sec (stddev: 1.636601486267848e-7) 0.78
benchmarks/test_guard_resolve.py::test_g12_override_active_resolve 1218174.7284079068 iter/sec (stddev: 1.198735616014029e-7) 849803.8418952093 iter/sec (stddev: 3.410832795628274e-8) 0.70
benchmarks/test_guard_resolve.py::test_g18_alias_hop 6827890.92390565 iter/sec (stddev: 7.143955201842117e-9) 4168221.0657688538 iter/sec (stddev: 6.598829464591067e-9) 0.61
benchmarks/test_guard_validate.py::test_g10_validate_deep_chain 73736.69319950347 iter/sec (stddev: 0.000012015974767109509) 46746.40647915387 iter/sec (stddev: 0.000016931233874695673) 0.63
benchmarks/test_guard_validate.py::test_g11_validate_wide 40428.04676884944 iter/sec (stddev: 0.000017465568610158927) 26475.796180215955 iter/sec (stddev: 0.00002496044600437669) 0.65

This comment was automatically generated by workflow using github-action-benchmark.

@lesnik512
lesnik512 merged commit 0562ccb into main Oct 11, 2026
12 checks passed
@lesnik512
lesnik512 deleted the docs/rework-follow-ups branch October 11, 2026 08:19
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