Commit Graph
7 Commits
Author SHA1 Message Date
Igor SirotinandClaude Fable 5 294adeee6b ci: cut CI wall clock from ~17 to ~6 min (#73)
* ci: bump logoscore-py pin to pick up Attic-cached smoke image

logoscore-py a58573e adds the Logos Attic substituters to the smoke
image's build stage (logos-co/logos-logoscore-py#12). The CLI pin moves
to 665ac28 in lockstep — logoscore-py bumped its flake pin in #10.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci: run e2e-tests in parallel with build-and-test

The job builds everything it needs itself (Attic-cached), so waiting
for both build-and-test legs — including the slower macos one — only
added ~4 min of wall clock.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci: cache smoke image layers via buildx gha backend

The logoscore-py pin makes the docker build input-identical between
runs, so with mode=max every layer — including the ~5 min inner
nix build — replays from cache until the pin is bumped. Same pattern
as logoscore-py's own CI; build_smoke_image.sh forwards the env vars.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci: expose Actions runtime env so the buildx gha cache actually works

type=gha needs ACTIONS_RUNTIME_TOKEN/ACTIONS_CACHE_URL, which GitHub
injects into actions but not run steps — buildx called from
build_smoke_image.sh silently skipped the cache. (logoscore-py's own
CI has the same latent no-op.)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 14:00:20 +01:00
Igor SirotinandClaude Fable 5 e82d24853b ci: use setup-nix-cache-action in e2e-tests instead of cachix (#71)
The e2e job added in #51 predates the Attic migration (#69) and still
pulled through cachix. Wire it to setup-nix-cache-action like
build-and-test, including the public-cache environment gate on master.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 23:44:56 +01:00
Egor RachkovskiiandEgor Rachkovskii 3f8a0ed99a test: add Python e2e suite driving delivery_module over RPC (#51)
* test: add Python e2e suite driving delivery_module over RPC

Adds tests/e2e/: a pytest suite that boots logoscore daemons in docker, loads delivery_module, and drives it over RPC — exercising the plugin-load + codegen + RPC + two-node network-delivery paths the in-process C++ tests can't. Reuses logos-integration-test-framework / logoscore, pinned to chat-module's known-good SHAs.

Single-daemon: load/createNode/start/stop lifecycle, createNode-twice rejection, and query + subscribe/unsubscribe round-trips. Two-daemon (direct staticnodes peering, relay-only single shard): sender-side messagePropagated is the hard gate; messageReceived is xfail until the receive path and event-payload shape are confirmed on a green run.

CI: new e2e-tests job (needs build-and-test, ubuntu-latest) building .#install-portable plus the logoscore smoke image and CLI, with a cachix pre-warm step added to build-and-test.

* test(e2e): add RPC-reply-wedge diagnostic probes

Opt-in (E2E_PROBES=1) probe suite that isolates which factor wedges a
delivery node's RPC reply channel after a watched send: event emission
alone, the watcher subscription alone, messagePropagated transmission, or
the loopback messageReceived (vector<uint8_t>). Each probe runs on a fresh
two-node pair so a wedge can't pollute later probes. Enabled in the e2e CI
job; set E2E_QT_DEBUG=1 to also capture Qt RemoteObjects transport logs.

* update(README): clarify module packaging and add build reproducibility note

* Revert "update(README): clarify module packaging and add build reproducibility note"

This reverts commit 5aed6447a9.

* Revert "test(e2e): add RPC-reply-wedge diagnostic probes"

This reverts commit ef1f541358.

* test(e2e): mark propagation and messageReceived tests xfail due to known issues (#59)

* ci: make e2e-tests non-gating while build bug #58 is open

The module build is reproducible per source tree but some trees produce a
plugin whose start() never returns (#58), which fails the solo lifecycle
tests at start. xfail can't cover that (it hits setup), so allow the e2e
job to fail without blocking the PR until #58 is fixed.

* test(e2e),ci: drop narrative/decorative comments per repo style

Remove explanatory comment blocks, section-banner comments, and redundant
inline rationale across the e2e suite and the CI workflow; keep only linter
directives and a single footgun one-liner. No behaviour change.

* test(e2e): refactor node interaction to use LogosDelivery API

Refactor message delivery tests and helpers for clarity using the new `LogosDelivery` class. Replaced low-level RPC calls with higher-level methods (`subscribe`, `send`, `watch`, etc.), streamlining node interaction and removing redundant logic. Updated lifecycle tests for consistency. No behavior change.

* ci(e2e): capture gdb thread backtraces when start wedges (#58)

Non-gating diagnostic in the e2e-tests job: boot a solo logoscore daemon,
call start on a background thread, and if it wedges attach gdb to every
container process for thread backtraces, /proc maps and kernel stacks.
Uploaded with the e2e-test-logs artifact.

* ci(e2e): fix #58 wedge detection so gdb actually fires

The client RPC errors (exit 4) ~20s before the daemon-side start() releases
its 30s semaphore, so a populated result no longer means success. Classify any
non-success outcome as wedged, poll to detect it early, and attach gdb to every
container process in parallel to freeze them before the semaphore releases.

* debug(#58): log start callback path and capture daemon log past 30s

Add fprintf in callApiRetVoid at callback entry, after invoke, and on the
semaphore timeout to show whether liblogosdelivery ever invokes our completion
callback (upstream) vs a userData/map miss (adapter). Keep the wedge probe
daemon alive past the 30s CALLBACK_TIMEOUT so the start outcome is captured.

* debug(#58): add pre-invoke positive control and inspect loaded plugin

Log unconditionally right before invoke() so a bad build distinguishes
'start_node did not return' from 'the loaded plugin lacks the instrumentation'.
On a wedge the probe now strings/sha256 the loaded delivery_module_plugin.so
for the instrumentation literals and ldd's the bundled libs.

* debug(#58): force stderr unbuffered so start-path logs are reliable

Prior run showed the 'about to invoke' line (which provably executed — the node
started right after) missing from the captured log, making log-line absence
useless as evidence. setvbuf(_IONBF) at module init + fflush after each
instrumented fprintf so the next bad build's log is trustworthy.

* debug(#58): probe RPC channel after a start wedge

start() returns and no thread is stuck (kernel stacks), so the wedge is a lost
RPC reply, not a hang. On a wedge, issue follow-up version/getAvailableConfigs
calls: if they also time out the whole QtRO reply channel is dead (matches the
sync-reply-wedge bug); if they succeed only start's reply was lost.

* debug(#58): revert useless stderr instrumentation

The fprintf/setvbuf tracing added to localize #58 is dead weight — logoscore's
stderr capture drops adapter log lines during the node-startup flood, so the
log-based method never worked. Revert it (src/ is now net-zero vs master) and
drop the diagnostic's now-moot instrumentation-strings check. The gdb + kernel
stacks + RPC-channel probe in wedge_gdb.py are what actually localized the bug
and stay.

* ci(e2e): bump logoscore daemon+CLI past the QtRO reply-wedge fix (#58)

Root-caused #58/#59 to the pre-fix ModuleProxy in the e2e daemon's SDK: it
emits module events directly on the caller's (module FFI) thread, racing QtRO
source serialization against an in-flight reply and permanently wedging the
sync-reply channel. Fixed upstream in logos-cpp-sdk d77c3dd (marshal events
onto the source thread) + logos-protocol #7 (defer async completion off the
QtRO read stack). Our daemon was pinned 6 commits before it.

Bump the smoke-image daemon (logoscore-py aa45db52 -> 71e00381) and the CLI
(logoscore-cli 5a1cf746 -> a9e18455) to a post-split closure carrying both
fixes. The Python client already floats logoscore@master, so no requirements
change is needed.

* test(e2e): un-xfail two-node delivery tests; drop the #58 wedge diagnostic

The daemon-pin bump (901c525) fixed the QtRO reply-wedge behind #58/#59, so the
three two-node delivery tests now pass (propagation both directions + receive).
Un-xfail them and delete the temporary gdb wedge diagnostic + its CI step; revert
the artifact upload to failure-only. Keep continue-on-error on e2e-tests for now
to gather a flake baseline on the real cross-node delivery before it gates.

* test(e2e): rename lifecycle test for clarity

---------

Co-authored-by: Egor Rachkovskii <egorrachkovskii@status.im>
2026-07-28 10:21:21 +01:00
Igor SirotinandClaude Fable 5 810dbe1759 ci: switch the Nix cache setup to setup-nix-cache-action (#69)
Adopts logos-co/setup-nix-cache-action@v1, same as logos-chat-module#57:
pull from the public+ci Attic caches on every ref, publish master builds
to public (via the public-cache environment token) and other refs to ci.
Replaces the pre-rotation attic-action config, which pointed master pushes
at a token that no longer exists repo-wide.

flake.nix: update the public cache signing key, rotated with the tokens
(the old key no longer matches the server, so local pulls silently fell
back to building from source).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-27 21:47:43 +01:00
Igor SirotinandClaude Opus 4.8 3a4234fd1d ci: switch Nix binary cache from Cachix to Attic (#61)
* ci: switch Nix binary cache from Cachix to Attic

Replace the cachix/cachix-action step with ryanccn/attic-action, pushing
to the self-hosted Logos Attic cache (cache.nix.logos.co) per infra-ci #263.
PRs are read-only (skip-push); only master/main builds populate the cache.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* ci: read ATTIC_ENDPOINT from secrets, not vars

ATTIC_ENDPOINT is configured as a repo/org secret, so vars.ATTIC_ENDPOINT
resolved empty and attic login failed with 'relative URL without a base'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 18:18:45 +01:00
Iuri Matias 76d5fe9626 add doctest (#47)
add doctest

update config

test for kadmelia; remove kadmelia option from doctests; add another hang test

test for kadmelia

remove kadmelia option from doctests; add another hang test

test lib directly

increase timeout

make start call non-blocking and generate an event instead

remove poc test

remove poc test
2026-06-17 10:09:41 -04:00
Iuri Matias 17f7935d96 fix library generation; add tests
fix library generation; add tests

add CI

update

ci fix
2026-04-15 17:12:38 -04:00