An app could have nostrod pay an order: it called Pay of net.catcrafts.Nostro1.Checkout on the system bus, and nostrod paid from an account the user had chosen, after a dialog of its own. On 2026-11-22 the owner decided that a link takes its place. The app registers for payto links (RFC 8905), so that an app or a website can hand one to the desktop, and shows a link as its pay form filled in. The link: - The app's desktop entry takes the scheme (Exec=nostro-app %u, MimeType=x-scheme-handler/payto), and nostro-app takes an argument that is no option as a link: it overwrites it in argv and hands it to App::Open once the app has started. - ReadPaymentLink (Nostro.App:Forms) reads payto://iban/<IBAN> with the options amount, receiver-name and message, and refuses a link rather than guess at it, in a sentence of the app's own with nothing of the link in it. Among what it refuses: an IBAN whose check digits do not hold, one of the three options given twice, instruction, a comma in the amount, and a name or a message with a code point that is Unshown, or Blank and no plain space. - A link that is read waits until the accounts are read and DefaultCheckoutAccount has answered or failed, with a line on the accounts' page. Then App::TakeLink fills in the pay form, which says in a banner that a link filled it in, and with more than one account opens it under the choice of accounts that the form's From row has. A link pays nothing: the form's button sends, and polkit's dialog confirms as for any payment (design rule 12, and 14, which is new). - Unshown and Blank are the two tables the worker's Shown() works from. They move into Nostro:Utils, where the app's reader asks them too. The move is within the library. The reader holds a link's name to those two and to no more of Shown(): a name with an & is read, and the dialog shows it with a + as it does any name. The checkout: - nostrod serves one interface under one bus name. Gone are net.catcrafts.Nostro1.Checkout with its XML and its activation file, the polkit action Checkout, the module Nostro.Checkout with --product=checkout, and the worker's record of orders. That changes the published contract after a release, 0.0.0, and design rule 10 records it as the owner's decision. - DefaultCheckoutAccount and SetDefaultCheckoutAccount keep their names and signatures. The account they keep is where a link's pay form starts: nostrod's dialog for choosing it says "have pay links start from", the app's setting reads "Pay links start from", and `nostro checkout account` prints "pay links start from". - The D-Bus policy still lets nostrod own the old name: the nostrod of 0.0.0 asks for it when it starts, and the system files can be newer than the Flatpak it runs from. install.sh removes the old name's activation file. A user's checkouts.cdb is read by nothing any more, and is left where it is. - The Arch package stops installing the checkout's two files, and its pkgrel goes up to 2. Where makepkg -si finds a package of the version already built it installs that one again, which would bring the activation file back. The guide now says that pkgrel goes up with a change to what the package installs. - Bus::Interface goes too: the worker called it in two places, to tell a call to the checkout from one to the main interface. The review's own files follow. gate0 loses the build of --product=checkout, and the three lens sections that named the checkout no longer do, and ask about a link. The README has "Pay links" in place of "Checkout for apps", and AGENTS.consumer.md says what the app reads of a link. Its line on lib/json.hpp no longer gives a release: the file is of none, and the guide names its commit. The pay form and the accounts' page change only by a banner each, shown while a link is in play, which docs/screenshots/take.sh never has: the README's pictures stand. Tests: ShouldValidateForms reads and refuses links and fills the form from one. ShouldDriveTheApp opens links against a real nostrod on the fake bus: before the accounts are known, with no account, with one and with several, with the accounts known and the system bus gone, for a second user whose first connection pays their own accounts only, one that cannot be read, one whose name has an &, and through polkit's dialog to the payment. It now counts nostrod's answers to hold that the account pay links start from is read again once a connection is removed: the check it had there passed without that. ShouldHandleMoneyAndText holds the two tables at the ends of their ranges. ShouldServeEveryUser holds that nostrod serves no checkout, that the bus's policy lets an older nostrod own the old name, and the account pay links start from. ShouldRunCommands holds the CLI's wording. The review's gate0 passes at this commit: the version check, 17 tests, the builds of the CLI, the library, nostrod, the fake system, the app and its --debug-api build, and five lint runs that report nothing. tests/coverage.sh reports lines, functions and regions at 100.00%. Looked at on 2026-11-22 on the made-up system (run fake), on a desktop (KWin at a scale of 1.85). At 420x760, at --scale 3 --size 360x760 and at 1100x720 in the light look: a link's pay form under the choice of accounts, the form after a tap beside that choice, and the accounts' page while a link waits, its line above the rows that stand in for the accounts (--bank-delay 10000). At 420x760: that line above what the page says when the accounts cannot be read (--polkit deny) and above the accounts themselves (--polkit slow, the link opened in the running app), the settings' row and page for the account pay links start from, the sheet for a link that cannot be read, and with --empty the sheet for no account.
90 lines
5.3 KiB
Markdown
90 lines
5.3 KiB
Markdown
## 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.
|
|
- 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`), a link (`ReadPaymentLink`), 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`),
|
|
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.
|