Repository navigation
chore: release 0.1.0a4 - #200
Conversation
## Summary - Starts the development version 0.1.0a4.dev0 on `release/0.1.0a4`, after releasing 0.1.0a3. - Points the changelog's `[Unreleased]` link at `release/0.1.0a4`, where unreleased work now is. ## How it was verified - `__version__` reads `0.1.0a4.dev0`, the `[Unreleased]` section is empty, and CI runs on this commit. Changelog: none (version bump)
- Catch list-entry comparison and truth-conversion failures during settings validation. - Use the existing path-only mismatch wording without exposing values or exception text. - Cover direct and nested comparisons, and explicitly test truth conversion of a returned `__ne__` result. ### What changed and why Custom settings entries can raise during inequality or when its result is converted to a boolean. Keep both operations inside the guard so diagnostics identify the difference path without propagating private details. Normal matching and mismatch formatting remain unchanged. Part of #142. Changelog (Fixed): Report a path-only settings difference when a list-entry comparison raises. ### Spec trace and decisions No specification documents or decision records changed. No public API or dependency added. Changes stay within `_configure.py` and `test_host_settings.py`; the separately noted dict-subclass behavior is outside this PR. ### Verification - Original regression cases fail without the guard. - Corrected truth-conversion case passes with the guard and fails when `bool(...)` is removed. - Follow-up a70e086: 167 focused tests; full Python 3.12 / Django 5.2 suite 9,748 passed, 2 documentation-dependency skips. Ruff, format, mypy and spec trace pass (zero problems). - Hosted CI: all five checks pass on a70e086. The maintainer retargeted this PR to release/0.1.0a4; the commits are unchanged. AI-assisted with OpenAI Codex.
## Summary - Adds the check before deployment, ADR 0030's one command with two entries: `neolith check <app> [<app> ...] --settings <module>` (closed host, connection guard in place before the apps load) and `manage.py checkapps` (settings-module host). Both run set-up, Boot's checks that read no database, then the boundary pass, and print the same lines for phases 4 and 5. - Ships the model rules: `neolith.E106`, a relation of a hosted app's model to another installed app's model (every relation kind; contrib apps and `AUTH_USER_MODEL` included; a reference Django never resolved judged by the label it names), and `neolith.E107`, a proxy of another app's model or a table name equal to another app's (quotes and ASCII case ignored). The other rows come in tasks 2 to 7 of #14. - `[tool.neolith] boundary-report-only` in the nearest `pyproject.toml`: every shape mistake reported at once (status 2), labels judged against the hosted apps after set-up, errors of a listed app marked `(report only)`, a stale entry is `neolith.E113`. Exit 0, 1 or 2; an unforeseen `Exception` is `neolith: check: internal error: ...` (status 2), a signal to stop goes on, and a line the output cannot encode is printed escaped. - `BaseDatabaseWrapper.connect` raises `neolith.UsageError` while any run is under way, shared by overlapping runs and put back by the last (APP-70); `requires_system_checks = []` keeps Django 6.1's alias probe out. Accepts ADR 0030 and writes #14's six settled open points into it; 0003, 0017 and 0022 gain their `Narrowed by 0030` lines. ## Spec trace | ID | Change | Cited by | |---|---|---| | APP-66, APP-68, APP-69 | added (SHOULD) | none yet: tasks 4, 5 and 6 of #14 | | APP-67 | added (SHOULD) | `tests/test_check_models.py` (module mark; 4 tests) | | APP-70 | added (MUST) | `tests/test_check_command.py::test_the_guard_is_put_back_however_the_command_ends`, `::test_runs_that_overlap_share_the_guard_and_put_it_back_once`, `::test_a_query_while_the_urlconf_is_imported_is_refused_under_both_entries`, `::test_a_query_while_the_apps_load_is_refused_under_neolith_check`, `::test_a_json_field_on_a_missing_sqlite_path_creates_no_file` (8 tests) | | APP-71 | added (MAY) | `tests/test_check_command.py::test_a_report_only_app_s_errors_are_marked_and_end_with_status_0`, `::test_a_listed_app_with_no_error_finding_is_a_stale_entry` (4 tests) | `spec_trace --report` at 2ca17e8: 251 requirements, 235 covered, 5 marked not tested, 0 problems. OVR-2 keeps its `[not-tested]` entry, its reason now citing APP-66; spec 05's sentences after APP-22 and APP-26 point at APP-67 and APP-69. ## How it was verified - CI at 2ca17e8: 10769 passed, 2 skipped on each of Python 3.12/Django 5.2 and Python 3.15/Django 6.1, x86-64 and arm64; lint and types pass. The two new test files take about 34 s (99 tests, one arm64 machine). - Django read at 5.2.19 and 6.1.3: `db/backends/base/base.py:237` (`connect`), `core/management/base.py:270`/`272` (`requires_system_checks`), `db/models/fields/related.py:45`/`52` (`resolve_relation`), `db/models/base.py:350`/`371` (`mti_inherited` on a concrete parent's private fields). - Three fresh-context red-team passes, the last after review; every defect they reproduced is fixed by class with a test that a mutation of the guarded code fails (escaping per character class and in paths, phase 4's W001 and its database filter, quoted table names, unresolved and bare relation names, overlapping runs, unencodable output, inherited generic relations, Boot's lines through a project's `LOGGING`). Changelog (Added): `neolith check <app> ... --settings <module>` and `manage.py checkapps`, the check before deployment, with its model rules (`neolith.E106`, `neolith.E107`), report-only apps in `[tool.neolith] boundary-report-only` (`neolith.E113` for a stale entry), and a guard that refuses every database connection while it runs. Part of #14.
## Summary - The website copies the README's example, and had no stable edges to copy between. - The example section is wrapped in `<!-- neolith-example:start -->` and `<!-- neolith-example:end -->`; its wording and `# <path>` headers are unchanged. - `tests/test_readme.py` checks, on the parsed Markdown, that each marker appears exactly once as its own block, that start comes before end, and that every Python block lies between them. A marker inside a code fence does not count. ## How it was verified `tests/test_readme.py`: 8 passed. CI on the head commit: lint and types pass; 4 matrix jobs (Python 3.12 and 3.15, Django 5.2 and 6.1, arm64 and x86-64) pass. Changelog: none (docs and tests only) Part of #165.
## Summary - The runbook said GitHub moves open pull requests to `main` when it deletes the release branch; in 0.1.0a3 it closed the one from a fork (#147). Section 4 quotes GitHub's documentation (a merged head's deletion moves open pull requests "in the same repository"; deleting a branch closes the ones associated with it) and what #147 showed; section 10 says deleting the open release branch closes its pull requests. - Section 4 lists the open pull requests into the release branch, and lists them again right before the merge. Section 8 sorts each with a `jq` program into move, recover or leave, recovering only a pull request whose last close came with the branch's deletion, so a merged pull request or one closed on purpose is never reopened. - A moved or recovered pull request gets a CI run (close and reopen), an approval if a fork run waits, and a comment worded for what happened to it; a hotfix aims the moves at the open release branch. - `tests/test_release_runbook.py` runs the runbook's event filter and sorting program on each event sequence and shape of pull request, #147's included, and checks the claims a reader acts on. ## How it was verified CI on the head commit (97c3b4e): lint and type check and all four test jobs pass (10790 passed, 2 skipped on Python 3.15, Django 6.1, x86-64). `tests/test_release_runbook.py`: 18 passed. Changelog: none (runbook only) Part of #162.
## Summary - Two depth scans guarded the json module's recursive reader: one for the token's header and claims (limit 64) and one for bodies (limit 256), each with its own string handling. - They are now one helper, `neolith._nesting.deeper_than`, which every `json.loads` on text from a network passes first: request and reply bodies, neolith error bodies and the `Neolith-Principal` header at 256 levels, the token's header and claims at 64 (HTTP-7). - Spec 01 states the body bound as CON-52: a body nested more than 256 levels deep is refused, judged before a reader that recurses reads it. - Other `json.loads` calls read text neolith wrote itself or text already bounded. Every 1 MB-stack test runs through `tests/small_stack.py` in a process of its own, and a test keeps any other test module from setting a thread stack size. ## Spec trace - CON-52 (new): `tests/test_nesting.py` (Hypothesis: counted depth equals the value's depth, and equals a plain byte scan on any text), plus the 1 MB-stack and 201/256-level tests in `test_network_receiver.py`, `test_http_transport.py` and `test_provider_endpoints.py`. The header test in `test_principal.py` covers #125 without a spec ID. ## How it was verified Reproduced first: `json.loads` of 9,000 levels on a 1 MB thread ends the process (SIGSEGV) on Python 3.13; with the three guards removed, the five 1 MB-stack tests fail by name and the run completes. Read pydantic 2.14.3 (pydantic-core 2.50.4): `from_json` reads 201 levels and refuses 202; the serializer writes 255 and refuses 256; so 256 refuses nothing either admits. CI for 20cd38e: lint and types pass; 10802 passed, 2 skipped on Python 3.12 + Django 5.2 and Python 3.15 + Django 6.1, on x86-64 and arm64. Changelog (Fixed): Every JSON text from a network is judged by one nesting scan before the json module reads it: bodies and the `Neolith-Principal` header at 256 levels (CON-52), a token's header and claims at 64 (HTTP-7). Part of #125.
## Summary - When Resolve told the deployer to remove an identity (required by no hosted app, or provided in the host), set-up also printed hints that assume the identity is called: name `local-first` (the `REMOTE_PROVIDERS` list and `ROUTING_POLICIES` value messages) and "no signing key ... cannot call <id> over HTTP" (E021). Following those hints led to another refusal. - ADR 0036 (Accepted here) narrows the sentences of ADR 0031 and ADR 0027 Decision 9 that fix those messages. Both records get only a `Narrowed by 0036` line. - `_host.refused_identities` names the identities Resolve removes. `neolith_problems`, `remote_problems`, `routing_problems` and `unsigned_problems` leave out the hints for those identities in `_configure.configure` and `_host.build`, the two places that report them alongside Resolve's refusals. - Class covered: every hint that assumes a call, for both Resolve reasons and both keys, in the builder and in set-up. The identity is still refused with Resolve's message, and messages for an identity Resolve keeps are unchanged. ## Spec trace - APP-64, APP-8: `test_a_list_resolve_refuses_gets_one_instruction`, `test_a_policy_resolve_refuses_gets_one_instruction`, and the Hypothesis test `test_no_identity_is_told_both_to_go_and_to_name_local_first`, which now also checks E021 lines. APP-1: `test_set_up_asks_no_signing_key_for_an_identity_resolve_removes` (the #176 reproduction). ADR 0036; no spec sentence states these messages. ## How it was verified - The new tests fail without the fix and pass with it. - CI on d7ab9ee: lint and types pass; the suite passes on Python 3.12 + Django 5.2 and Python 3.15 + Django 6.1, on x86-64 and arm64 (10780 passed, 2 skipped per job). Part of #155. Part of #176. Changelog (Fixed): For an identity Resolve tells you to remove, set-up no longer also suggests naming `local-first` or adding a signing key to call it.
## Summary - The README test ran a block only when its info string was exactly `python`, and skipped every other fence without a word, so a block GitHub shows as Python (`py`, `Python`, `settings.py`, `python title="x"`) was neither run nor checked. - It now fails closed instead of guessing the language: a fence in `README.md` must be exactly `python` (written and run) or `console` or bare (shown, not run). Any other info string fails the test with its line, the string as written, and what to write instead. An indented code block is refused the same way. - The info string is compared as markdown-it-py gives it (`token.info`), with no stripping, case folding, unescaping or splitting, and one predicate, `is_python_fence`, picks the blocks to run for the example files and the marker check. Prior art: markdownlint's MD040 (`allowed_languages`, `language_only`). Known gap: code inside raw HTML is not seen. - Tests cover each refused spelling in backtick, tilde and four-backtick fences, the three admitted strings, nested fences in a list item and a blockquote, and README.md itself. ## How it was verified CI on 89c1283: 10860 passed, 2 skipped on each of the four test jobs (Django 5.2 and 6.1, x86-64 and arm64); lint and types pass. A mutation pass on the check and the predicate: every non-equivalent mutant fails a test. Read markdown-it-py 4.2.0's fence rule: `token.info` is the raw text after the fence, leading space included. Part of #172. Changelog: none (tests only)
## Summary
- A contract now keeps, privately, the record and enum classes its description names under `$defs` (`Contract._types`), since the description holds names, not classes (ADR 0030 Decision 2).
- New `neolith._check_package.packages(hosted)` derives each hosted app's contract package from its declaration and Django's registry: the contract modules the app itself holds, every package module above them with the app that holds it (or none), and the modules left out with each reason, as plain slotted dataclasses like `Finding`. E105 itself is task 4's.
- A module that defines a model or holds an implementation of the app's contracts is left out whether it defines a contract class or is a package module above one, as 0030's input table says of the implementation's module ("may never be part of the contract package"). Nothing is imported and no app code runs.
- Copy, deepcopy, pickle and hash of `Contract`, and `describe()`, are unchanged; a test pins them against the release branch's behaviour.
## What changed and why
Files owned (task 3 of #14): `src/neolith/_contracts.py`, new `src/neolith/_check_package.py`, new `tests/test_check_package.py`.
A module is placed in an app by `Apps.get_containing_app_config` (the innermost app), so a record in a nested app, another app or no app is not this app's. A model in a record module cannot be defined at module level in a host that loads (Django's `ModelBase` asks the registry before apps are ready), so the fixtures build models in a function of the record module.
## Links
Part of #14.
## Specification and decision records touched
None (implements ADR 0030 Decision 2; adds no requirement ID).
## Spec trace
None.
## How it was verified
- `tests/test_check_package.py`: a Hypothesis property over generated record graphs checks `_types` equals the classes reached, in `$defs` order; one child-process host covers every layout of 0030 Decision 2 (20 hosted apps), including package modules above a contract module that hold an implementation, two implementations or two models (each tuple sorted), a contract module above another, records whose module is `None` or a `str` subclass, a qualified name over 200 characters, and a swapped model. Every non-equivalent single-rule mutation of `_check_package.py` tried fails it; four are equivalent: `range(1, len(parts) + 1)`, dropping `or package in above`, `defines.get(package)` in the above-loop `LeftOut`, and dropping the models' `module is not None` guard (Django's `ModelBase` passes every model's module to `get_containing_app_config`, which refuses a non-`str`, `db/models/base.py:131` / `:132`).
- CI at the head commit: all five checks pass, 10814 passed and 2 skipped per test job.
- Source relied on, Django 5.2.19 / 6.1.3: `apps/registry.py:251` `get_containing_app_config`; `apps/registry.py:169` `get_models` and `apps/config.py:241`, which skip automatic and swapped models unless asked; `db/models/fields/related.py:1346` / `:1439`, an automatic many-to-many model takes its declaring model's `__module__`; `db/models/base.py:107`+`:131` / `:108`+`:132` and `apps/registry.py:112`, `:129`. neolith: `_portable.py:365` `register`, called only by `record` (`:434`) and `enum` (`:1002`), each right before its `$defs` entry.
Changelog: none (no public surface).
## Checklist
Reviewers look in this order.
- [x] **Decisions and specification (D, P):** fits the recorded decisions, or includes a new record. New or changed requirements carry IDs and are listed in the spec trace (P5, P6).
- [x] **Correctness and tests (K, T):** behaviour changes ship with tests, and deprecation warnings are errors.
- [x] **Writing and privacy (W, X):** one name per concept (W1), and no private references or session trailers (X1).
- [x] **Hygiene (G):** branch is `<type>/<short-name>` (G1), one logical change (G3).
## Summary - The declaration check (ADR 0021 Decision 2) reads the names each class holds, not what code does, so code in a mixin, a base class, a metaclass or a decorator can still give a declaring class a `path` or `default` no body writes. Nothing said so. - The `NeolithAppConfig` docstring now states that limit, with each way checked against where Django reads the value: `path` on the instance (`__init__`, `__getattr__`, `__init_subclass__`, `_path_from_module`, a metaclass's `__init__`, a class decorator, rebinding; a metaclass property does not reach it), which moves only where Django looks for templates, static files, locale files, fixtures, commands and a new migrations package. - Django reads `default` from the class only, so only class-level code (such as an `__init_subclass__`, a metaclass, a class decorator or rebinding the declaring class) can make it false; that works as `default = False` in the body: Django picks another config class in the `apps` module if one qualifies, else a plain config, and the builder refuses the app as having no declaration unless the picked class declares it. - Tests run every way the docstring names through `AppConfig.create` or `AppConfig.__init__` (refused, admitted, snapshot unchanged); no behaviour, message, spec or record changes. ## How it was verified Django read at 5.2.19 and 6.1.3 (`apps/config.py` is identical): `create` reads `getattr(candidate, "default", ...)` on the class; `__init__` reads `path` with `hasattr(self, "path")`; every `app_config.path` reader. CI for 05b3faf: lint and types pass; 10830 passed, 2 skipped on Django 5.2 and 6.1, x86-64 and arm64. Part of #111. Changelog: none (docs and tests only)
## Summary - Merging into a moving release branch broke it twice: #113 passed on a base without #108 and turned `release/0.1.0a2` red until #114, and base changes cost approvals (#100, #122). - CONTRIBUTING G7 now holds every merge until CI passed on the branch's current tip; while the tip is red, only the fix tested on that tip merges. A pull request that changes CI or a checker (CI config, `scripts/`, every file pytest or Sphinx loads without being asked and the test-suite modules those load: the three conftests and the conformance packages they import, `tests/settings.py` and the test host it sets up, the docs site's `conf.py`, `_ext/` and `_templates/`; or a test that checks the repository's own files), or whose base was retargeted, needs a run made after the tip landed: close and reopen, since a re-run tests the old base. - The known gap is written down: a pull request checked on an older tip can still turn the tip red once, and G7 then holds the next merge. `docs/releasing.md` section 8 retargets first, then closes and reopens, and words the contributor comments to explain the reopen; section 10 says why there is no merge queue and no "up to date" rule, and gives the command that checks both G7 facts. - `tests/test_release_runbook.py` asserts G7's binding clauses whole, that every checker path it names exists and covers every script CI runs, every conftest, the settings module pyproject names, every test-suite module that setting up Django and importing the conftests loads (found by loading them in a subprocess), and the docs-site code and templates Sphinx loads (found by glob, not listed), the step order, and the comments. ## How it was verified CI run 45687343610 on c95973a: lint and the four test jobs (Python 3.12 with Django 5.2, Python 3.15 with Django 6.1, on x86-64 and arm64) pass, 10907 passed and 2 skipped in each. Checked on this repository's timelines: #147 kept its approval through a close and reopen; #100's approval was dismissed by the automatic base change at an unchanged head; #122's by a pushed base merge; GitHub's runs API reports a run awaiting approval as `completed`/`action_required`. Read GitHub's documentation on re-runs (same `GITHUB_SHA` and `GITHUB_REF` as the original event) and on merge queues (one merge method is selected). Part of #127. Changelog: none (process docs only).
## Summary - Two refusals built from `DATABASES` showed connection values, which ADR 0033 Decision 7 rules out: two aliases on one database printed `ENGINE`, `NAME`, `HOST` and `PORT` (or the SQLite path), and `neolith.E018` printed the path a SQLite `NAME` opens, or the whole `NAME` of a `file:` URI with no path, query included. - ADR 0034 (Accepted here) narrows both messages to the alias and the rule: `databases <a> and <b>: both name one SQLite file; ...` or `... both name one database, with the same ENGINE, HOST, PORT and NAME; ...` (0009's row, Decision 1), and `database <alias>: no database at its NAME; ...` (0022's Boot table, Decision 3). `neolith.E012` and the migrate step's two messages keep the driver's error, as the ADR's Context explains. - The comparison reads `HOST` and `PORT` as Django's backends do (Decision 2): `None` and every false value of a type whose truth can be read without its own code (`str`, `int`, `float`, `bytes`, the built-in containers, `complex`, `Decimal`) as not set, like an absent key; a `PORT` as the number `int()` reads, with `0` not set; a `HOST` as a `str`. Values are read through the base type's own methods, so no value's code runs, and any other value is not compared, so a `list` `HOST` no longer makes the builder raise. - The class: a marker in every value under an alias, changed one place at a time to eight types, appears in no message of `databases_problems` or the builder; a marker in a SQLite `NAME`, in each state Boot refuses, appears in no `neolith.E007` or `neolith.E018`. Each compared key, and each `HOST` and `PORT` form, is tested in both directions (refused as one value, built as two, not compared). ## Spec trace No ID added or changed. The conformance case `lifecycle_a_database_with_no_schema_stops_boot` now states the new E018 diagnostic. The new tests cite APP-18, APP-31 and APP-32. ## How it was verified CI at 702016c: 11104 passed, 2 skipped on all four test jobs (Python 3.12 with Django 5.2 and 3.15 with 6.1, arm64 and x86-64); lint and types pass. Read: Django 5.2.19's and 6.1.3's `db/utils.py` (`configure_settings`), `postgresql/base.py`, `mysql/base.py` and `oracle/utils.py` on `HOST` and `PORT`; every message cell of ADRs 0009, 0014, 0022 and 0023; every refusal in `_databases.py`, `_checks.py`, `_configure.py`, `_boot.py` and `_migrate.py`. A mutation pass on `_read`, `_host`, `_port` and `_identity` (46 mutants) leaves two, both equivalent: a missing `HOST` or `PORT` read as `None` instead of `""`, which both readers map to `""`. Changelog (Fixed): The refusal of two database aliases that name one database, and `neolith.E018`, no longer print connection settings or a SQLite path; two server aliases whose `HOST` or `PORT` differ only in a form the backends read alike (`PORT` `"5432"` and `5432`, or `"0"` and absent) are refused, and a `HOST` that is not a string no longer makes the builder raise `TypeError`. Part of #132.
## Summary - Section 7 said the website's code example must be identical to the README's, without saying which text. - The step now names the `neolith-example:start` and `neolith-example:end` markers as what the website copies, gives a command that prints the text between them at the tag, and says the comparison is by code block and paragraph, both ways and in order, since the page is HTML. - A test runs the runbook's own command on the README, checks it prints exactly the enclosed text with no marker line, and pins the words "none missing, none added" and "in the same order" in the step. ## How it was verified `tests/test_release_runbook.py`: 34 passed locally; CI on the head commit: all 5 jobs pass (lint and types, Python 3.12/Django 5.2 and Python 3.15/Django 6.1, arm64 and x86-64). Changelog: none (runbook and tests only) Part of #175.
## Summary - Adds ADR 0037, status Proposed, the record step 8's plan names: one example project in `examples/`, run as separate `neolith run` hosts by the implementation's own tests, verifies OVR-4 and OVR-5, with one spec 06 sentence modelled on the one for TRN-73 and TRN-74. - Answers 0032's open question 3 for 0.1: `over_http` stays private; app authors' HTTP contract testing becomes an open-questions item carrying 0032 Decision 6's three constraints. - Proposes one narrowing, with its `Narrowed by 0037` line on acceptance (D2): 0032 Decision 9's `suite.tests` hash also covers `examples/`. 0017 is unchanged: its skeleton sentence is about 0.1 as the roadmap defines it, and the example's `principal_from=()` is its own choice, since its caller acts for no user (not forced by closed hosts). - Adds the index row. Accepted by step 8's task 4; nothing builds on it before then, and no spec text or requirement ID changes here. ## How it was verified Every quoted sentence, and every sentence that restates another file, was checked against the line that defines it at the head. CI on 40821fb: lint and types, and all four test legs (Python 3.12 with Django 5.2, Python 3.15 with Django 6.1, arm64 and x86-64) pass. Part of #15. Changelog: none (docs only)
## Summary
- Status lines for specs 00, 02, 03 and 05 call a section specified only if it carries requirement IDs; the invariants (00) and Addressing (03) are now "described".
- Removed the future-tense sentence at the end of spec 03's shared-secret tokens section; 01's two "roadmap step 4" notes now point at APP-54 and APP-55.
- The concepts page states the HTTP transport as present text instead of a `{planned} 5` block.
- A new test applies the rule to every spec document except 06 (its sections restate other documents' IDs, ADR 0032). It matches case-insensitively and judges each `##` and `###` section by its own text and subsections. Editorial only: no normative word and no requirement ID changes.
## How it was verified
`tests/test_spec_status_lines.py`: 6 passed locally; a mutant naming a `###` section without an ID in 05's line fails it. CI on the head commit: all 5 jobs pass.
Changelog: none (editorial)
Part of #15.
…189) ## Summary - `NeolithAppConfig.__init_subclass__` sets `default` (and the declaration snapshot) on each new subclass. A metaclass with a read-only `default` property made the class fail with a raw `AttributeError`, which the builder showed as `app a1: cannot be read: AttributeError: ...`. - Every attribute neolith sets there now goes through one helper: if the metaclass raises (a property with no setter, a setter that raises, a `__setattr__` that raises), the class is refused with a `DeclarationError` naming the app, the attribute and the cause (K2, ADR 0021 Decision 8: every refusal at Declare is a `DeclarationError`). - Class covered: all three writes (`default = False` on a base class, `default = True` on a declaring class, the snapshot). What is admitted is unchanged, as decided on #111: each such class was already refused, only with the wrong error. - The `NeolithAppConfig` docstring names the case. The new message text appears nowhere in `docs/adr/` or `spec/` (grepped); no record or spec sentence changes. ## Spec trace - APP-6: `test_a_metaclass_that_refuses_what_neolith_sets_is_refused_by_name` (five metaclass shapes), `test_a_metaclass_default_with_no_setter_is_refused_by_name_at_configure` (the issue's reproduction, through the builder). ## How it was verified Python's `setattr` on a class runs the metaclass's data descriptor or `__setattr__` first; the message text is that of Python 3.12+ (`requires-python >= 3.12`). Both new tests fail on the base with the raw error. CI for 9b72451: lint and types pass; 11126 passed, 2 skipped on Django 5.2 and 6.1, x86-64 and arm64. Part of #184. Changelog (Fixed): A config class whose metaclass keeps neolith from setting `default`, such as a read-only `default` property, is refused with a `DeclarationError` that names the attribute, not a raw `AttributeError`.
## Summary - Adds `tests/serving.py`, a helper the step 8 tests use to run real hosts: it starts `python -W error -m neolith run <apps> --settings <module> --bind <address>` in a given working directory with only `PATH`, `PYTHONPATH` and the given environment, and reads the port back from the `serving` line. - Every wait is on printed lines, bounded at 120 s (ADR 0032 Decision 11), and fails with everything the host printed; `wait_for` returns the first line not yet matched, earlier ones included. `stop()` sends SIGTERM and waits for `neolith: stopped`; `ended()` fails if the host's output is still held open after the bound; `served()` kills the host in `finally`; `close()` keeps to one bound and closes only the pipes whose reader finished; `once()` runs `neolith migrate` or `neolith check` under the same bound. - Only module names and a bind address that neolith's own `parse_bind` accepts reach an argument list, and `request()` connects to the address the host bound, so `[::1]:0` works; an admitted address the host cannot listen on fails at `serving()` with the host's `cannot listen` line. - Each fail-closed path has a test: a passed `wait_for` bound, a `once()` past its bound, a body that raises inside `served()`, and output held open by a process the host left behind. Removing the `finally`, the `once()` timeout, the held-output check or the reader check in `close()`, or lifting the `wait_for` deadline, makes a test fail or hang into the job timeout. ## How it was verified `tests/test_serving.py` (23 tests, no sleeping, T3): a tiny host migrates, checks clean, answers on IPv4 and IPv6 loopback, sees no variable of the parent and runs with `-W error`, waits for lines out of order, stops on SIGTERM, and fails closed on each path above; plus refusals of non-module arguments and of bind addresses neolith refuses. CI on 122d665: lint and types pass; all four test legs pass with 11149 passed, 2 skipped; the 23 serving tests add about 12 s per leg (K10). Changelog: none (tests only) Part of #15.
## Summary - Reading `NEOLITH["DATABASES"]` could run the deployer's code and raise instead of refusing (rule K2): a `str`-subclass key in a `TEST` dict (#177), a path `NAME` whose own `__str__`, `__hash__` or `__eq__` ran (#181, #140), and a SQLite `NAME` holding a NUL or a lone surrogate. - A path `NAME` is now one of `pathlib`'s own classes, and every slot it holds is an exact `str`, `int` or `bool`, or a list or tuple of exact `str`, so `str()` runs only `pathlib`'s code; it is compared as `PurePath.__eq__` compares (flavour, and text lower-cased for a Windows path). A subclass is refused by its type, since `PurePath.__str__` reads attributes and methods a subclass may replace. A SQLite `NAME` whose path cannot be resolved, for any error, is refused. - Same class in the other readers: a fixed key is looked up only among exact `str` keys (`TEST` keys, missing aliases, `DATABASES` in `NEOLITH`, `default` in the closed-host check, `BACKEND` in a `CACHES` entry), and a backend's `vendor` is read from its classes' own namespaces. `HOST` and `PORT` stay as ADR 0034 Decision 2 reads them, never refused by type. - #178 needs no change: #171 shows no value in the refusal. ## How it was verified New tests (path subclasses with their own `__str__`, property, `__getattribute__`, metaclass or `parser`; exact paths built from or holding a `str` subclass; `str`-subclass keys; a case-only POSIX pair; NUL, surrogate and a `realpath` that raises) each failed on `release/0.1.0a4`. CI on ffc77e8: lint and types pass; 11187 passed, 2 skipped on Python 3.12 with Django 5.2 and 3.15 with Django 6.1, arm64 and x86-64. Read: CPython 3.12 `pathlib.py` and 3.15 `pathlib/__init__.py` (`__str__`, `__eq__`, `_str_normcase`), `os.path.realpath`; Django 6.1 `db/utils.py` `load_backend` and `utils/functional.py` `LazyObject` (no `__fspath__`). No record or spec holds a changed message (grep of `docs/adr/` and `spec/`). Part of #140. Part of #177. Part of #181. Changelog (Fixed): Refuse a `str`-subclass key in a database `TEST` dict, a `NAME` that is a subclass of a `pathlib` path, and a SQLite `NAME` whose path cannot be resolved, instead of raising or running their code.
## Summary - Adds `wrangler.json` for an assets-only Worker, `neolith-docs`, which serves `build/docs/site/` at the base path `/neolith`. It sets no route and no `workers.dev` address, so the dashboard keeps the routing. - Adds `scripts/workers_build.sh`, the build command for Workers Builds. It installs the `docs` group in a venv as CI does, then runs `python scripts/docs.py publish`. - Adds `scripts/docs.py publish`. It always checks a development build, with noindex and the banner, because `main` carries a released version string; the install-command rule follows the version (`.dev` or not), so `main`'s pages may show how to install its release. It puts the HTML under `dev/` and writes the site-root files: `_redirects` (the URL contract), `versions.json`, `llms.txt` and `404.html`. Each old URL has a rule with its slash and without it, as the old site answers both. It then checks that every old URL, with its slash or without it, every redirect source and every link in those files leads to a page. Any problem exits 1, so a failing site is never deployed. CI's docs step runs `publish` in place of `check`. - Follows the design gate on #58. ADR 0024 (Proposed) now says `dev` comes from `main`, states the install rule by version, and leaves to the release-publishing change how release pages stay served across later deploys. `.wrangler/` is ignored, and the sdist includes `wrangler.json`, which the tests read. ## Setup outside the repository Owner, in Cloudflare and GitHub. Do steps 2 to 4 once this change has reached `main` through its release. Until then, the build on `main` fails, because the script is not there yet. 1. On GitHub, install the app "Cloudflare Workers and Pages" on `stack314`, under "Only select repositories", with `django-neolith`. 2. In Cloudflare, go to Workers & Pages, Create application, GitHub, and pick `stack314/django-neolith`. Enter these values, then select Save and Deploy: - Worker name: `neolith-docs` - Production branch: `main` - Root directory: leave it empty - Build command: `sh scripts/workers_build.sh` - Deploy command: `npx --yes wrangler@4.160.1 deploy` - API token: the one Workers Builds creates 3. In the Worker, go to Settings, Build, Build variables and secrets, and add `PYTHON_VERSION` with the value `3.13`. 4. In the Worker, go to Settings, Build, Branch control. Tick "Enable Preview Builds" and set the Preview command to `npx --yes wrangler@4.160.1 deploy --dry-run`, so other branches build and check but upload nothing. Webmaster, on the zone `stack314.com`: 5. Add two routes to the Worker `neolith-docs`, `docs.stack314.com/neolith` and `docs.stack314.com/neolith/*`, under Workers & Pages, `neolith-docs`, Settings, Domains & Routes, Add, Route. They take `/neolith` from the current site, because the most specific route wins, and leave paths such as `/neolithic` to it. Routes match the whole URL, query included, so `/neolith?x` alone still reaches the current site ([routes](https://developers.cloudflare.com/workers/configuration/routing/routes/)). ## How it was verified - At 9bc9801, the script and `wrangler deploy --dry-run` (Wrangler 4.160.1) ran locally on Python 3.13.5: `docs: every check passed (publish)`. `wrangler dev` served the result, and `curl` returned 302 for `/neolith`, `/neolith/` and `/neolith/latest/...` to `dev`, a 301 from record 0011's old URL, 404 with the 404 page, and noindex and the banner on `dev`. - CI for 5421c50: lint, types and the docs step (`publish`, now checking each old URL without its slash too) pass; 11263 passed, 3 skipped on Django 5.2 and 6.1, x86-64 and arm64. Part of #58. Changelog: none (documentation publishing only)
## Summary - Task 2 of #14: the boundary pass reads each hosted app's source once per run (ADR 0030 Decision 3). `neolith._check_source` names each module as Python's path finder does, parses and compiles each file with `ast`, `compile` and `symtable`, resolves every import statement and literal dynamic import (`__import__` as the statement it performs, its level and `fromlist` included), follows a name only when the file binds it by top-level imports alone, and builds the first-party directories and the map from dotted names to files. Later tasks use its `Source`, so each file is parsed once. `Source.known` holds the map's names and every module and package of every hosted app, read from disk wherever the app is installed; a module loaded in the process counts only for a name in neither and in no hosted app's package, such as a library's, so no edge a rule judges depends on import order. - New findings through both entries: `neolith.E112` (a file that cannot be read or compiled, or a directory that cannot be listed), `neolith.W104` (a module whose loaded file has no source) and `neolith.W101` (a listed call with a computed argument). - ADR 0035 (Accepted, as decided on #14) narrows 0030: a name that is not an identifier, such as `0001_initial`, is read; only `__pycache__` and a name with a dot are skipped; each dotted name gets the one file the path finder loads for it, so a file it never loads for that name (`x.py` beside a package `x`) gives no finding. 0030 gains its `Narrowed by` line only. - The class it covers: every rule is checked against the interpreter, not a model of it. The app walk and the map share one lookup, checked against `find_spec` on generated layouts with a library directory, standard-library and built-in names and symbolic links; binding against running every generated form; edges against grimp; the listed set against a walk of Django and neolith. Under `neolith check` the deployer's module is the settings module (one line in `_cli.py`), so both entries build one map. ## How it was verified - CI at dd31e31: all five jobs green; 11,530 passed and 4 skipped on 3.12 with Django 5.2, 11,531 passed and 3 skipped on 3.15 with Django 6.1, on x86-64 and arm64. - A deletion mutant over every guard of `_check_source.py` (436: each condition false and true, each `and`/`or` operand, `continue`, `break`, `except` and comprehension filter), run against every `tests/test_check*.py`: each survivor now has a test that fails, or is equivalent (a guard no input reaches, such as a negative constant level, which `ast` never gives). The edge into a hosted app is tested with its module loaded and not, under both entries. The walk and grimp agree on Django 5.2.19 (885 modules, 3,072 edges) and 6.1.3 (909, 3,214). - Source read, CPython 3.12.16 / 3.15.2: `pkgutil.py` `_iter_file_finder_modules` 130-166 / 131-167; `inspect.py` `getmodulename` 939 / 877; `importlib/_bootstrap_external.py` `FileFinder.find_spec` 1597-1629 / 1356-1388, `PathFinder._get_spec` 1496-1518 / 1238-1260, `_get_supported_file_loaders` 1728 / 1563; `importlib/util.py` `resolve_name` 24 / 23; `symtable.py` 278-321 / 312-369. Django 5.2.19 / 6.1.3: `db/migrations/loader.py` 113, 120 / 114, 121; `apps/registry.py` 251; `urls/conf.py` 17-39; `utils/module_loading.py` 19-25; `conf/__init__.py` 326 in 6.1.3 (`UserSettingsHolder.SETTINGS_MODULE = None`, which `configure()` installs). Part of #14.
## Summary - Task 4 of #14: `neolith._check_imports.findings(source)` reports `neolith.E101` to `E105` and `W105` over the hosted apps' source (`_check_source.Source`, one parse per file) and their contract packages (`_check_package.packages`), as one function over a host. Task 7 wires it into the command; `_check.py` is untouched. - Admitted set: an import of a module that is part of any hosted app's contract package (a contract module or a package above one), of the importer's own app, of a library or of Django (a contrib app's modules other than its models modules) gives nothing. E101: another hosted app's module outside it; E102: an undeclared app's `<name>.models`, a module under it, or a module a model of that app names as its `__module__`; E103: when first-party code in no hosted app that Python runs reaches, through a chain of such code, what E101 or E102 reports, one shortest chain is named; never into a hosted app's module, and an unreadable module ends the chain. A package in no app above a hosted app's package is judged once per app, at the app's `__init__.py`, line 1, since Python runs it before any module of the app; an import gives E103 only through the modules Python runs for it that are not above the importer (Decision 2). - E104: a contract-package module lying in hosted app `<c>` that imports (or runs a package above) a module of `<c>` outside every contract package, or runs code in no app from which a chain reaches one, so importing a contract package never loads its app's internals (Decision 2). E105: each module `_check_package` leaves out, at the first line of its model (where `inspect` finds the class, as for W105) or of its implementation's `class` or `def` in any block at module scope (`if`, `try`, `with`, `for`, `while`, `match`); per the reading posted on #14, a package module above that defines nothing is named with the contract module below it. W105: a first-party undeclared app's import of a hosted app's internals, or a relation of its model (foreign key, one-to-one, many-to-many and its explicit through model, generic relation, multi-table link, a child's inherited generic relation once) to a hosted app's model, reported against that app. - Fail closed: a name a rule cannot place is no finding. ## Files owned `src/neolith/_check_imports.py`, `tests/test_check_imports.py`, `tests/test_check_chains.py` (new). Specification and decision records touched: none; tests cite APP-66. ## How it was verified - Each row's flagged and admitted examples, the importer × target matrix, and E103's shortest chain against a breadth-first search on generated graphs (Hypothesis). Single-rule mutants of `_check_imports.py` were run against both test files; the seven behaviour-changing ones an adversarial pass found surviving (models-package depth, relative-import package, a package above inside a chain, nested undeclared app, `mti_inherited`, E104's own-app filter) now each fail a test, and so do those a later review found (the hit and chain named among equals, `own()`'s public filter, E104's label, E105's line and plural forms). - Read, CPython 3.12.13 / 3.15.0b1: `importlib/_bootstrap.py` `_find_and_load_unlocked` 1304-1310 / 1263-1277 (each parent package runs first); `inspect.findsource` (by `__qualname__` on 3.12, by the class's `__firstlineno__` from 3.13, `inspect.py` 1087 on 3.13.5). Django 5.2.19 / 6.1.3: `apps/registry.py` `get_containing_app_config` 251, `get_models` 169, `get_app_configs` 145; `apps/config.py` `MODELS_MODULE_NAME` 10, `import_models` 262-268, `get_models` 241; `db/models/fields/related.py` `create_many_to_many_intermediary_model` 1308 / 1401, its `__module__` 1346 / 1439; `db/models/base.py` `mti_inherited` 350 / 371; `contrib/contenttypes/fields.py` `GenericRelation` 305 / 331. - CI at 4de9464: all five jobs green; 11,572 passed and 4 skipped on 3.12 with Django 5.2, 11,573 passed and 3 skipped on 3.15 with Django 6.1, on x86-64 and arm64. Changelog (Added): `neolith check` reports imports across the app boundary: another hosted app's modules outside its contract package (`neolith.E101`), an undeclared app's models (`neolith.E102`), chains through first-party code in no app (`neolith.E103`), a contract package that does not stand alone (`neolith.E104`) or holds a model or an implementation (`neolith.E105`), and an undeclared app's reach into a hosted app (`neolith.W105`). Part of #14.
…192) ## Summary - Task 5 of #14: `neolith._check_calls.findings(source)` reports the call rules of ADR 0030 over the source that `neolith._check_source` reads: `neolith.E108` (`connect("<id>")` outside `requires`), `E109` (an alias of `default` or of another hosted app, as a literal or `DEFAULT_DB_ALIAS`, in the five places Decision 5 lists, and the forms that mean `default` by leaving the alias out), `E110` (`command_scope` for another installed app), `E111` (`get_model`, `get_app_config`, `sender=` and `get_user_model()` naming another installed app; `get_model` with a literal label of another installed app is E111 whatever its model name, as `get_app_config` of that label is) and `W103` (`testing.boot()` in a first-party module other than a test module). - Every callee is matched by the object its name resolves to, through the names a file binds by top-level imports alone (task 2's `bound`); a name bound in any other way is a blind spot, never a finding. `get_model`, `get_app_config` and `sender=` are matched on any receiver, a migration's registry parameter included. A label no installed app has is not reported by any E110 or E111 form, `get_user_model()` included, since Django refuses it at run time. - A function of `django.db.transaction` is judged as the call it makes, also as a bare decorator: `@on_commit` and the others whose `using` is not first leave the alias out, and `atomic` and `non_atomic_requests` read the decorated function, bare or applied to a `lambda`, as `default`. The set holds the functions the installed Django defines, so `savepoint_create` is judged on 6.1 only. A name in the place of `using`, a view passed by name to `atomic(...)` included, is read as a computed alias (Decision 5) and not judged. - Each finding is on the line of the value written (alias, identity, label, model), or of the name called, loaded or imported for a form that writes none; a literal spread over lines is on the line it starts on. Not wired into the command yet: task 7 adds it to phase 5. ## What changed and why Files owned (task 5 of #14): new `src/neolith/_check_calls.py`, new `tests/test_check_calls.py`, new `tests/test_check_aliases.py`. A call spread over lines is placed by its name, not by what a traceback shows, because CPython 3.13 gives the statement's first line for `auth\n.get_user_model()` (an imported receiver) and the attribute's line for a method call. A W103 in an undeclared app's module names no hosted app (`Finding.app` is `None`); 0030's findings sentence does not list that case, which #195 takes to a record. ## Links Part of #14. ## Specification and decision records touched None (implements ADR 0030's rows E108 to E111 and W103; adds no requirement ID). ## Spec trace | ID | Change | Tests | |---|---|---| | TRN-41 | cited (E108) | `tests/test_check_calls.py::test_connect_with_a_literal_outside_requires_is_e108`, `::test_e108_over_a_host` | | APP-68 | cited (E109, E110) | every test of `tests/test_check_aliases.py`; `tests/test_check_calls.py::test_command_scope_for_another_installed_app_is_e110`, `::test_e110_over_a_host` | | APP-66 | cited (E111) | `tests/test_check_calls.py::test_get_model_on_any_receiver_naming_another_app_is_e111`, `::test_get_app_config_on_any_receiver_naming_another_app_is_e111`, `::test_a_sender_named_by_a_string_of_another_app_is_e111`, `::test_get_user_model_is_e111_when_auth_user_model_is_another_app_s`, `::test_e111_over_a_host_a_migration_s_registry_included` | ## How it was verified - E109's oracle is the interpreter: each generated call of each installed transaction function (7 spellings; the alias left out, positional and keyword, 11 alias forms including a `lambda`; and as a bare decorator on a function, a coroutine and a class) is bound to the real signature, and must be flagged exactly when `using` binds to `None`, `"default"`, another hosted app's alias, or a callable for a function with Django's `callable(using)` branch. Single-condition mutants of each rule's guard, the `sender=` loop, the uncompilable-module guard and the decorator set each fail a test. CI at f41bf6f: all five jobs green; 11,630 passed and 4 skipped on 3.12 with Django 5.2, 11,631 passed and 3 skipped on 3.15 with Django 6.1, on x86-64 and arm64. - Time added (K10), from the log timestamps of CI at ef8ef3d (the rows since add no host): about 1.5 s on 3.15 arm64 (`test_check_aliases.py` 1.0 s, `test_check_calls.py` 0.5 s, one child-process host each) and 2.0 s on 3.12 x86-64. - Source relied on, Django 5.2.19 / 6.1.3: `db/transaction.py` signatures 18-129 / 20-140, `atomic` 316 / 327 and `non_atomic_requests` 334 / 345 with their `callable(using)` branch; `db/__init__.py:38,43`; `db/utils.py:13`; `db/models/query.py` `QuerySet.using(alias)` 1806 / 2019; `db/models/manager.py:136` `db_manager(using=None, ...)`; `apps/registry.py:188,206` `get_model`, `:150` `get_app_config`; `apps/config.py:224`; `db/models/signals.py:15-22`; `db/models/utils.py:5-16`; `contrib/auth/__init__.py` `get_user_model` 278 / 261. neolith: `_host.py:1051` `connect(identity, /)`, `:1238` `command_scope(app, ...)`. Changelog: none (task 7 wires these rules into the command and writes its changelog line). ## Checklist Reviewers look in this order. - [x] **Decisions and specification (D, P):** fits the recorded decisions, or includes a new record. New or changed requirements carry IDs and are listed in the spec trace (P5, P6). - [x] **Correctness and tests (K, T):** behaviour changes ship with tests, and deprecation warnings are errors. - [x] **Writing and privacy (W, X):** one name per concept (W1), and no private references or session trailers (X1). - [x] **Hygiene (G):** branch is `<type>/<short-name>` (G1), one logical change (G3).
## Summary - Adds `neolith.W102` as a function over a host (`neolith._check_views.findings`), task 6 of #14: every URL pattern reachable from `ROOT_URLCONF` whose view serves as no app by `label_of`, and whose request runs the project's own code (a module with a file in the first-party map that no installed app contains), is reported once per pattern, at the innermost such code: a function's first line, or the one definition of a class in its module's file that agrees with it (by `__firstlineno__` and its methods' lines), else line 1. Each file is parsed at most once a run. - That code is read along the links `label_of` follows and only those, so a project view is reported under any wrapper `label_of` follows (a bound method, an exact `partial`, a function whose `__wrapped__` leads to it), and so is a project wrapper around a Django, library or contrib view; those views alone are not (APP-69). - Blind spots, not reported: a project view behind a wrapper `label_of` does not follow (a function that sets no `__wrapped__`, or a callable object of a library's type, such as `sync_to_async(view)`, `functools.lru_cache(view)` or a library's `partial` subclass); an admin view W001 reports; a walk deeper than `label_of` follows; project code in a module with no file (a namespace package); a URLconf entry that is not Django's or that Django cannot read; a URLconf included inside itself (read once); anything past 64 includes deep or 100,000 entries of one walk or one URLconf. Nothing is reported when `ROOT_URLCONF` is unset or does not import (phase 4 reports that). - Task 7 wires it into phase 5; `src/neolith/_check.py` is unchanged. ## Spec trace APP-69 (d) is cited by every test in `tests/test_check_views.py`. No ID added or changed. ## How it was verified - Matrix in one child process: owner (hosted, undeclared, project, library, Django, `static.serve`, contrib) × form (function, `as_view()`, decorated `dispatch`, bound method, instance, class) × every sequence of up to two of eight wrappers, each compared with an answer worked out in the test; plus a fixture per guard (walk bounds at exactly 64 includes and 7 reads, cycle set; each class-placement step, a one-line class with a lambda body among them; class kinds and admin names, an admin of an uninstalled app's model among them; unreadable files) and per blind spot. Mutation pass over `_check_views.py` on 3.13 / Django 6.1: 60 of 64 killed (each new fixture checked against its own mutant); the 4 equivalent are a non-text `ROOT_URLCONF` (fails `import_module`), an empty walk, the installed-app filter (`label_of` already serves such code as its app) and `if admins:` (an empty set matches nothing). - Source read: Django 6.1.3 `urls/resolvers.py` 108, 720, 727, 739; `views/generic/base.py` 82, 107, 118; `contrib/admin/options.py` 778; `contrib/admin/sites.py` 211; CPython 3.13 `inspect.findsource` 1085 and `ast.parse` (a NUL byte is a `SyntaxError` from 3.12). - CI at c2662f0: lint, types and all four test jobs pass (11,693 passed, 4 skipped on 3.12 / Django 5.2; 11,694 passed, 3 skipped on 3.15 / Django 6.1); spec_trace reports APP-69 cited by 21 tests. Changelog: none (no public surface; task 7 wires it). Part of #14.
## Summary - Task 7 of #14, the last of step 7: phase 5 of the check runs every family over one reading of the hosted apps' source, so each file is parsed once: the model rules, reading itself (E112, W104, W101), and the import (E101 to E105, W105), call (E108 to E111, W103) and view (W102) rules of tasks 4 to 6. The rules on models and views now place a class from that reading instead of parsing its file again: views through `Source.placed`, which the call rules share; models, and the model lines E105 and W105 take, through `_check_models.place_of`, which reads `__firstlineno__` on 3.13 and later as `inspect` does, and on 3.12 the first class statement with the class's qualified name, where `inspect.findsource` parsed the module itself. - New `tests/test_check_end_to_end.py`, under both entries in fresh processes: one row of each family for a report-only app; one project with every row of ADR 0030's findings table at once (each once, a duplicate on one line printed once, one import repeated on two lines printed on each, sorted with one line's findings by id, two stale entries by app, exact summary, the same stdout under both entries, no database file); every failing app listed (status 0); a listed app with warnings only (E113); each file parsed once across all families, counting every parse made while any frame of neolith's is on the stack, a nameless one included, with two class-based project views in one file; and the contract-package edges the guide states. - The earlier command tests in `tests/test_check_command.py`, `test_check_models.py` and `test_check_source.py` assumed only their own family ran: their fixtures keep their one finding, or their assertions name the other family's rows exactly where they are the point; `test_check_views.py`'s parse probe counts where the run now reads, and `test_check_command.py`'s stand-ins take the model rules' new `source` argument. - `docs/django-host.md` gains an entry per finding id with what to do, each checked against its rule's `id=` sites (E111 states what `squashmigrations` does to a `RunPython` function), and the contract package with its nested-app case; `CHANGELOG.md` gets one Added entry for the whole check, replacing task 2's, and it and the README say the command refuses a connection while it runs, under `checkapps` only once the apps load. ## Spec trace No ID added or changed. `tests/test_check_end_to_end.py` cites APP-66 to APP-71 and TRN-41. `spec_trace --report` on CI at ed54ca6: 252 requirements, 240 covered by passing tests, 5 marked not tested, 0 problems; APP-66 to APP-71 covered by 64, 15, 59, 32, 9 and 18 citing tests. ## How it was verified - Mutation on 3.13 / Django 6.1 against `tests/test_check_end_to_end.py` alone: dropping each family, renaming each of the 17 ids, deduplicating on the message instead of the line, dropping the app or the id from `_order`'s keys, and the views rule parsing on its own, all killed. The parse-count test, run on 3.12.13 / Django 5.2.19 against the previous head's code, fails on the model rule's parses. - Source read: Django 6.1.3 `db/migrations/writer.py:164-192` and `core/management/commands/squashmigrations.py:218-230` (a migration's function is left for manual porting); Django 5.2.19 / 6.1.3 `db/migrations/operations/base.py:166`, `apps/registry.py:251`; CPython 3.12 `inspect.py:1039-1110` (`findsource` parses a class's module, first decorator's line) and 3.13's `__firstlineno__` read. - CI at ed54ca6: lint, types and all four test jobs pass (11,712 passed, 4 skipped on 3.12 / Django 5.2; 11,713 passed, 3 skipped on 3.15 / Django 6.1). Changelog (Added): written in `CHANGELOG.md` by this pull request, one entry for the whole boundary check. Part of #14.
## Summary - Sets the version to 0.1.0a4 and dates the changelog section 2026-11-26. - The section keeps the one *Added* entry for the boundary check (roadmap step 7) and gathers the *Fixed* entries from the `Changelog` lines of the pull requests merged into the release branch; none declared a breaking change. - The README status says 0.1.0a4; its feature list already describes the boundary check. The `[Unreleased]` link compares the new tag with `main`. - The runbook's version grep also matches `scripts/spec_trace.py` and `scripts/spec_trace_plugin.py`, which show formats and name no release; the step now says so. ## How it was verified - `tests/test_release_runbook.py`, `test_docs.py`, `test_readme.py`, `test_package.py` and `test_release_smoke.py` on Python 3.12 with Django 5.2: 392 passed, 3 skipped (the docs group is not installed). Changelog: none (version bump)
davinerdo
left a comment
There was a problem hiding this comment.
Verdict: Approve — the tip is the approved version PR's tree, and the release checks hold.
Checked: the tip d439123 is #197's squash, with the same tree as the approved 7d8e7f2. The Changes list matches git log --first-parent v0.1.0a3..HEAD line for line (25 entries). The Decision records section matches v0.1.0a3..HEAD: 0030 Proposed → Accepted, 0034–0036 new at Accepted, 0037 new at Proposed, and the eight Narrowed by lines on 0003, 0009, 0017, 0022 (two), 0027, 0030 and 0031. Version and changelog section are dated 2026-11-26, with the [Unreleased] and [0.1.0a4] links. Nothing else is open in the milestone, PyPI has no 0.1.0a4 yet, and the push run of CI on d439123 passed all five jobs. Rebuilt with the pinned tools on 3.12.13: sdist_check (474 files) and twine check --strict passed, the rendered README reads Status: alpha (0.1.0a4), the wheel's Requires-Dist matches dependencies, and release.yml's smoke script printed neolith 0.1.0a4 on Django 5.2.19.
Summary
neolith checkandmanage.py checkappsreport what hosted apps do across an app boundary (neolith.E101toE113,W101toW105), on the standard library only.Changes
Decision records
Narrowed byline: 0003 and 0017 by 0030; 0009 by 0034; 0022 by 0030 and 0034; 0027 and 0031 by 0036; 0030 by 0035.How it was verified
d43912370c8fe59e0de8ecc3592c01d0f35c3519. CI passed on it: lint and types, and the four test jobs (3.12 with Django 5.2, 3.15 with Django 6.1, on x86-64 and arm64).scripts/docs.py check(on 3.15.0b1): every check passed.sdist_check(474 tracked files) andtwine check --strictpassed. The rendered README showsStatus: alpha (0.1.0a4). The wheel's metadata matchespyproject.toml. The release smoke script printedneolith 0.1.0a4 on Django 5.2.19(3.12.13), andon Django 6.1.3on both 3.15.0b1 and 3.14.5.