betterbird: Betterbird from its pinned release, Owl by policy, accounts declared without credentials and adopted, and a reminder test that is visibly a test (hq issue 345, ADR 0316, ADR 0317) #232
Closed
mesh-admin
wants to merge 4 commits from
fix/345-reminder-test into main
pull from: fix/345-reminder-test
merge into: :main
:main
:fix/nats-stream-purge
:fix/47-G-start-2
:feat/47-G-join11
:fix/1966-gate-record-catalog
:pre/registry-milestone
:fix/1748-retake-and-resolver
:pin/sdk1
:fix/check-every-failure
:feat/l5-l7
:feat/l5-l7-a3
:feat/judge-once-pkgs
:fix/turn-handed-on-approve
:fix/checker-full-failure
:revert/774-l3
:fix/check-names-every-conflict
:fix/check-speed
:probe/1126-seed-10
:probe/1126-seed-9
:probe/1126-seed-8
:probe/1126-seed-7
:probe/1126-seed-6
:probe/1126-seed-5
:feat/1126-seed-4
:revert/1126-seed-2
:feat/774-vault-mints
:fix/1901-node-test-cause
:fix/1945-adopt-hashes
:fix/1945-vault-hashing
:feat/try-speed
:fix/1921-every-failure
:feat/r4g-finish-composer
:feat/r4g-finish-1935
:fix/1901
:fix/forge-requires-no-status
:feat/mail-list
:feat/modules-name-no-node
:fix/r4e-r2
:fix/r4e-k2
:fix/r4e-k1
:feat/r4e-leaf
:feat/r4e-buildmods
:feat/r4e-gate
:fix/1106-sdk-member-merges
:feat/r4c5-checker
:fix/xterm-config-defaults
:fix/1165-fill-retry
:feat/r4d-automx-go
:feat/r4d-n8n
:fix/1275-group-merges-whole-or-not
:fix/1129-no-drift-pass
:fix/270-nats-emits-bus-faults
:fix/claude-code-tips-preference
:fix/628-modules-declare-every-package-they-need
:fix/613-home-network-shares
:feat/bus-websocket-listener
:fix/340-tool-servers-only-from-the-terminal
:feat/the-store-collects-nightly-again
:feat/dbus-module
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
agent-ace
agent-g14
agent-novox
agent-shanks
jschoubben
mesh-tools
miel.truyen
nox-agent
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: novox/mesh-catalog#232
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Issue 345, extended by the operator on 2026-10-12: the
betterbirdmodule sets Betterbird up. Builds novox/hq ADR 0316 (accepted; its pending version 8 records that Owl's xpi is kept in the private artifact store), ADR 0317 (accepted, adoption of existing accounts) and to-be 56 (hq #322, #323). Keeps this PR's first commit (the reminder test's update check off).Depends on mesh-controller #251 (same branch
fix/345-reminder-test): the artifact fieldsurl,sha256,version,file,within, which the running controller refuses as unknown. Merge that first; until it runs, this PR'smesh/merge-gateandmesh/repo-checkread the manifest with a controller that does not know them. The node-engine needs no change.What changes
Installed by the mesh (ADR 0316 §1–§9).
community-package:betterbird-bindeclared absent (ADR 0180), before anything in/opt/betterbird. If its removal fails, the node-engine refuses to merge the release into the package's files (the bytes differ), so nothing is mixed.installation: Betterbird 153.4.0esr-bb10, pinned by URL and sha256 (the AUR recipe's digest, checked by download 2026-10-12), unpacked at/opt/betterbird, where the community package had it, so Betterbird keeps choosing the same profile.owl: Owl 1.5.6.1, pinned by the vendor's sha256 (a54cc3d5…3991221, the file the vendor serves today), kept by the build seat in the private artifact store, unpacked at/opt/betterbird/owl/owl.xpi. No xpi in the repository (tested).policies:install/distribution/policies.jsonat/opt/betterbird/distribution:DisableAppUpdate, and Owlforce_installedfromfile:///opt/betterbird/owl/owl.xpiwithupdates_disabled. Betterbird's own update check honoursDisableAppUpdate(read in itsMailGlue.sys.mjs).spelling:vendor-prefs.jsnaming/usr/share/hunspell, in place of the package's link.start(/usr/local/bin/betterbird: runsbetterbird-tools prepare, thenexec /opt/betterbird/betterbird),launcher(the desktop entry, icon named in the installation),preparation(the tools' binary at/usr/local/lib/mesh-betterbird). No link anywhere.upgrade: record: every new build, the first switch included, waits for the operator's push with Betterbird quit.owlSupportsin the module's test holds the range read from the pinned xpi (115.0 to 156.*), and the test refuses a Betterbird pin outside it.Accounts (ADR 0316 §10–§16, ADR 0317).
accountsreaches the machine as~/.config/betterbird/accounts.json, a trusted mergeable file ("trusted": true, so the whole module layer is the terminal's or the operator's warrant). Per account: address, from-name, label, incoming (kind, host, port, security, sign-in, user), outgoing, and the node-onlykey. A key shaped like a credential anywhere refuses the file, and the refusal never shows the value.prefsrefusesmail.account.,mail.identity.,mail.server.,mail.smtpserver.and the account lists.adoption.go): recorded keys, else the module's ownmesh_<name>keys (created), else the node layer'skey, else adopted by the default identity's address, else created. Refused for that account alone, with the remedy: two matches (with their keys), Owl's account, akeythat does not qualify, another kind than declared (never converted, the review's optional remark), an identity naming no outgoing server.mail.accountmanager.accountsandmail.smtpserversonly while Betterbird is not running, every other key and line kept. The record~/.config/betterbird/accounts-record.jsonkeeps what was adopted or created per profile; leaving the setting releases an adopted account and takes a created one out of the lists.betterbird_accounts(new): counts and kinds only; withpropose, buildsaccountsfrom the profile (never Owl's, no credential) and proposes it throughseat:mesh-controller.settings(invokes) for the operator's Approve; the controller's words come back with addresses and hosts masked.betterbird_status/betterbird_check: installed from the mesh or the community package, version and build beside the newest published build (Betterbird'sversions.txt), the policy, Owl against its pin and active, declared accounts in the list, other accounts, not signed in yet (from logins.json's clear-text server names only), and per place adopted, created or refused with keys. Never an address, host or name.Reminder test (the operator, 2026-10-12). The test profile carries a
userChrome.css: a red frame and a red MESH TEST band on every window of the test Betterbird but the reminder (left as Betterbird draws it, since that is what is tested). The event is "MESH TEST reminder (a throw-away Betterbird of the mesh, not your calendar)". The description begins "OPENS WINDOWS ON THE OPERATOR'S SCREEN: tell the operator before calling it", and the answer says what is on screen. A window title cannot be set by a preference, so the band, the frame and the event name mark it. The test profile never holds a declared account. The update-check fix of the first commit stays.How it was tested
go vet,go test -raceinmodules/betterbird(new:accounts_test.go,install_test.go, a rewrittenmanifest_test.go). Among them: a password-like field refused without its value;prefsrefusing account prefixes; a created account written undermesh_keys, listed at the end only when Betterbird is not running, every other prefs.js line kept, and still "created" with the record deleted; an adopted account written only under its keys, lists and prefs.js untouched, changed preferences named without values, the status saying place and keys and no address; release; two matches refused with keys while the other account goes ahead,keyadopting the named one, and absent, Owl's or other-address keys refused; Owl's address refused; a pop3 account declared as imap refused; sign-ins counted from server names;betterbird_accountsanswering counts only and proposing a value without Owl's account; the status's version, newest build, policy and Owl; the reminder test's band, event, preference and description.MESH_GATE=<controller built from mesh-controller #251> MESH_CHECK_MODULES=betterbird sh merge-check.shpasses: words, agent-home, paths, every manifest throughmodule check(69 long-running resources without health, as kept), the module's tests. With the running controller the manifest is refused (unknown fields), hence the order above.Limits I chose
force_installedinstalls where Owl is missing. The check says "Owl 1.5.7 runs in the profile and the mesh pins 1.5.6.1" and leaves the removal to a person.accounts.json(the node-engine writes the merged file with sorted keys).keyis read from the merged file; that it is given only in a node's layer is the operator's discipline, not checked by the tool.oauth://entry.Reviewers' checklist
betterbird_accounts' proposal (to the controller) carries an address, a host or an account's name.upgrade: record).Fixes issue 345 (with mesh-controller #251). Not merged.
Delivery
novox/mesh-catalog@46c46c955b43— stopped since 2026-10-12T11:41:52ZDelivery plan — builds betterbird → shanks; no bus step
Group
fix/345-reminder-test, in order: novox/mesh-controller@3647928668 → novox/mesh-catalog@46c46c955bTransitions
The commit's note under
refs/notes/mesh-plankeeps every transition:git log --notes=mesh-plan.Merge check at
2f585c86mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: betterbird)mesh/repo-check: PASS — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)Delivery plan — builds betterbird → shanks; no bus step
Run by the build seat on ace as
build-1791799536129547803(builds --log build-1791799536129547803).betterbird: keep the reminder test's update check off so no About window takes the screen (hq issue 345)to betterbird: Betterbird from its pinned release, Owl by policy, accounts declared without credentials and adopted, and a reminder test that is visibly a test (hq issue 345, ADR 0316, ADR 0317)Merge check at
67ee65b2mesh/merge-gate: FAIL — a manifest the change touches fails the module check: modules/betterbird/module.json: this is not a module manifest: json: unknown field "url" (read without build.artifacts[1].sha256, build.artifacts[1].url, build.artifacts[1].version, build.artifacts[1].within, build.artifacts[2].file, build.artifacts[2].sha256, build.artifacts[2].url, build.artifacts[2].version) (modules: betterbird)mesh/repo-check: FAIL — THE CHANGE ALTERS ITS OWN CHECK (merge-check.sh, merge-check-typescript.sh): main's version judged it; the change's judges the pull requests after it merges; its merge-check.sh failed: files asking for a setting without saying whether it is trusted: 24Delivery plan — builds betterbird → shanks; no bus step
Run by the build seat on novox as
build-1791802663242631396(builds --log build-1791802663242631396).67ee65b2bbto96e1792881Merge check at
96e17928mesh/merge-gate: FAIL — a manifest the change touches fails the module check: modules/betterbird/module.json: this is not a module manifest: json: unknown field "url" (read without build.artifacts[1].sha256, build.artifacts[1].url, build.artifacts[1].version, build.artifacts[1].within, build.artifacts[2].file, build.artifacts[2].sha256, build.artifacts[2].url, build.artifacts[2].version) (modules: betterbird)mesh/repo-check: FAIL — its merge-check.sh failed: files asking for a setting without saying whether it is trusted: 24Delivery plan — builds betterbird → shanks; no bus step
Run by the build seat on ace as
build-1791802792592132651(builds --log build-1791802792592132651).Verdict: request changes at
96e1792Independent review against ADR 0316 (v12), ADR 0317 (v8) and to-be 56. Nothing was called on any machine.
What I ran
go vet ./...andgo test -race -count=1 ./...inmodules/betterbird: pass.MESH_GATE=<mesh-controller built from #251 at 9d108fe> MESH_CHECK_MODULES=betterbird sh merge-check.sh: passes (words, agent-home, paths, every manifest throughmodule check, 69 long-running resources without health as kept, the module's tests).Must change
betterbird_user_jsanswers every declared address, host, user name and from-name.userJSsetsa.Content = composeUserJS(declaredText, accounts, a.Each)(betterbird.go ~505), and the tool returns that struct whole (main.go,machine.userJS(apply)). Since this PR, that content holdsmail.identity.<k>.useremail,mail.server.<k>.hostname,userName,fullName,mail.smtpserver.<k>.hostnamefor every adopted or created account. OnlyStatusclearsContent. That breaks ADR 0316 §16 and ADR 0317 §9 ("no address or host passes through the session that called it"). Fix: answer the account part masked or not at all (for example the declaredprefstext plus// declared account N: adopted under account3, 14 preferences), and add a test that the tool's answer holds no address or host. Do the same for thewant-based diff or anything else that echoes it.An adopted account's outgoing server can be another account's.
adopttakessmtpKeyfrom the default identity'ssmtpServerand writes all declaredmail.smtpserver.<smtpKey>.*values into user.js. Betterbird lets several identities share one outgoing server. When the adopted account's SMTP key is also used by an undeclared account (or by a second declared one), the module overwrites that other account's outgoing server prefs at every start.takentracks account keys only. This is the "never another account's prefs" rule in the checklist. Fix: refuse (with the remedy "give this account its own outgoing server in Betterbird") when any other account's identity names the same SMTP key, or adopt it without writing the outgoing fields. Add a fixture with two accounts sharingsmtp1.Related: step 1 (recorded keys) does not check again that the recorded identity still names the recorded SMTP key. If the person picks another outgoing server in Betterbird, the module keeps writing into the old one, which may now be someone else's, and the declared outgoing never reaches the new one. Check the recorded identity and SMTP still belong to the recorded account before you keep them, and otherwise resolve again.
The
betterbird_user_jsdescription is wrong now. It says "A declared account whose address the profile already holds under another key refuses the apply, before anything is written". With ADR 0317 that account is adopted, and only duplicates are refused, for that account alone. A caller reads this description to decide whether to call the tool. Fix the wording.The check gives Owl a remedy that cannot be done. In
Check, the!in.Owl.AtThePinremedy is "a person decides whether to remove the other one in Betterbird's add-ons". With the policy in place,force_installedcallsmanager.disallowFeature("uninstall-extension:owl@beonex.com")(anddisable-extension) for that ID whatever version is installed (comm-centralmail/components/enterprisepolicies/Policies.sys.mjs, ExtensionSettings). So the person cannot remove 1.5.7 in the add-ons manager. See the Owl answer below for what to say instead.Owl 1.5.7 on g14 against the 1.5.6.1 pin: not blocking
I read
installAddonFromURLin toolkit'sPoliciesHelpers.sys.mjs(current mozilla-central). Thunderbird's Policies.sys.mjs calls it forforce_installedwith the existing add-on. With afile://URL it fetches the xpi at every start. It then cancels the install when the versions are equal. When the installed version is greater, it logs "Installation cancelled because installed version … is greater than … downloaded from …" and cancels. So the policy never downgrades and never creates a duplicate, because the add-on ID is the same. 1.5.7 stays, andupdates_disabledfreezes it at 1.5.7. The profile, the Owl account and its licence are not touched.I read current tip, not Betterbird 153's own tree. This downgrade guard is long-standing in the shared toolkit helper.
The effect is a permanent check finding on g14. Say it as a fact rather than a fault: "Owl 1.5.7 in the profile is newer than the pin 1.5.6.1; the policy keeps it (it never downgrades) and holds it there; move the pin in a reviewed change when the vendor serves it". The §8 range check covers only the pinned xpi, not a newer Owl kept in a profile. A line in the README would do.
Checked and fine
mesh_<name>in the list, then the node'skey, then the default identity's address. Refusals cover two or more matches (keys listed, the other accounts go ahead), Owl's account, akeynot in the list, Owl's or another address'skey, akeyalready taken, a kind mismatch (never converted) and an identity without an outgoing server. Owl is recognised by a server type startingowl. I did not verify Owl's exact type strings, but a kind mismatch refuses an Owl account anyway, so it is covered twice.mail.accountmanager.accountsandmail.smtpserversare rewritten, only*_mesh_*keys are added or removed, and every other line and key order is kept (withListed/listedWith). The write is refused while abetterbird-binprocess of the account runs, goes to a temp file plus rename, and keeps the file mode. A refused or unparseableaccountsrefuses the whole apply before anything is written. Nothing writeslogins.json,key4.db, the mail store, the directory, folder or filter prefs. Oflogins.jsononly the clear-texthostnameis read.accountsrefuses credential-shaped keys at any depth without echoing a value.prefsrefuses the account prefixes and lists.afterWhatTheyRead), socommunity-package(absent) runs beforeinstallation.upgrade: recordholds every build.release_plan.gochecksrollsOutat send time, after the new manifest is registered. The PR's delivery-plan comment says "shanks: receives betterbird", but that line was computed with the registered manifest, which has noupgrade: recordyet. Belt and braces: have the operator runupgrade betterbird recordat the controller before the merge.DisableAppUpdate, Owlforce_installedfromfile:///opt/betterbird/owl/owl.xpiwithupdates_disabled, and no*entry, so other add-ons are unaffected. Both pins carry URL, version and sha256, and there is no xpi in the repository.prefsonly, never accounts.Remarks (optional)
betterbird-binrepacks the same upstream tarball, which is the digest you pin. So where the installed package is 153.4.0esr-bb10, the files are byte-identical.replaceWiththen accepts them into the package's tree, and the files end up owned by both pacman and the mesh. This is harmless to mail, but the claim is not right. Either correct the wording or make the archive wait when the package resource failed.readAccountsreturns no accounts whenaccounts.jsonis missing, and the apply then empties the record and takes every*_mesh_*key out of the lists. It recovers at the next apply, butexistsis already returned. Leave the lists and the record alone when the file is absent.secretKeyInnames the path, which includes the account's name in the setting (for exampleaccounts.gmail.incoming.password).accountProblemstakes care never to say the name. Say the place instead.maskValue'shostNamemisses two-label hosts on TLDs outside its list (for exampleproton.me,mail.ru). This only matters if the controller ever echoes a value.Review 34 addressed at
1ca26c9, each with a test that fails on96e1792:betterbird_user_jsanswers an account preference by name with"<withheld>", every other value masked asbetterbird_prefsmasks it (TestTheUserJSAnswerWithholdsTheAccountsValues).mail.smtpservers. The identity default (mail.smtp.defaultserver) counts as use. A recorded adoption re-reads the identity's current server at every apply and follows it, under the same rule (TestAnAdoptedAccountNeverWritesIntoAnOutgoingServerAnotherIdentityUses).betterbird_user_js's description says adoption (TestTheUserJSDescriptionSaysAdoption).betterbird_status(owl.note), not a check finding; older: a finding whose remedy is moving the pin.Optional: the credential refusal's path withholds the account's name (
accounts.<an account>.…). Not done: masking two-label hosts on uncommon TLDs (it would mask file names such as a.pdf; the only answer carrying account values now withholds them whole), and Owl out of the reminder-test profile (the policy is installation-wide; nothing per profile overrides force_installed).MESH_GATE=<controller from #251> MESH_CHECK_MODULES=betterbird sh merge-check.shpasses. Not merged.Merge check at
1ca26c94mesh/merge-gate: FAIL — a manifest the change touches fails the module check: modules/betterbird/module.json: this is not a module manifest: json: unknown field "url" (read without build.artifacts[1].sha256, build.artifacts[1].url, build.artifacts[1].version, build.artifacts[1].within, build.artifacts[2].file, build.artifacts[2].sha256, build.artifacts[2].url, build.artifacts[2].version) (modules: betterbird)mesh/repo-check: FAIL — its merge-check.sh failed: files asking for a setting without saying whether it is trusted: 24Delivery plan — builds betterbird → shanks; no bus step
Run by the build seat on ace as
build-1791804003175366507(builds --log build-1791804003175366507).Verdict: request changes at
1ca26c9Re-review against review 34. Nothing was called on any machine.
What I ran
go vetandgo test -race -count=1 ./...inmodules/betterbird: pass.MESH_GATE=<controller built from mesh-controller #251 at 9d108fe, still its head> MESH_CHECK_MODULES=betterbird sh merge-check.sh: exit 0.96e1792. I ran this head'saccounts_test.goandinstall_test.goon 96e1792's code, with only a stubNotefield added so it compiles. These five fail there and pass here:TestAnAdoptedAccountNeverWritesIntoAnOutgoingServerAnotherIdentityUses(accounts_test.go:408)TestTheUserJSAnswerWithholdsTheAccountsValues(:455)TestACredentialRefusalNamesNoAccount(:480)TestTheCommunityPackageAPolicyThatIsNotTheModulesAndAnOwlOffItsPinAreSaid(Owl note, install_test.go:91)TestTheUserJSDescriptionSaysAdoption(install_test.go:167)Review 34, point by point
answeredUserJS(betterbird.go:579). Every account preference reads"<withheld>"throughwithheld(), and other values are masked. OnlyStatusand this tool carriedContent.refuseSharedOutgoing(adoption.go:150) refuses an adopted account whose SMTP key another identity uses. An identity with no server counts as usingmail.smtp.defaultserver(:167). A recorded adoption follows the identity's current server, and refuses when there is none (:211-218).owl.note) and not a check finding. An older Owl is a finding whose remedy is the pin (betterbird.go:884).newerVersion(install.go:82) compares 1.5.7 against 1.5.6.1 correctly.Must change: two false refusals in
refuseSharedOutgoingBoth fail safe, since nothing is written. But I expect them to refuse real accounts on g14 and shanks, with a remedy that is wrong. I checked both with a throwaway test on this head's fixture. It is not committed.
oursholds only the default identity (adoption.go:154), while :174 walks every identity of every account. With account1's identitiesid1,id1bboth onsmtp1(an alias), the adoption is refused: "smtp1 of the profile's account account1 is also used by identity id1b … give the account an outgoing server of its own". The server already is the account's own. Fix: add every identity of an adopted (or created) account toours.smtpServercounts as using the default server. Owl (and Local Folders, feeds) do not send through SMTP. So an emptysmtpServeron their identity does not mean the default server sends their mail. Take the fixture and addmail.smtp.defaultserver = smtp1: the adoption of account1 is refused because ofid3, Owl's identity. On a profile with an Owl account, the default server is normally one of the IMAP accounts' servers. That account would then always be refused. Fix: apply the default-server rule only to identities of IMAP and POP3 accounts, or skip Owl's andnone/rssaccounts' identities. Add both cases to the test.With those two fixed, and tests for them, I expect to approve.
Merge check at
46c46c95mesh/merge-gate: FAIL — a manifest the change touches fails the module check: modules/betterbird/module.json: this is not a module manifest: json: unknown field "url" (read without build.artifacts[1].names-on-purpose, build.artifacts[1].sha256, build.artifacts[1].url, build.artifacts[1].version, build.artifacts[1].within, build.artifacts[2].file, build.artifacts[2].names-on-purpose, build.artifacts[2].sha256, build.artifacts[2].url, build.artifacts[2].version) (modules: betterbird)mesh/repo-check: FAIL — its merge-check.sh failed: files asking for a setting without saying whether it is trusted: 24Delivery plan — builds betterbird → shanks; no bus step
Run by the build seat on ace as
build-1791804383877895483(builds --log build-1791804383877895483).Verdict: approve at
46c46c9Re-review against review 36. Nothing was called on any machine.
What I ran
go vetandgo test -race -count=1 ./...inmodules/betterbird: pass.MESH_GATE=<controller built from mesh-controller #251 at 3647928> MESH_CHECK_MODULES=betterbird sh merge-check.sh: exit 0.module checkaccepts the pins with theirnames-on-purpose.TestAnAccountsOwnAliasesAndNonMailIdentitiesDoNotShareItsOutgoingServer(accounts_test.go:487), run on 1ca26c9's code, fails there with "also used by identity id1b, id2, id3". It passes here.Review 36, point by point
accountOf/ours), so the aliasid1bonsmtp1no longer refuses account1.imapandpop3accounts (kindOf). Owl's identity and the Local Folders identity, both without an outgoing server, are no longer counted as users of the default server. The second half of the test checks that a real share is still refused: another POP3 account's identity with no server uses the defaultsmtp1, and that refuses with "also used by identity id6".TestAnAdoptedAccountNeverWritesIntoAnOutgoingServerAnotherIdentityUsesstill covers the explicit share.names-on-purposenameswww.betterbird.euandwww.beonex.com, each with its reason, as #251 at 3647928 requires.Everything from reviews 34 and 36 is now resolved. Before the merge, as said in review 34: merge mesh-controller #251 first. Have the operator run
upgrade betterbird recordat the controller as a belt-and-braces step, because the delivery plan's "shanks: receives betterbird" line was computed before the controller knew the new policy.Moved to #240 (branch fix/345-betterbird-module, the same commit
46c46c9approved here in review 38), so it is not grouped with mesh-controller #251, which must run first. Closing this one.Pull request closed