build: add the pre-push review's configuration

.review-gates/config.json configures Crafter.Review's pre-push review
for this repository. Its commits mode lists four lenses:
repo-better-solution, repo-bug-prover, repo-security and repo-facts.
For each it names a section of this repository's own, under
.review-gates/lenses/. It sets requireSigned, forbids AI attribution
trailers, and lists fourteen gate0 commands: the version check, the
tests, a build of each product and five lint runs. It names no
authors: a patch that came by mail, as the README asks for one, keeps
its author.

One of the five lint runs is new to the guide: the daemon's, whose
sources list implementations/nostrod.cpp, which the other four's do
not. "Code style" and the command list name it.

.gitignore gains the review's two generated directories.

AGENTS.template.md gains the directory in its table and two commit
guidelines about the review, puts the review into the release recipe
before the tag, names the two generated directories among what is never
committed, and loses the sentence that asked for a Co-Authored-By
trailer on a commit an agent wrote.
This commit is contained in:
Jorijn van der Graaf 2026-11-21 06:39:19 +01:00
commit 564fcdfe0e
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
7 changed files with 372 additions and 4 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@ bin/
build/ build/
# written by every build from AGENTS.template.md # written by every build from AGENTS.template.md
/AGENTS.md /AGENTS.md
.review-gates/push/
.review-gates/trees/

48
.review-gates/config.json Normal file
View file

@ -0,0 +1,48 @@
{
"base": "origin/master",
"rangeFrom": "upstream",
"aiTrailers": "forbid",
"requireSigned": true,
"lenses": {
"repo-better-solution": {
"section": ".review-gates/lenses/repo-better-solution.md"
},
"repo-bug-prover": {
"section": ".review-gates/lenses/repo-bug-prover.md"
},
"repo-security": {
"section": ".review-gates/lenses/repo-security.md"
},
"repo-facts": {
"section": ".review-gates/lenses/repo-facts.md"
}
},
"modes": {
"commits": {
"kind": "commits",
"lenses": [
"repo-better-solution",
"repo-bug-prover",
"repo-security",
"repo-facts"
],
"effort": "xhigh"
}
},
"gate0": [
"packaging/flatpak/release-version.sh",
"crafter-build test --banks=bunq",
"CPLUS_INCLUDE_PATH=/app/include/c++/v1 crafter-build lint --banks=bunq",
"crafter-build --banks=bunq",
"crafter-build --banks=bunq --lib",
"crafter-build --banks=bunq --product=daemon",
"CPLUS_INCLUDE_PATH=/app/include/c++/v1 crafter-build lint --banks=bunq --product=daemon",
"crafter-build --product=checkout",
"crafter-build --banks=bunq --product=fake-system",
"CPLUS_INCLUDE_PATH=/app/include/c++/v1 crafter-build lint --banks=bunq --product=fake-system",
"crafter-build --banks=bunq --product=app",
"CPLUS_INCLUDE_PATH=/app/include/c++/v1 crafter-build lint --banks=bunq --product=app",
"crafter-build --banks=bunq --product=app --debug-api",
"CPLUS_INCLUDE_PATH=/app/include/c++/v1 crafter-build lint --banks=bunq --product=app --debug-api"
]
}

View file

@ -0,0 +1,58 @@
## This repository: Nostro
A banking client for Linux that holds people's bank keys and moves
their money. The stated design is `README.md` (the manual),
`AGENTS.template.md` (the contributor guide; `AGENTS.md` is written
from it and the dependencies' notes by every crafter-build run, and is
not in the tree), `AGENTS.consumer.md` (the notes agents in a consumer
of the library get) and the contracts the guide names: the interfaces
under `interfaces/`, `Transaction` for the bytes on disk,
`packaging/dbus/*.xml` and
`packaging/system/net.catcrafts.Nostro1.policy` for the system bus. The
guide's "Design rules" and "Security considerations" are the owner's
decisions: a range that departs from one without saying so is a
finding; whether one should change is the owner's call, not a defect of
the range.
The layers are the guide's "Project overview": the library and its
connectors, nostrod's front and its workers, the CLI,
`Nostro.Checkout`, the toolkit, the app, the window, `project.cpp`, the
packaging and the one workflow. Read there, and in design rules 1, 8,
11, 12 and 13, what belongs in which before judging where a change
sits. The questions this repository adds to the charter's:
- Does a client decide what nostrod should (design rule 8)? The guide
has the app's own checks only spare the user a round trip.
- Does logic sit in a `main`, or twice, in the CLI and in the app,
where design rule 8 wants it in a partition of the library?
- Does the window (`Nostro.Ui.Shell`, `implementations/nostro-app.cpp`,
`Nostro.DebugCommands`) decide something that design rule 11 wants in
the toolkit or the app, as a function a test can call?
- Does anything of the library, nostrod, the CLI or `Nostro.Checkout`
import or include anything of the app (design rule 13)?
- Does a bank's own code sit where the guide's "Adding a bank" puts it?
Search first:
- The partitions' own helpers, which the guide's "Project overview"
lists partition by partition, before a new one beside them.
- What the tree already depends on, before a hand-rolled copy:
Crafter.Network, Crafter.DB, Crafter.Graphics, libsystemd's sd-bus
and sd-event, OpenSSL and the vendored `lib/json.hpp`.
- The system's own mechanisms, before one of nostro's: polkit's policy
and an administrator's rules, D-Bus activation and systemd, Flatpak's
permissions. The guide's "The app end to end" says which
confirmations of the app's own were taken out and which are the
design: a range that puts one of the former back is a finding.
Commit shape here: the guide's "Commit and PR guidelines", its "Testing
instructions" and design rule 5 say what a change brings with it. A
range that leaves one of those things behind is a finding.
Compatibility: the guide's "Dev environment" says what an install keeps
on disk and where, design rule 5 what may change in the transaction
tables, and design rule 10 what may change on the bus. Judge a range
against an install that is not fresh: files an earlier release wrote
under nostrod's state directory, a client and a nostrod a release
apart, system files (`packaging/system/`) older than the Flatpaks, a
consumer built against `AGENTS.consumer.md` as it was. A range that
works only on a fresh install, or breaks one of these without
documenting it where its users read, is a finding.

View file

