Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 12 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,10 @@ jobs:
- name: Catch2 failure report (runtime logs filtered out)
if: failure()
run: |
# The unit test binary emits thousands of structured runtime log
# lines (timestamp + <LEVEL> + module:) that bury Catch2's own
# failure report. Drop those so what remains is Catch2 section
# headers, FAILED assertions, and the test-case summary — i.e. the
# failing test name + file:line. Mirrors the NetBSD job's inline
# equivalent below.
if [ -f build/meson-logs/testlog.txt ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build/meson-logs/testlog.txt \
| tail -n 300
fi
# Prints each failed test's Catch2 output (scenario, file:line,
# FAILED:, expansion) with the runtime log lines that bury it
# removed. Every job's report runs the same script (ADR-0877).
sh scripts/catch2-failure-report.sh build/meson-logs/testlog.txt

- name: Conformance gate
run: sh scripts/check-conformance-gate.sh build
Expand Down Expand Up @@ -213,10 +207,7 @@ jobs:
- name: Catch2 failure report (runtime logs filtered out)
if: failure()
run: |
if [ -f build-ubuntu-interim/meson-logs/testlog.txt ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build-ubuntu-interim/meson-logs/testlog.txt \
| tail -n 300
fi
sh scripts/catch2-failure-report.sh build-ubuntu-interim/meson-logs/testlog.txt

- name: Conformance gate
run: sh scripts/check-conformance-gate.sh build-ubuntu-interim
Expand Down Expand Up @@ -325,14 +316,6 @@ jobs:
./build-hardened/tests/merovingian-integration-tests \
"[startup][binary]" --success

- name: Catch2 failure report (runtime logs filtered out)
if: failure()
run: |
if [ -f build-hardened/meson-logs/testlog.txt ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build-hardened/meson-logs/testlog.txt \
| tail -n 300
fi

# -- Fedora / Red Hat family -----------------------------------------------
fedora-suite:
needs: queue-after-analyses
Expand Down Expand Up @@ -397,10 +380,7 @@ jobs:
- name: Catch2 failure report (runtime logs filtered out)
if: failure()
run: |
if [ -f build-fedora/meson-logs/testlog.txt ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build-fedora/meson-logs/testlog.txt \
| tail -n 300
fi
sh scripts/catch2-failure-report.sh build-fedora/meson-logs/testlog.txt

- name: Conformance gate
run: sh scripts/check-conformance-gate.sh build-fedora
Expand Down Expand Up @@ -485,10 +465,7 @@ jobs:
- name: Catch2 failure report (runtime logs filtered out)
if: failure()
run: |
if [ -f build-debian/meson-logs/testlog.txt ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build-debian/meson-logs/testlog.txt \
| tail -n 300
fi
sh scripts/catch2-failure-report.sh build-debian/meson-logs/testlog.txt

- name: Conformance gate
run: sh scripts/check-conformance-gate.sh build-debian
Expand Down Expand Up @@ -576,10 +553,7 @@ jobs:
- name: Catch2 failure report (runtime logs filtered out)
if: failure()
run: |
if [ -f build-rhel/meson-logs/testlog.txt ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build-rhel/meson-logs/testlog.txt \
| tail -n 300
fi
sh scripts/catch2-failure-report.sh build-rhel/meson-logs/testlog.txt

- name: Conformance gate
run: sh scripts/check-conformance-gate.sh build-rhel
Expand Down Expand Up @@ -697,10 +671,7 @@ jobs:
- name: Catch2 failure report (runtime logs filtered out)
if: failure()
run: |
if [ -f "${BUILDDIR}/meson-logs/testlog.txt" ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' "${BUILDDIR}/meson-logs/testlog.txt" \
| tail -n 300
fi
sh scripts/catch2-failure-report.sh "${BUILDDIR}/meson-logs/testlog.txt"

- name: Conformance gate
run: sh scripts/check-conformance-gate.sh "${BUILDDIR}"
Expand Down Expand Up @@ -750,10 +721,7 @@ jobs:
pkg install -y meson ninja llvm catch2 pkgconf git perl5 bison flex gmake openssl libsodium postgresql17-client curl png libjpeg-turbo
if ! sh scripts/build-bsd.sh --builddir build --skip-job freebsd; then
echo "::group::FreeBSD Catch2 failure report (runtime logs filtered out)"
if [ -f build/meson-logs/testlog.txt ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build/meson-logs/testlog.txt \
| tail -n 300
fi
sh scripts/catch2-failure-report.sh build/meson-logs/testlog.txt
echo "::endgroup::"
# The report above drops runtime log lines to keep Catch2's output
# readable, which also hides why a runtime refused to start. List
Expand Down Expand Up @@ -812,10 +780,7 @@ jobs:
run: |
if ! sh scripts/build-bsd.sh --builddir build --skip-job openbsd; then
echo "::group::OpenBSD Catch2 failure report (runtime logs filtered out)"
if [ -f build/meson-logs/testlog.txt ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build/meson-logs/testlog.txt \
| tail -n 300
fi
sh scripts/catch2-failure-report.sh build/meson-logs/testlog.txt
echo "::endgroup::"
# The report above drops runtime log lines to keep Catch2's output
# readable, which also hides why a runtime refused to start. List
Expand Down Expand Up @@ -983,16 +948,7 @@ jobs:
rm -rf netbsd-packages
if ! sh scripts/build-bsd.sh --builddir build --skip-job netbsd; then
echo "::group::NetBSD Catch2 failure report (runtime logs filtered out)"
if [ -f build/meson-logs/testlog.txt ]; then
# The unit test binary emits thousands of structured runtime
# log lines (timestamp + <LEVEL> + module:) that bury Catch2's
# own failure report. Drop those and the [netbsd-diag] markers
# so what remains is Catch2 section headers, FAILED assertions,
# and the test-case summary — i.e. the failing test name + file:line.
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build/meson-logs/testlog.txt \
| grep -vE '^\[netbsd-diag\]' \
| tail -n 150
fi
sh scripts/catch2-failure-report.sh --exclude '^\[netbsd-diag\]' build/meson-logs/testlog.txt
echo "::endgroup::"
echo "::group::NetBSD core backtraces"
for core in $(find build -name '*.core' 2>/dev/null); do
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,7 @@ jobs:
- name: Catch2 failure report (runtime logs filtered out)
if: failure()
run: |
if [ -f build-coverage/meson-logs/testlog.txt ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build-coverage/meson-logs/testlog.txt \
| tail -n 300
fi
sh scripts/catch2-failure-report.sh build-coverage/meson-logs/testlog.txt

- name: Generate coverage reports
id: reports
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ jobs:
- name: Catch2 failure report (runtime logs filtered out)
if: failure()
run: |
if [ -f build/meson-logs/testlog.txt ]; then
grep -vE '^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]+ \+[0-9]{4} <(INFO|WARNING|ERROR|DEBUG|CRITICAL)>' build/meson-logs/testlog.txt \
| tail -n 300
fi
sh scripts/catch2-failure-report.sh build/meson-logs/testlog.txt

tsan:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -134,6 +131,11 @@ jobs:
shell: bash
run: sh scripts/build-linux.sh --builddir build-tsan --buildtype debug --sanitize thread --skip-job tsan 2>&1 | tee tsan-ci-log.txt

- name: Catch2 failure report (runtime logs filtered out)
if: failure()
run: |
sh scripts/catch2-failure-report.sh build-tsan/meson-logs/testlog.txt

- name: Upload TSan logs
if: always()
uses: actions/upload-artifact@v7
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Changes before 1.0.0 are in [CHANGELOG-pre-release.md](CHANGELOG-pre-release.md)
unavailable (error) and no TURN configured (debug), with the user ID and never a credential (ADR-0871).
* Tests set a log module's level through one shared helper, `tests/support/ModuleLogLevel.hpp`, instead of a copy per
file; the security coding rules state the TURN logging rule and why the username is withheld.
* The documentation site uses OMG Software's outlined-toggle brand: switch orange and charcoal, the G knob,
Comment thread
James-Chapman marked this conversation as resolved.
Resolved
and Merovingian's project icon, copied from the brand package with only line endings changed (ADR-0878).
Comment thread
James-Chapman marked this conversation as resolved.
Resolved

## Security Fixes

Expand Down Expand Up @@ -197,6 +199,8 @@ Changes before 1.0.0 are in [CHANGELOG-pre-release.md](CHANGELOG-pre-release.md)
gone), and a tooling test fails when that list and the modules the sources name differ (ADR-0872).
* The TURN log calls mark GCC's cleanup of their braced field lists excluded from coverage, a compiler path no test
can reach; the testing standards say when such a marker is allowed (ADR-0874).
* A CI failure report shows each failed test's Catch2 output, however early it ran, within a 4000-line cap that it
reports; a tail of the log lost it behind later tests. The `tsan` job gets a report too (ADR-0877).

## Release notes

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The documentation site wears the OMG Software theme, dark first, with system fonts

* Status: accepted
* Status: accepted; colours and marks superseded by [ADR-0878](0878-the-documentation-takes-the-outlined-toggle-brand-colours-and-marks.md) (2026-11-24)
* Date: 2026-10-25

Technical Story: match the published documentation site to the OMG Software organisation site (0.12.46).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# CI failure reports print each failed test's section of the Meson log, not a tail of the whole log

* Status: accepted
* Date: 2026-11-24

Technical Story: an `asan-ubsan` run on the presence-flood pull request (run 44948590233, job 136981278297) said
"1 failed" and showed no failed assertion anywhere.

## Context and Problem Statement

When `meson test` fails, each CI job's "Catch2 failure report" step printed `testlog.txt` without the homeserver's
runtime log lines, then the last 300 lines of that (150 on NetBSD). Meson writes tests in the order they finish, so an
early failure, such as `integration-tests-shard-1-of-4`, is followed by every smoke test that finished after it, and
those pushed its Catch2 output out of the window. `--print-errorlogs` shows only the last 100 lines of a failed test,
which were runtime logging. How should a failure report find the failed assertion?

## Decision Drivers

* Where a failed Catch2 case (scenario, file and line, `FAILED:`, expansion, exception message) appears in the report
must not depend on how early its test ran or how much passed after it.
* It must run unchanged on the Ubuntu, Debian, Fedora and AlmaLinux jobs and inside the FreeBSD, OpenBSD and NetBSD
VMs, none of which is sure to have a `python3` on `PATH`.
* A broken run must not print an unbounded log.

## Considered Options

1. `scripts/catch2-failure-report.sh`: one POSIX `awk` pass over `testlog.txt` that keeps the section of each test
whose `result:` is neither `exit status 0` nor `exit status 77` (Meson's skip), drops runtime log lines, and caps
each test (first 400 and last 100 lines) and the whole report (4000 lines, summary included: a test that does
not fit is cut further, or counted as not shown).
2. Raise the tail (say to 3000 lines).
3. Read `testlog.json` in Python, whose records carry a `result` of `FAIL`, `TIMEOUT` and so on.
4. Fix the order instead (run the integration shards last), or rely on `--print-errorlogs`.

## Decision Outcome

Chosen option: 1, run by every report step: `ci.yml`'s Linux and BSD jobs, `coverage.yml`, and both jobs of
`sanitizers.yml` (`tsan` had no report step). NetBSD passes `--exclude '^\[netbsd-diag\]'`. A job that never runs
`meson test` writes no `testlog.txt` and has no report step: `ubuntu-hardened-listener-coverage` builds with
`--no-tests` and runs its Catch2 binary in its own step, whose log shows any failure.

* A tail of any length can lose a failure: the number of lines after it depends on what finished later, which changes
with the platform, the sanitizer and the scheduling.
* `testlog.json` would be read more simply in Python, but the BSD VMs install only a versioned Python as Meson's
dependency (see `check_expected_skips.py` in `scripts/AGENTS.md`), and a second implementation for them would drift.
The text log's format is stable: each test opens with a `==== N/M ====` banner and closes with a 78-character rule,
and `result:` holds Meson's `returncode_to_status` text.
* The order of tests is not the report's to fix, and `--print-errorlogs` cannot be told to skip runtime log lines.
* The script uses no `awk` interval expressions (`{4}`), which older releases of `mawk` and the BSDs' `awk` did not
accept, and reads its patterns from the environment, since `awk -v` would process their backslashes.

### Negative Consequences

* The caps can leave out failure output, assertions included: a failed test with more than 500 lines of its own
output shows its first 400 and last 100, and once the report nears 4000 lines a test is cut further or not shown.
The report counts every gap and every test left out, and names `testlog.txt`, which holds the whole output: the
`tsan` job uploads it, and elsewhere the failed test is run again locally.
* A change to Meson's text log format would make the report find no failed test. It then says so, rather than
printing nothing, and `tests/tooling/test_catch2_failure_report.py` pins the format it reads.

## Links

* Covered by `tests/tooling/test_catch2_failure_report.py`, which also checks that every workflow's report runs the
script and tails nothing.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# The documentation takes the outlined-toggle brand's colours and marks

* Status: accepted
* Date: 2026-11-24

Technical Story: OMG Software's outlined-toggle brand package and its project icons replace the angular four-square
mark and the `#ff8954` orange the documentation site took from the organisation site in ADR-0223.

## Context and Problem Statement

The brand package sets two colours, switch orange `#FF761F` and charcoal `#151515`, a full toggle mark, a standalone G
knob for small sizes, and a project icon for each repository: Merovingian's is the toggle with a server stack cut out of
its knob. Its guide keeps about one border-width of clear space round the toggle and uses the knob below about 120 px
wide; the project icons use their compact knob at 32 px and below. How should the documentation site take them on?

## Decision Drivers

* The marks are the package's own: a reader should see the same shapes and colours as everywhere else OMG Software
shows them.
* ADR-0223 still holds: dark first, system fonts, nothing fetched from another origin, and text and links that meet
WCAG AA in both schemes.

## Considered Options

1. Copy the package's SVG files unchanged into `docs/assets/`, choose each by its size as the guide says, and set the
theme's orange and charcoal to the palette's.
2. Show the full OMG toggle as the header logo.
3. Load the marks from the organisation's site.
4. Use `#FF761F` for links in the light scheme too.

## Decision Outcome

Chosen option: 1.

* The header logo, about 24 px high, is the standalone G knob (`omg-g-knob-orange.svg`): the full toggle there would be
about 50 px wide, well under the guide's 120 px. The favicon is Merovingian's compact knob
(`merovingian-compact.svg`), the project icon's design for 32 px and below. The home page shows Merovingian's full
toggle (`merovingian-toggle-mark.svg`), cropped to keep about one border-width of clear space.
* The README shows no mark. It is shipped on its own, in the CI artifacts, the RPM, BSD and static packages, where an
image path into `docs/assets/` would show as a broken image, and staging the SVG beside every copy is packaging
churn for a decoration. Its opening lines link to the site.
* The files are byte-for-byte the package's, except that the package's CRLF line endings are LF here, as
`.gitattributes` requires; a new version of the package replaces them, and none is edited by hand.
`tests/tooling/test_docs_site.py` checks their outlines and colours and that none can run or fetch anything.
* `--omg-orange` is `#ff761f` and `--omg-ink` `#151515`; the dark scheme's page, header, footer, links and accent use
them. The greys between them are neutral (`#1f1f1f` panels, `#333333` rules), as charcoal is, where the earlier
theme's were tinted.
* The light scheme keeps its darker oranges for links (`#a8461c`) and their hover (`#8f3a15`): `#FF761F` on its
`#f4f3ee` page is about 2.4:1, under AA's 4.5:1. The brand orange stays for buttons, the eyebrow and focus rings.
* Loading the marks from another origin would report each reader's visit to it, which ADR-0223 rules out.

This supersedes ADR-0223's colours and marks; the rest of ADR-0223 stands.

### Negative Consequences

* The dark scheme's orange is a little deeper than before; its links measure about 6.8:1 on the page and 6.2:1 on
cards, still above AA.
2 changes: 2 additions & 0 deletions docs/adr/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -750,3 +750,5 @@
* [0874 - A braced log-field list may mark GCC's cleanup branches excluded from coverage](0874-a-braced-log-field-list-may-mark-gcc-s-cleanup-branches-excluded-from-coverage.md)
* [0875 - A device syncing online holds its account online against another device syncing unavailable](0875-a-device-syncing-online-holds-its-account-online.md)
* [0876 - The first presence change in a five-second window is kept, and every other one in it is dropped](0876-the-first-presence-change-in-a-five-second-window-is-kept.md)
* [0877 - CI failure reports print each failed test's section of the Meson log, not a tail of the whole log](0877-ci-failure-reports-print-each-failed-test-not-a-tail-of-the-log.md)
* [0878 - The documentation takes the outlined-toggle brand's colours and marks](0878-the-documentation-takes-the-outlined-toggle-brand-colours-and-marks.md)
5 changes: 5 additions & 0 deletions docs/assets/merovingian-compact.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading