docs(standards): align layering docs with the port seam; split runtime vs wiring diagrams
This commit is contained in:
@@ -651,7 +651,7 @@ registry</strong> and exposes it to the HTTP layer and to scripts.</p>
|
||||
<li><code>progress_bus</code> — progress/event bus.</li>
|
||||
<li><code><vendor>_<kind></code> — fetchers, clients, stores.</li>
|
||||
</ul>
|
||||
<p>The API stores the dict on <code>app.state.resources</code> during lifespan startup.
|
||||
<p>The API stores the dict on <code>app.state.db_resources</code> during lifespan startup.
|
||||
Handlers read from it; nothing imports concrete adapters.</p>
|
||||
<h2 id="shape">Shape</h2>
|
||||
<div class="language-python highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"><a href="#__codelineno-0-1"> 1</a></span>
|
||||
@@ -747,7 +747,7 @@ typing without importing concrete classes:</p>
|
||||
<ul>
|
||||
<li><code>init()</code> is <strong>idempotent</strong>.</li>
|
||||
<li>The composition root is the only place that imports concrete adapters.</li>
|
||||
<li>Handlers never call <code>init()</code>; they read <code>request.app.state.resources</code>.</li>
|
||||
<li>Handlers never call <code>init()</code>; they read <code>request.app.state.db_resources</code>.</li>
|
||||
<li>Scripts call <code>init()</code> / <code>shutdown()</code> around their work.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user