From 38867cccd1f04cba39283b1300bcbdcff68d9724 Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 15:26:24 +0800 Subject: [PATCH] Record the review of the MIL-001 code (RC-009) --- docs/artifact-registry.md | 118 ++++++++++++------------ docs/sqa/reviews/rc-009-mil-001-code.md | 60 ++++++++++++ 2 files changed, 119 insertions(+), 59 deletions(-) create mode 100644 docs/sqa/reviews/rc-009-mil-001-code.md diff --git a/docs/artifact-registry.md b/docs/artifact-registry.md index a2b17af..5e9452e 100644 --- a/docs/artifact-registry.md +++ b/docs/artifact-registry.md @@ -1,59 +1,59 @@ -# Artifact Registry - -This project's artifact state. Types, short names and `CrossReference -Candidates` come from the framework catalog -(`framework/registry/artifact-catalog.md`); this file only records where -each document lives in *this* project and the next version to use. - -Delete rows for types you don't use. Add a row the first time you create a -document of a type. `Primary File` may contain a glob (e.g. -`docs/uc-*/uc.md`); `framework/scripts/find-crossreferences.sh` reads it. - -| Short Name | Artifact Type | Primary File | Next Available Version | -| --- | --- | --- | --- | -| BC | Business Case | docs/business-case.md | 002 | -| SA | Stakeholder Analysis | docs/stakeholder-analysis.md | 002 | -| PP | Project Plan | docs/project-plan.md | 002 | -| MIL | Milestone / Gateway | docs/milestones/*.md | 006 | -| DICT | Domain Dictionary | docs/dictionary.md | 002 | -| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 009 | - -## Languages - -Set the PO language when the project starts; `project-planning` asks for it -if it is missing. An artifact of a type marked "Written in the PO language" -exists once, in that language, under its normal name (`business-case.md`); the -`artifact` skill ("One file per artifact") has the rule. - -| Setting | Value | -| --- | --- | -| PO language | en | -| PO domain | it | -| High-level register | IT Executive English | -| Technical register | IT Professional English | - -Every artifact of a type marked "Yes" below states its language and domain in -its `Language` and `Domain` Metadata rows; `new-artifact.sh` fills them from -`PO language` and `PO domain`. `Language` is a BCP 47 code (`da`, `en`). -`Domain` is a value from this list; add a row to introduce a domain, so a -reviewer can see at once which professional vocabulary a document uses. - -| Domain | Meaning | -| --- | --- | -| it | Software and IT | -| medical | Healthcare and medical devices | -| construction | Construction and civil engineering | - -| Artifact types | Register | Written in the PO language | -| --- | --- | --- | -| BC, KPI, PP, MIL | IT Executive English | Yes | -| SA, BMC, BPMN, UCD, US, UC, SSD, DM, RA, GOV, DICT | IT Professional English | Yes | -| OC, SD, DCD, ERD, ADR, TM, RC, QC, source code | IT Professional English | No | - -## Notes - -- "Next Available Version" is the zero-padded (3-digit) version to use the - *next* time a new document of that type is created. Increment it only when - a brand-new document is created, not when an existing document's - `## Version History` gets a row. -- `ADR` uses 4 digits (`0001`); `RC` is sequential across all artifact types. +# Artifact Registry + +This project's artifact state. Types, short names and `CrossReference +Candidates` come from the framework catalog +(`framework/registry/artifact-catalog.md`); this file only records where +each document lives in *this* project and the next version to use. + +Delete rows for types you don't use. Add a row the first time you create a +document of a type. `Primary File` may contain a glob (e.g. +`docs/uc-*/uc.md`); `framework/scripts/find-crossreferences.sh` reads it. + +| Short Name | Artifact Type | Primary File | Next Available Version | +| --- | --- | --- | --- | +| BC | Business Case | docs/business-case.md | 002 | +| SA | Stakeholder Analysis | docs/stakeholder-analysis.md | 002 | +| PP | Project Plan | docs/project-plan.md | 002 | +| MIL | Milestone / Gateway | docs/milestones/*.md | 006 | +| DICT | Domain Dictionary | docs/dictionary.md | 002 | +| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 010 | + +## Languages + +Set the PO language when the project starts; `project-planning` asks for it +if it is missing. An artifact of a type marked "Written in the PO language" +exists once, in that language, under its normal name (`business-case.md`); the +`artifact` skill ("One file per artifact") has the rule. + +| Setting | Value | +| --- | --- | +| PO language | en | +| PO domain | it | +| High-level register | IT Executive English | +| Technical register | IT Professional English | + +Every artifact of a type marked "Yes" below states its language and domain in +its `Language` and `Domain` Metadata rows; `new-artifact.sh` fills them from +`PO language` and `PO domain`. `Language` is a BCP 47 code (`da`, `en`). +`Domain` is a value from this list; add a row to introduce a domain, so a +reviewer can see at once which professional vocabulary a document uses. + +| Domain | Meaning | +| --- | --- | +| it | Software and IT | +| medical | Healthcare and medical devices | +| construction | Construction and civil engineering | + +| Artifact types | Register | Written in the PO language | +| --- | --- | --- | +| BC, KPI, PP, MIL | IT Executive English | Yes | +| SA, BMC, BPMN, UCD, US, UC, SSD, DM, RA, GOV, DICT | IT Professional English | Yes | +| OC, SD, DCD, ERD, ADR, TM, RC, QC, source code | IT Professional English | No | + +## Notes + +- "Next Available Version" is the zero-padded (3-digit) version to use the + *next* time a new document of that type is created. Increment it only when + a brand-new document is created, not when an existing document's + `## Version History` gets a row. +- `ADR` uses 4 digits (`0001`); `RC` is sequential across all artifact types. diff --git a/docs/sqa/reviews/rc-009-mil-001-code.md b/docs/sqa/reviews/rc-009-mil-001-code.md new file mode 100644 index 0000000..16fffdb --- /dev/null +++ b/docs/sqa/reviews/rc-009-mil-001-code.md @@ -0,0 +1,60 @@ +# RC-009: Code review of MIL-001 (project foundation: constants, package, tests) + +## Metadata +| Key | Value | +| --- | --- | +| ID | RC-009 | +| CrossReference | [MIL-001], [QC-PY-001] | + +## Version History +| Date | Status | Author | Reviewer | Change | Commit | +| --- | --- | --- | --- | --- | --- | +| 2026-10-13 | Proposed | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | pending | + +--- + +## Artifact Under Review + +- Instance reviewed: the source and tests that [MIL-001] delivers (project foundation: constants, package, tests) +- Checklist used: [QC-PY-001] +- Scope: full review of the files changed on the branch of the milestone +- Language and domain: n/a +- Language reviewer: none +- Mode: autonomous, not independent (the reviewer is `AI as stand-in for S01`; the assistant also wrote the code; the review of the files was done by the `python-developer` agent of the session) + +## Checklist Results + +| # | Criterion | Status | Evidence/Notes | +| --- | --- | --- | --- | +| 1 | Packages, modules, functions, variables, classes and constants follow PEP 8 casing (`snake_case`, `PascalCase`, `UPPER_SNAKE`) | Pass | `PACKAGE_DIR`, `DATA_FILE_NAME` and the other constants are `UPPER_SNAKE`; test functions and the fixture are `snake_case`; the package is `weather`. | +| 2 | Names state purpose in the domain's language; no unexplained abbreviations, no single-letter names outside tiny scopes | Pass | Names state purpose (`FAHRENHEIT_NUMERATOR`, `TEMP_COLUMN_INDEX`, `DATA_FILE`); `temp` is the column name of the lecture's file. | +| 3 | Code is produced by the project's formatter and passes its linter with no unexplained suppressions | Pass | `python -m ruff check src tests` and `python -m ruff format --check src tests` exit 0 with the selection E, F, W, I, N, UP, B, SIM; no `noqa` or ignore. | +| 4 | Every function and method signature is type-annotated, including `-> None` | Pass | Every test function and the fixture are annotated `-> None`; the constants are `Final[...]` annotated. | +| 5 | No bare `except:`, no swallowed exceptions; specific exceptions are raised and the cause is kept (`raise ... from`) | N-A | The changed files contain no exception handling. | +| 6 | No mutable default arguments and no shadowed builtins | Pass | No function has a mutable default and no builtin is shadowed. | +| 7 | Files, locks and connections are managed with context managers | N-A | The changed files open no file. | +| 8 | Public modules, classes and functions have docstrings that say what, not how | Pass | Every constant has a Doxygen `##` comment; the package, `constants.py` and the test and fixture modules have docstrings; `doxygen Doxyfile` ends with 0 warnings. | +| 9 | Logging uses `logging`, not `print`; no secrets or personal data in log output | N-A | The changed files neither log nor print. | +| 10 | Classes and operations trace to the Design Class Diagram they implement; deviations are recorded | Pass | No class exists in these files; the project has no Design Class Diagram (a learning project of this size, recorded in the open issues of [PP-001]). | +| 11 | Tests exist for new behaviour, are named for the behaviour, and do not depend on order or the network | Pass | `tests/test_constants.py` has tests named for the value they fix; none depends on order or the network; the autouse fixture runs each test in a temporary folder. | +| 12 | Type checker runs in strict mode without errors; `Any` is justified in a comment | Pass | `python -m mypy` runs with `strict = true` and reports no issues; no `Any`. | +| 13 | Dependencies are declared and pinned in the project's dependency file, none unused | Pass | `dependencies = []`; the `pandas` extra and the `dev` extra declare `pandas`, `pandas-stubs`, pytest, ruff and mypy with lower bounds; pandas is used by the later milestones. | +| 14 | Each piece of knowledge (a business rule, constant, format, validation or query) is defined in one place; code is merged only where it expresses the same knowledge, not where it merely looks alike | Pass | Every value of the lectures is defined once in `constants.py`; `DATA_FILE` is derived from `PACKAGE_DIR` and `DATA_FILE_NAME`; the Fahrenheit factors are separate constants. | +| 15 | Imports point inward: business-rule modules import no framework, database, UI or delivery-mechanism code, and there are no import cycles | Pass | `constants.py` imports only `pathlib.Path` and `typing.Final`; no import cycle. | +| 16 | SOLID holds: a class or module has one reason to change; new behaviour is added by extension, not by editing a type test in several places; subclasses honour the contract of their base; protocols are narrow; high-level code depends on protocols or abstract types and receives its implementations | Pass | A module of constants has one reason to change; there is no class to extend. | + +## Overall Verdict + +Go — all Mandatory criteria pass or are not applicable. Assessed on 2026-10-13 by the assistant that wrote the code, as stand-in for S01 in autonomous mode. Mode: autonomous, not independent. The pull request is the second look. + +## Action Items + +| Action | Owner | Due | +| --- | --- | --- | +| Challenge this `Go` in the run summary or on the pull request if the stand-in decision is not wanted | S01 | 2026-10-23 | + +--- + +[MIL-001]: ../../milestones/mil-001-project-foundation.md +[QC-PY-001]: ../../../framework/qc/code/qc-programming-python.md +[PP-001]: ../../project-plan.md