@ -0,0 +1,90 @@
## This repository: Nostro
The execution contexts to enumerate, beside the charter's. Each names
where to read how it behaves. The guide (`AGENTS.template.md`)
describes most of them under "Project overview"; where the guide and
the code disagree, the code wins.
- The processes: nostrod's front (`RunDaemon`,
`implementations/Nostro-Daemon.cpp`), a worker per user (`RunWorker`,
`implementations/Nostro-Daemon-Worker.cpp`), the CLI
(`implementations/main.cpp`), the app, and a consumer that runs the
library in a process of its own. Ask of each what happens when
another ends under a call, is absent, is late or comes back, and when
a caller leaves while its dialog is open.
- Callbacks from C: what sd-bus, sd-event and libwayland call back
returns into C. Read in the caller what a return value means there,
and ask what an exception that leaves the callback would do.
- Waits in the middle of a call: the worker's `Gate` and `HandleLookup`
ask polkit and go on when it answers, which a person may do minutes
later or never. Ask what else arrives meanwhile, and what the call
was checked against that has moved by then.
- The bank's protocol: `BunqConnector::Call` in
`implementations/Nostro-Bunq.cpp`. Read there what is sent again and
when, what is verified and what is not, and what a failure says about
whether a write went through. Then ask, for the path the range
touches, what a second sending pays twice. The checkout's record
(`PayOrder`) is the same question on disk.
- Money, text and time from outside: amounts (`ParseAmount`,
`FormatAmount`; design rule 3), text from the bank or a caller on its
way to a dialog, a terminal or a screen (`Shown()`, the toolkit's
`:Text` and `:Edit`), JSON from the bank, and days a person typed
(`ParseLocalDate`, `ParseLocalDateEnd`). Attack the edges: overflow,
a sign, zero, bytes that are not UTF-8, a DST change, a time zone
that is not the test's.
- Files: `connectors.json` and its lock
(`implementations/Nostro-Connector.cpp`), the Crafter.DB tables
(`implementations/Nostro-Account.cpp`, and the checkout's in the
worker), a state directory an earlier release wrote. What Crafter.DB
does about a second writer, an order, a flush and a migration is its
own: read it, do not recall it.
- The app (`Nostro.App` on `Nostro.Ui`): state changed by nostrod's
answers and by input, and frames built from it. How a press, the
focus and a frame built in between relate is in
`implementations/Nostro.Ui-Context.cpp` (`Invalidate`, `Stale`). The
cases to attack: a list that changed under the finger, an answer
between press and release, a sheet that takes the focus, a second
press while a change is under way, an answer for a screen the user
has left, a `Pending` dropped or moved, the same state at each of the
three window sizes.
- The window (`Nostro.Ui.Shell`, `implementations/nostro-app.cpp`):
listeners that run inside a dispatch (`Loop::Guard`, `Defer`). Ask
what a listener that resizes or closes the window it was called for
leaves behind. The guide says no test opens a window.
- One source, several builds: `project.cpp` returns one product per
run and sets the defines that gate code. Code behind a define, or in
a product the tests do not build, is still the range's code. aarch64
is a cross build by the scripts in `packaging/flatpak/`.
- Packaging and the workflow, as scripts:
`packaging/system/install.sh` and `uninstall.sh`, the Arch package's
install script, the two aarch64 scripts, `release-version.sh` and the
workflow's jobs. Ask what each sees on a system that holds an earlier
install, and after a step that failed half way.
- Tests: `tests/Support/FakeBunq.inc` and `FakeBus.inc` are nostro's
reading of bunq, the bus, logind and polkit, not those systems. A
test that passes because the fake is more lenient than what it stands
for proves nothing about the code.
Semantics to read on disk rather than recall: libsystemd's headers
(`/run/host/usr/include/systemd/sd-bus.h`, `sd-bus-vtable.h`,
`sd-event.h`); OpenSSL's (`/run/host/usr/include/openssl/`); the format
of a polkit policy (`/run/host/usr/share/polkit-1/policyconfig-1.dtd`);
libc++ and clang as the host installs them
(`/run/host/usr/include/c++/v1`,
`/run/host/usr/lib/clang/<major>/include`); the vendored `lib/json.hpp`;
and the Crafter libraries as crafter-build cloned them
(`~/.cache/crafter.build/external/<Name>-<hash>/`). Several clones may
sit side by side. For the ones `project.cpp` names at a commit
(Crafter.Network outside the `--debug-api` build, Crafter.DB,
Crafter.Graphics, Crafter.LintRules and Crafter.Debug's build helper),
a clone's `.git/HEAD`, or the ref it names, says whether that clone is
at the commit. The others follow a branch (the guide's "Dev
environment" says which): a semantic of one of those is unverified. A
crafter-build that runs as a Flatpak keeps its clones in that app's own
directory, which is not readable from here, and compiles with an LLVM
of its own: a semantic of a dependency that has no readable clone at
the pinned commit is unverified, and where one may differ between LLVM
releases the host's headers settle it for the host's build only. Not on
disk: bunq's API (the guide's "Gotchas" record what was seen in its
sandbox, and the fake is no evidence of the bank), and how polkit and
its agents, systemd, bubblewrap and Flatpak behave beyond their
headers. A semantic only they settle is unverified.

View file

@ -0,0 +1,61 @@
## This repository: Nostro
- A claim that a tree passes the version check, the tests or lint, or
builds a product, traces to the Gate 0 log among the evidence paths
INPUTS names: each command with its exit code and the sha it ran at.
A claim of a run anywhere else traces to a capture of that run that
names the commit, or is unverifiable: bunq's sandbox or production, a
phone, a compositor or a look at the window (which screens, at which
sizes, on what), a polkit agent's dialog, the installed Flatpaks and
system files, the aarch64 cross build, CI, the coverage figures
(`tests/coverage.sh`), a session of the `--debug-api` build.
- The guide asks a commit to say how a bug was reproduced, how a
connector was tried against the bank and how a change to a screen was
looked at. Each such sentence is a tested claim by the rule above,
not a formality.
- A test a message names is a name in `project.cpp`'s lists and a
`tests/<Name>/main.cpp` whose checks pin what the message says. The
tests talk to a fake bunq and a fake system bus of their own
(`tests/Support/`): a passing test shows what nostro does with what
the fake answers, never what bunq, polkit, logind or a compositor
does.
- `AGENTS.md` is generated from `AGENTS.template.md` and the
dependencies' `AGENTS.consumer.md` and is not in the tree: a claim
about it is checked against those sources. `AGENTS.consumer.md`
reaches the agents of the library's consumers on their next build:
every sentence in it is a claim about the code at the commit that
writes it.
- The guide dates what it records ("on 2026-11-19 ..."). A dated
sentence the range adds claims that the thing was done, seen or
decided that day, which is no later than its commit's date, and what
it says was run or seen traces like any tested claim.
- A claim about a contract is checked against the contract:
- the wire against `packaging/dbus/*.xml` and the method tables in
`interfaces/Nostro-Bus.cppm`;
- a polkit default against
`packaging/system/net.catcrafts.Nostro1.policy`;
- the size or fingerprint of `Transaction` against the
`static_assert`s in `implementations/Nostro-Account.cpp`;
- a Flatpak's permissions against
`packaging/flatpak/net.catcrafts.Nostrod.yaml`, `project.cpp` and
`packaging/flatpak/build-aarch64.sh`;
- a dependency's commit against `project.cpp`;
- the vendored `lib/json.hpp` against the upstream commit the guide
and `packaging/licenses/NOTICE` name and the blob id the guide
gives (`git hash-object`);
- the version against `NOSTRO_VERSION` in `project.cpp` and the
newest `<release>` of
`packaging/flatpak/net.catcrafts.Nostro.metainfo.xml`.
- A `<release>` entry in that metainfo is the release notes users read:
every sentence in it is a claim about the code since the previous
tag.
- The README is the manual. Its CLI section is a claim about
`implementations/main.cpp`, "The app" about the screens, and "How
Nostro runs" and "Security" about nostrod and the shipped policy.
"Installing" speaks of a published channel that is not on disk: what
it says of the remote, and of what a release carries, is unverifiable
from here, a note naming what would settle it.
- A statement of how bunq behaves (the guide's "Gotchas", a comment, a
message) says where it was seen, the sandbox or production, and
traces to a capture, or is unverifiable. bunq's specification is not
on disk.

View file

@ -0,0 +1,105 @@
## This repository: Nostro
Nostro holds people's bank keys and moves their money. Its stated
security model is `README.md` ("How Nostro runs", "Checkout for apps",
"Security"), the contributor guide `AGENTS.template.md` ("nostrod end
to end", design rules 4, 9, 10 and 12, "Security considerations";
`AGENTS.md` is generated from it and is not in the tree) and the files
that are the model as shipped:
`packaging/system/net.catcrafts.Nostro1.policy` (each polkit action and
its defaults), `packaging/system/net.catcrafts.Nostro1.conf` (who may
own and call the two bus names), `packaging/system/nostrod.service`
(the user nostrod runs as and its hardening), the two Flatpaks'
permissions (nostrod's in `packaging/flatpak/net.catcrafts.Nostrod.yaml`,
the app's in `project.cpp`, and both again in
`packaging/flatpak/build-aarch64.sh`), `packaging/dbus/*.xml` (the
wire) and `.forgejo/workflows/flatpak.yaml`. These are the owner's
decisions: a range that weakens one without saying so is a finding;
whether one should change is the owner's call. Write the standard of
Method 1 from them as they are at HEAD, not from this section.
The charter's web classes (CORS, cookies, CSRF, headers, uploads) have
no counterpart here: "not here", with that reason. Their counterparts
are the bus policy, the polkit action, a Flatpak's permissions, the
unit's hardening and a file's mode.
The actors to write down, each with what the model above lets it do: a
local user, whom nostrod knows by the uid the bus gives for the caller;
any program that user runs, the CLI and the app among them, which
neither polkit nor nostrod can tell apart; an app at checkout; the
bank; polkit and its agent; an administrator, and root; a build, which
runs each dependency's `project.cpp`; the workflow's two jobs.
The decision points, each with where to read it:
- Who the caller is, and whose data a call reaches: the front
(`implementations/Nostro-Daemon.cpp`) and a worker's start
(`RunWorker`).
- What needs polkit's yes, and what is read or asked of the bank
before it: the worker's `Handle`, `Gate`, `HandleLookup` and `Prompt`
(`implementations/Nostro-Daemon-Worker.cpp`), design rule 9 and the
policy file. For a hunk there: what does a caller that polkit refuses
learn from the answer or the error, and what did the bank see?
- What the dialog says against what is then done: the summary, and the
details a polkit rule reads, are built in the worker (`Prompt`,
`Shown()`, `Counterparty`). A new field, or a new way for text from a
caller or the bank to reach a summary, is an input to attack: markup,
a control or bidirectional character, a line break, a second amount
or payee. A detail that can differ from what the call then does is a
way past an administrator's rule.
- The checkout (`Order::Read`, `ChooseAccount`, `PayOrder`,
`ErrorFor`), which the guide states as the exception to design
rule 9: what does an app learn that the README's "Checkout for apps"
does not already give it?
- Secrets (design rule 4): where a key, a token or the private key is
read, kept and passed (`CreatePrivateFile`, `ReadSecret`, a `Secret`
field, the sensitive mark on a message), and where one could surface:
a `Note`, an exception's message, a D-Bus error, a formatter, a log,
a core dump, a command line.
- The bank's side (`BunqConnector::Call`, `EnsureServerPublicKey`,
`OnAddBunq`): what is verified before it is used, what decides
between production and the sandbox, and what is sent again. A path
that can pay twice, or pay what was not shown, is a finding here as
well as the bug-prover's.
- The app and its debug build (design rule 12, and what the guide's
"Security considerations" say of `--debug-api`): debug code reachable
in another build, a Flatpak made of the debug build, or a loosening
of what `Ui_Type` refuses, is a finding.
- What is built and shipped: a dependency the range has `project.cpp`
name without a commit (the guide's "Dev environment" says which still
follow a branch, and why), a pin moved without the range saying to
what and why, a `lib/json.hpp` that is not upstream's file (the guide
names the commit and the blob id, and `git hash-object` settles it),
a Flatpak permission added, a hardening option dropped from the unit,
a secret or an echo of the environment added to the workflow, a step
of `check` that reaches what `publish` mounts.
Stated limits are not findings. The README's "Security" and the guide's
"Security considerations" say what nostro does not protect against. A
range that leaves one as it is inherits it (`pre-existing`). One that
widens it, or builds on it, owns it. And one that changes what a user
is protected from changes the README's "Security" in the same range.
What the tests pin is evidence to read. `ShouldServeEveryUser` is where
the policy file, the published XML and what a refused caller is told
are held; the guide's table of tests says what else it covers. A
protection the range adds, without a check there that fails without
it, is the `pK:absent` slot's. The fake bus answers as polkit whatever
the test told it to: it shows what nostrod does with an answer, not
what polkit answers.
Semantics to read on disk rather than recall: libsystemd's headers
(`/run/host/usr/include/systemd/sd-bus.h`, `sd-bus-vtable.h`); the
format of a polkit policy
(`/run/host/usr/share/polkit-1/policyconfig-1.dtd`); OpenSSL's headers
(`/run/host/usr/include/openssl/`); Crafter.Network and Crafter.DB as
crafter-build cloned them
(`~/.cache/crafter.build/external/<Name>-<hash>/`, at the commit
`project.cpp` names for each outside the `--debug-api` build; a clone's
`.git/HEAD`, or the ref it names, says which commit it is at). A
crafter-build that runs as a Flatpak keeps its clones in that app's own
directory, which is not readable from here: a control that rests on a
dependency without a readable clone at the pinned commit is
`unverified`. Not on disk: what polkit answers and how each agent shows
a message (the guide's "Gotchas" record what was read and seen), what
systemd's options and Flatpak's permissions enforce, and bunq's API. A
control only they settle is `unverified`, with what would settle it.

View file

@ -41,6 +41,7 @@ Five C++26 modules, and a sixth in one build:
| `docs/screenshots/` | The README's pictures of the app, on a phone's screen and in a desktop window, and `take.sh`, which takes them again on the made-up system; see "Looking at the app". | | `docs/screenshots/` | The README's pictures of the app, on a phone's screen and in a desktop window, and `take.sh`, which takes them again on the made-up system; see "Looking at the app". |
| `README.md`, `LICENSE`, `LICENSE.GPL` | The manual; the LGPL version 3, which the library, nostrod and the CLI are under, and the GPL version 3, which the LGPL adds its permissions to and which the app is under (design rule 13). | | `README.md`, `LICENSE`, `LICENSE.GPL` | The manual; the LGPL version 3, which the library, nostrod and the CLI are under, and the GPL version 3, which the LGPL adds its permissions to and which the app is under (design rule 13). |
| `AGENTS.template.md`, `AGENTS.consumer.md` | The source of this file, and the notes for consumers. `AGENTS.md` is gitignored: edit the template. | | `AGENTS.template.md`, `AGENTS.consumer.md` | The source of this file, and the notes for consumers. `AGENTS.md` is gitignored: edit the template. |
| `.review-gates/` | The pre-push review's `config.json` and this repository's lens sections (`lenses/`), read by Crafter.Review. Its `push/` and `trees/` are generated and gitignored. |
| `.vscode/` | A build task and an lldb launch configuration, both stale; see "Gotchas". | | `.vscode/` | A build task and an lldb launch configuration, both stale; see "Gotchas". |
| `bin/`, `build/` | Generated and gitignored. The library and the CLI are both named `nostro`, so one build leaves two `bin/nostro-<target>-<march>-<mtune>-<hash>/` directories: the library's (`libnostro.a`, the PCMs, `std.pcm`) and the executable's (`nostro`). Glob for the one holding `nostro`. nostrod builds into `bin/nostrod-…/`, the checkout library into `bin/nostro-checkout-…/`, the app into `bin/nostro-app-…/` with its fonts and Crafter.Graphics' shaders beside it (`bin/nostro-app-core-…/` is `Nostro.App`'s library), or under `files/bin/` there when it is packaged as a Flatpak. `build/crafter-debug` is the launcher of Crafter.Debug's client, `build/fake-system/` the state of the made-up system `run fake` starts, `build/flatpak-apps/` what `install` and `bundle` make of the app. | | `bin/`, `build/` | Generated and gitignored. The library and the CLI are both named `nostro`, so one build leaves two `bin/nostro-<target>-<march>-<mtune>-<hash>/` directories: the library's (`libnostro.a`, the PCMs, `std.pcm`) and the executable's (`nostro`). Glob for the one holding `nostro`. nostrod builds into `bin/nostrod-…/`, the checkout library into `bin/nostro-checkout-…/`, the app into `bin/nostro-app-…/` with its fonts and Crafter.Graphics' shaders beside it (`bin/nostro-app-core-…/` is `Nostro.App`'s library), or under `files/bin/` there when it is packaged as a Flatpak. `build/crafter-debug` is the launcher of Crafter.Debug's client, `build/fake-system/` the state of the made-up system `run fake` starts, `build/flatpak-apps/` what `install` and `bundle` make of the app. |
@ -157,6 +158,7 @@ crafter-build clean # delete bin/ and build/
crafter-build test --banks=bunq # the tests in tests/, against a fake bunq; none talks to bunq itself crafter-build test --banks=bunq # the tests in tests/, against a fake bunq; none talks to bunq itself
tests/coverage.sh [profile runtime] # the tests with coverage: a report per file and every line no test ran tests/coverage.sh [profile runtime] # the tests with coverage: a report per file and every line no test ran
crafter-build lint --banks=bunq # the Crafter.LintRules lite rules project.cpp registers, report only crafter-build lint --banks=bunq # the Crafter.LintRules lite rules project.cpp registers, report only
crafter-build lint --banks=bunq --product=daemon # the same over nostrod's own source
crafter-build lint --banks=bunq --product=app [--debug-api] # the same over the toolkit, the app and its window crafter-build lint --banks=bunq --product=app [--debug-api] # the same over the toolkit, the app and its window
flatpak run --filesystem=<dir> org.flatpak.Builder --user --force-clean --repo=<dir>/repo --state-dir=<dir>/state <dir>/build packaging/flatpak/net.catcrafts.Nostrod.yaml flatpak run --filesystem=<dir> org.flatpak.Builder --user --force-clean --repo=<dir>/repo --state-dir=<dir>/state <dir>/build packaging/flatpak/net.catcrafts.Nostrod.yaml
crafter-build --banks=bunq --product=app --packaging=flatpak --march=x86-64-v3 --mtune=generic bundle # the app's Flatpak as one file; `install` installs it for you instead crafter-build --banks=bunq --product=app --packaging=flatpak --march=x86-64-v3 --mtune=generic bundle # the app's Flatpak as one file; `install` installs it for you instead
@ -174,7 +176,7 @@ The app's packaging: `--packaging=flatpak` makes `bin/nostro-app-<variant>/files
- `check`, for a pull request and a run by hand: the version check, the tests, the lint of the library, the CLI and the tests, and then both Flatpaks for aarch64. It runs cold and mounts nothing of the host. - `check`, for a pull request and a run by hand: the version check, the tests, the lint of the library, the CLI and the tests, and then both Flatpaks for aarch64. It runs cold and mounts nothing of the host.
- `publish`, for a pushed tag `X.Y.Z`: the release checks, the tests and both Flatpaks. It then commits the two as `stable` into the Catcrafts Flatpak repository on the runner's host (`/var/www/flatpak`, signed with the key under `/etc/crafter-flatpak`, under the lock the other publishing workflows hold), puts each one's `.flatpakref` beside it with the repository's key in it, and makes release `X.Y.Z` on the forge with the two bundles, the ref files and their checksums. - `publish`, for a pushed tag `X.Y.Z`: the release checks, the tests and both Flatpaks. It then commits the two as `stable` into the Catcrafts Flatpak repository on the runner's host (`/var/www/flatpak`, signed with the key under `/etc/crafter-flatpak`, under the lock the other publishing workflows hold), puts each one's `.flatpakref` beside it with the repository's key in it, and makes release `X.Y.Z` on the forge with the two bundles, the ref files and their checksums.
A release is a tag, as it is for Crafter.Build and imsd-messages: a push without one runs nothing. `packaging/flatpak/release-version.sh` holds `NOSTRO_VERSION` in `project.cpp` to the newest `<release>` of the app's metainfo, whose description is the release notes. For a tag it also checks that the tag is that version, annotated, signed by the owner as Forgejo verifies it, on master, and newer than every release there is. So a release is: bump both, commit, `git tag -s X.Y.Z -m 'Nostro X.Y.Z'`, and push master and the tag together. A release is a tag, as it is for Crafter.Build and imsd-messages: a push without one runs nothing. `packaging/flatpak/release-version.sh` holds `NOSTRO_VERSION` in `project.cpp` to the newest `<release>` of the app's metainfo, whose description is the release notes. For a tag it also checks that the tag is that version, annotated, signed by the owner as Forgejo verifies it, on master, and newer than every release there is. So a release is: bump both, commit, take that commit through the pre-push review until the owner approves its hash ("Commit and PR guidelines"), `git tag -s X.Y.Z -m 'Nostro X.Y.Z'` on the approved commit, and push master and the tag together.
The workflow was written on 2026-11-19 and pushed without having run once: its first run is its test. What it needs, and how each stood that day: The workflow was written on 2026-11-19 and pushed without having run once: its first run is its test. What it needs, and how each stood that day:
@ -249,7 +251,7 @@ What a test cannot show (that the window draws what the frame says, in the right
## Code style ## Code style
- `crafter-build lint --banks=bunq` reports nothing, and neither does it with `--product=app`, with `--debug-api` added, and with `--product=fake-system`: the first reaches the library, the CLI and the tests, and only the others the toolkit's, the app's and the window's sources. A finding at a C boundary (`main`'s `argv`, a `char*` an OpenSSL or POSIX call hands out) is suppressed with `// lint-disable-next-line <rule>` and a comment saying why; anything else is fixed. The rules that need an AST cannot parse a file that `#include`s a standard header before `import std;` (the twelve that include `json.hpp`: four in the library, seven tests and the fake system), because the lint's libclang does not find libc++'s headers, so lint exits 1 for those alone until Crafter.Build issue #46 is fixed. Until then, name the headers through the environment and every rule runs on every file: `CPLUS_INCLUDE_PATH=<libc++'s include directory>`, which is `/app/include/c++/v1` in crafter-build's Flatpak (`flatpak run --env=CPLUS_INCLUDE_PATH=/app/include/c++/v1 net.catcrafts.CrafterBuild lint …`). Prefer C headers (`<errno.h>`, not `<cerrno>`) elsewhere. Tests are linted like the rest. `const-local` sees `bool` and the built-in types, not `std::size_t` or `std::int32_t`: those are made `const` by hand. Lint a product after building it: the AST rules read that product's module files, and against ones from before a change they report nonsense, such as a vector of a type they do not find yet as a local that is never modified. - `crafter-build lint --banks=bunq` reports nothing, and neither does it with `--product=daemon`, with `--product=app`, with `--debug-api` added, and with `--product=fake-system`: the first reaches the library, the CLI and the tests, the daemon's lists `implementations/nostrod.cpp` among its sources, and only the app's two reach the toolkit's, the app's and the window's sources. A finding at a C boundary (`main`'s `argv`, a `char*` an OpenSSL or POSIX call hands out) is suppressed with `// lint-disable-next-line <rule>` and a comment saying why; anything else is fixed. The rules that need an AST cannot parse a file that `#include`s a standard header before `import std;` (the twelve that include `json.hpp`: four in the library, seven tests and the fake system), because the lint's libclang does not find libc++'s headers, so lint exits 1 for those alone until Crafter.Build issue #46 is fixed. Until then, name the headers through the environment and every rule runs on every file: `CPLUS_INCLUDE_PATH=<libc++'s include directory>`, which is `/app/include/c++/v1` in crafter-build's Flatpak (`flatpak run --env=CPLUS_INCLUDE_PATH=/app/include/c++/v1 net.catcrafts.CrafterBuild lint …`). Prefer C headers (`<errno.h>`, not `<cerrno>`) elsewhere. Tests are linted like the rest. `const-local` sees `bool` and the built-in types, not `std::size_t` or `std::int32_t`: those are made `const` by hand. Lint a product after building it: the AST rules read that product's module files, and against ones from before a change they report nonsense, such as a vector of a type they do not find yet as a local that is never modified.
- The first two lines of every source are `// SPDX-License-Identifier: LGPL-3.0-only`, or `GPL-3.0-only` in a source of the app (design rule 13 says which is which), and `// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®`, then a blank line. `project.cpp` carries them too. - The first two lines of every source are `// SPDX-License-Identifier: LGPL-3.0-only`, or `GPL-3.0-only` in a source of the app (design rule 13 says which is which), and `// SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®`, then a blank line. `project.cpp` carries them too.
- Four-space indentation, LF, K&R braces with `} else {`, one declaration per statement. `if(`, `for(`, `while(`, `switch(` without a space in most files (`:Utils` has the space; match the file). Lines run long rather than wrap. - Four-space indentation, LF, K&R braces with `} else {`, one declaration per statement. `if(`, `for(`, `while(`, `switch(` without a space in most files (`:Utils` has the space; match the file). Lines run long rather than wrap.
- `import std;` everywhere; `#include`s only in a global module fragment (`module;` first), and only for OpenSSL, the vendored `json.hpp`, sd-bus and sd-event, and the POSIX calls of `:File`, `:Connector` and nostrod. `namespace fs = std::filesystem;` where paths appear. - `import std;` everywhere; `#include`s only in a global module fragment (`module;` first), and only for OpenSSL, the vendored `json.hpp`, sd-bus and sd-event, and the POSIX calls of `:File`, `:Connector` and nostrod. `namespace fs = std::filesystem;` where paths appear.
@ -293,14 +295,16 @@ The checklist, from the bunq connector:
## Commit and PR guidelines ## Commit and PR guidelines
- Patches go by mail to jorijnvdgraaf@catcrafts.net, as the README says. Branch off `master`. - Patches go by mail to jorijnvdgraaf@catcrafts.net, as the README says. Branch off `master`.
- Take the commit voice from the sibling Crafter repositories: `type(scope): imperative summary` with `feat`, `fix`, `refactor`, `docs` or `build`, and the partition or the CLI as the scope (`bunq`, `account`, `currency`, `connector`, `file`, `bus`, `client`, `daemon`, `checkout`, `cli`, `ui`, `app`, `shell`, `debug`, `build`, `packaging`). The body says what was wrong, why, and how it was verified against the sandbox. Add a `Co-Authored-By:` trailer when an agent wrote it. - Take the commit voice from the sibling Crafter repositories: `type(scope): imperative summary` with `feat`, `fix`, `refactor`, `docs` or `build`, and the partition or the CLI as the scope (`bunq`, `account`, `currency`, `connector`, `file`, `bus`, `client`, `daemon`, `checkout`, `cli`, `ui`, `app`, `shell`, `debug`, `build`, `packaging`). The body says what was wrong, why, and how it was verified against the sandbox.
- The README is the manual: keep its CLI section true to `main.cpp` and "The app" true to the screens: what the one can do, the other can. Update `AGENTS.consumer.md` in the same change when a signature, a path, a default, a file format or an error behaviour consumers lean on changes; consumers pick it up on their next build. - The README is the manual: keep its CLI section true to `main.cpp` and "The app" true to the screens: what the one can do, the other can. Update `AGENTS.consumer.md` in the same change when a signature, a path, a default, a file format or an error behaviour consumers lean on changes; consumers pick it up on their next build.
- A change to how the app looks or is laid out says in its commit how it was looked at: which screens, at which sizes, on what. When it changes a screen the README shows, the pictures are taken again (`docs/screenshots/take.sh`) in the same commit. - A change to how the app looks or is laid out says in its commit how it was looked at: which screens, at which sizes, on what. When it changes a screen the README shows, the pictures are taken again (`docs/screenshots/take.sh`) in the same commit.
- The app's version is `NOSTRO_VERSION` in `project.cpp`, and the newest release in `packaging/flatpak/net.catcrafts.Nostro.metainfo.xml` is the same: `packaging/flatpak/release-version.sh` fails on a tree where they differ, and CI runs it first. - The app's version is `NOSTRO_VERSION` in `project.cpp`, and the newest release in `packaging/flatpak/net.catcrafts.Nostro.metainfo.xml` is the same: `packaging/flatpak/release-version.sh` fails on a tree where they differ, and CI runs it first.
- A change to `Transaction` is a schema change (design rule 5), and the commit message says so. - A change to `Transaction` is a schema change (design rule 5), and the commit message says so.
- A change to the D-Bus interfaces or the polkit policy changes the published contract (design rule 10); the XML, the policy and the test that holds them change together. - A change to the D-Bus interfaces or the polkit policy changes the published contract (design rule 10); the XML, the policy and the test that holds them change together.
- A change that moves code between the library and the app moves it between two licences (design rule 13), and its commit message says so. - A change that moves code between the library and the app moves it between two licences (design rule 13), and its commit message says so.
- Never commit `bin/`, `build/`, `AGENTS.md`, or a `connectors.json`. - Every push of new commits to `master` goes through Crafter.Review's pre-push review first, and goes out only once the owner approves the frozen hash. Run `crafter-review init` once in a fresh checkout or worktree: it writes the `/prepush` skill that drives the review, and the skill stays untracked. The lenses it runs are the approach, the bug-prover, the security lens and the commit truth, each with this repository's own section (`.review-gates/lenses/`): a lesson of a review that is nostro's goes into the section of the lens that should have caught it. CI does not run for a plain push, so the review's gate0, the commands in `.review-gates/config.json`, is the check before one: the version check, the tests, a build of each product, and the five lint runs "Code style" names.
- Every commit of a pushed range is GPG-signed and carries neither a `Co-Authored-By:` nor an `Assisted-by:` trailer in its message, whoever the trailer names. `freeze` refuses a range with a commit that breaks either (`requireSigned` and `aiTrailers` in `.review-gates/config.json`). The config names no `authors`, so who wrote a commit is not checked: a patch that came by mail keeps its author.
- Never commit `bin/`, `build/`, `AGENTS.md`, `.review-gates/push/`, `.review-gates/trees/`, or a `connectors.json`.
## Security considerations ## Security considerations