openvibers/openvibe.link Commits

CI: the installer test that every option installs the plugin it turns on (#167)

OP OpenVibers committed 22 h ago · 0739714784 · 2 files, +6 −2

* CI: the installer test that every option installs the plugin it turns on

scripts/test-install-plugins-installed.sh (from #165) now runs in the shellcheck job, so --ai never
again configures a plugin it did not install.

* Test fake: a registered agent is stored as its own copy (a data race the race detector caught)

Changes

ddiff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
iindex 29e000e..a635fcb 100644
---- a/.github/workflows/ci.yml
++++ b/.github/workflows/ci.yml
@@@ -205,13 +205,14 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
-- - run: shellcheck -s sh install/install.sh scripts/dist.sh scripts/test-install-stock-server.sh scripts/test-install-pair-args.sh scripts/test-install-worker-config.sh scripts/test-install-computer-config.sh scripts/test-install-plan-logins.sh scripts/test-install-claim.sh
++ - run: shellcheck -s sh install/install.sh scripts/dist.sh scripts/test-install-stock-server.sh scripts/test-install-pair-args.sh scripts/test-install-worker-config.sh scripts/test-install-computer-config.sh scripts/test-install-plan-logins.sh scripts/test-install-claim.sh scripts/test-install-plugins-installed.sh
- run: sh scripts/test-install-stock-server.sh
- run: sh scripts/test-install-pair-args.sh
- run: sh scripts/test-install-worker-config.sh
- run: sh scripts/test-install-computer-config.sh
- run: sh scripts/test-install-plan-logins.sh
- run: sh scripts/test-install-claim.sh
++ - run: sh scripts/test-install-plugins-installed.sh
esp32-conformance:
name: esp32 protocol conformance (desktop)
ddiff --git a/internal/fakenetwork/agents.go b/internal/fakenetwork/agents.go
iindex 5237d4f..253bc74 100644
---- a/internal/fakenetwork/agents.go
++++ b/internal/fakenetwork/agents.go
@@@ -78,7 +78,10 @@ func (s *Server) agentRegister(w http.ResponseWriter, r *http.Request) {
created := body
created.ID = "agt_" + random()[:16]
created.Owner = fakeOwner
-- s.agents[created.ID] = &created
++ // The map keeps its own copy: the answer below is encoded after the unlock, while a second registration may
++ // update the stored agent's status under the lock (a data race the race detector caught in CI, 2026-11-12).
++ stored := created
++ s.agents[created.ID] = &stored
s.mu.Unlock()
w.WriteHeader(201)
_ = json.NewEncoder(w).Encode(created)