90 lines
5.4 KiB
Markdown
90 lines
5.4 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. 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.
|