development: code relying on another component cites its source; stage 2c: the heuristics review
test / test (push) Canceled after 0s

Owner, 2026-10-14: "нам нужно полное ревью кода на предмет всей этой
эвристики. Её не должно там, где можно посмотреть код и ответить точно и
однозначно", and "в коде таких наших блоков должно быть обоснование со
ссылкой на код компонента".

- development.md § Code that relies on another component's behaviour: the
  rule, with the form of the comment (component, the image's version, file,
  function; or a document's URL and section; or "measured on the stand,
  date" said as such), and fixtures saying whether they were seen or
  composed.
- Audit stage 2c: the line "what was taken on trust" becomes the heuristics
  review - an inventory over the whole tree written down as
  docs/assumptions-2026-10-14.md, then each answered from the source of the
  version the image runs, the comment added, the code fixed where it
  contradicts. Plan still 66 lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mix
2026-10-14 18:44:19 +03:00
co-authored by Claude Opus 5.5
parent 3c8628074f
commit 0f984ff8d8
2 changed files with 44 additions and 14 deletions
+24
View File
@@ -215,6 +215,30 @@ Plex [OFL.txt](../internal/web/view/static/OFL.txt) under
`/usr/share/doc/selfpost/`. The panel serves the AGPL text at `/license` and
the OFL text at `/static/OFL.txt`.
### Code that relies on another component's behaviour
The owner's rule (2026-10-14): what another program does is read in its
documentation or its source - never guessed. SelfPost reads Postfix's log
lines and reply codes, feeds OpenDKIM's tables, parses `postqueue`,
`postconf`, `supervisorctl` and `db_dump` output, talks the milter protocol
through go-milter, relies on SQLite's locking, on logrotate's and Docker's
behaviour. Every block of code that does so carries a comment that says
what it relies on and where that is written, for the version the image runs
(the Debian bookworm package, not upstream's head):
```go
// Postfix 3.7.11, src/smtpd/smtpd_check.c, check_sender_login():
// the SASL login is compared with the sender map's owners by strcasecmp.
```
A document instead of source: its URL and section. Where neither answers the
question, the comment says so and what was measured instead - "measured on
the e2e stand, 2026-10-14: ..." - and a measurement is never written as if
it were read. A test fixture copied from a real log says where and when it
was seen; one composed by hand says that it was composed. The heuristics
review of 2026-10-14 (audit-2026-10-12, stage 2c) brought the code that
existed then up to this rule.
---
## Building binaries and the image