| status: done |
| validated: ci |
| created: 2026-05-18 |
| updated: 2026-05-26 |
| shipped_as: mari#152 |
| shipped_at: 2026-05-18 |
| tags: [consolidation, mari, marilib, repo-merge] |
| related: [dotbot-consolidation-roadmap] |
Outcome (2026-05-18): shipped as mari#152, merged into
develop.marilibno longer exists as a standalone repo — its Python source lives atrepos/mari/marilib/and ships from mari as themarilib-pkgPyPI package. Workspace repo count went 11 → 10.
First concrete step of the 11→4 consolidation roadmap in
dotbot-testbed/AGENTS.md: fold marilib into
mari so the protocol firmware and its Python binding/agents
ship from one repo. Convention follows swarmit (device/ +
swarmit/): firmware-side moves under
firmware/, the Python package source lives at
marilib/, and pyproject.toml sits at the repo
root. The Python package name stays marilib —
downstream consumers (PyDotBot, swarmit) keep working unchanged; only
the repo layout changes.
Branch: fold-marilib off origin/develop
(mari uses gitflow — main is releases, develop
is integration).
Downstream impact: any repo that has mari as a git
submodule needs both a pointer bump to the post-restructure commit
and a path rewrite for anything that traverses mari’s tree (now
nested one level deeper under firmware/). Grep across the
org confirmed the only consumer is swarmit
(.gitmodules entry at
repos/swarmit/.gitmodules); both pre-existing swarmit
worktrees (wt-swarmit-cli-serve,
wt-swarmit-ota-batched-nack) pin earlier mari commits and
stay frozen until their owners explicitly bump. Non-submodule consumers
— dotbot-provision (pulls mari binaries from GitHub Releases), PyDotBot
(consumes marilib via PyPI) — are unaffected by tree layout.
mari/
├── AGENTS.md ← unified, with pointers into the two halves
├── README.md ← describes both firmware and marilib
├── pyproject.toml ← marilib's package metadata, at root
├── tox.ini / hatch... ← whatever marilib currently uses
├── .github/workflows/
│ ├── build.yml ← path-filtered: firmware/**
│ ├── clang-format.yml ← path-filtered: firmware/**
│ └── continuous-integration.yml ← path-filtered: marilib/**, tests/**, pyproject.toml
├── firmware/
│ ├── AGENTS.md ← firmware-specific guidance
│ ├── app/
│ ├── bsp/
│ ├── drv/
│ └── … ← everything currently at repos/mari/ root
├── marilib/
│ ├── AGENTS.md ← Python/host-side guidance
│ ├── __init__.py
│ └── … ← package source
├── tests/ ← from marilib
└── examples/ ← from marilib
Mari has no submodules (DotBot-libs is not
a submodule of mari, despite the surrounding repos — verified
.gitmodules absent), so the firmware move is a straight
git mv.
Use git filter-repo --to-subdirectory-filter marilib on
a marilib clone, then git merge --allow-unrelated-histories
into the mari branch. After unification,
git log -- marilib/ walks marilib’s full pre-merge history,
git log -- firmware/ walks mari’s. Worth the extra hour for
the months-after blame story.
Fallback if filter-repo fights us: single “import marilib at
<sha>” commit referencing marilib’s HEAD SHA. Lose
individual history but keep moving.
Root AGENTS.md covers the cross-cutting things (build for both
halves, where the package publishes from, how the two interact at the
protocol level). firmware/AGENTS.md keeps the current
mari-specific firmware notes (clang-format, target list, hot spots).
marilib/AGENTS.md keeps the marilib-specific Python notes
(agents, mqtt, edge/cloud). Matches swarmit’s split-by-area model.
wt-mari-fold-marilibgit mv all current mari root contents (everything
except .git, .github, AGENTS.md,
README.md, LICENSE, CHANGELOG.md
if present) into firmware/. Commit:
repo: relocate firmware sources under firmware/.make -C firmware <one target> (or whatever the
in-tree Makefile expects post-move; if it has
$(CURDIR)-relative paths they may need a one-line fix).
Commit any path fixes separately.git filter-repo --to-subdirectory-filter marilib on the
scratch clone.git remote add marilib-import <scratch-path>,
git fetch marilib-import,
git merge --allow-unrelated-histories marilib-import/main.git log -- marilib/ shows marilib’s
history.git mv marilib/pyproject.toml ./, same for
tests/, examples/, tox.ini,
.ruff.toml, etc. Anything that’s logically project-wide (CI
config, tooling config) moves to root; anything that’s package-internal
(marilib/py.typed, __init__.py, source
modules) stays under marilib/. Commit:
repo: hoist marilib project metadata to repo root.AGENTS.md. Move firmware-specific
bits to firmware/AGENTS.md. Keep
marilib/AGENTS.md mostly as-is.paths: filters to all three workflows so
a Python-only PR doesn’t trigger the firmware build and vice versa.
Commit:
ci: merge mari + marilib pipelines with path filters.README.md to describe both halves with
install / build / quickstart pointers into each subtree.make -C firmware for at least one mari target.pip install -e . from repo root →
import marilib works.tox (or equivalent) runs marilib’s existing test
suite.mari-edge --help, mari-cloud --help
resolve.dotbot-testbed: edit
AGENTS.md (11 → 10 repos: drop the marilib row, update the
dep map’s marilib → PyPI → ... to note it’s now published
from mari, leave the 11→4 consolidation roadmap updated). Edit
scripts/setup-venv.sh to drop the
repos/marilib editable install — marilib gets installed
from repos/mari instead. One workspace PR.swarmit: bump the mari
submodule pointer to the unification commit. Then grep swarmit for any
hard-coded mari/<path> references in source/build/CI
— anything that used to point at mari/<sub> needs to
be mari/firmware/<sub> after the move. Likely none,
but worth grepping.PyDotBot: no source change. Marilib’s
PyPI release moves to mari’s CI; PyDotBot just bumps its
marilib== pin in its next normal version cycle.DotBots/mari.repos/marilib/pyproject.toml — capture exact project
name, entry points, dependencies; these need to land verbatim at the
unified root pyproject.mari/<anything> literal path references in:
swarmit (Makefiles, build scripts), dotbot-provision (any pinned URLs to
mari release artifacts — those go through GitHub Releases, unaffected by
tree layout).repos/dotbot-testbed/scripts/setup-venv.sh — install
order list includes marilib explicitly; needs an entry change.repos/wt-mari-fold-marilib/.github/workflows/*.yml —
pipeline mergerepos/wt-mari-fold-marilib/AGENTS.md — unified
rootrepos/wt-mari-fold-marilib/firmware/AGENTS.md —
relocated firmware notesrepos/wt-mari-fold-marilib/marilib/AGENTS.md — Python
notes (mostly as-is)repos/wt-mari-fold-marilib/README.md —
dual-purposerepos/wt-mari-fold-marilib/pyproject.toml (post-hoist)
— at rootdotbot-testbed/AGENTS.md — 10-repo table, dep mapdotbot-testbed/scripts/setup-venv.sh — install
orderbuild.yml green on the merge commit.pip install -e . from
repos/wt-mari-fold-marilib yields a working
marilib import and
mari-edge/mari-cloud entry points.tox (or pytest) runs marilib’s test suite
from the new layout without path-related failures.scripts/setup-venv.sh works end-to-end
(drops the old marilib step, installs marilib via mari path); PyDotBot’s
next version pin still resolves marilib from PyPI.firmware/drv/mr_rng/mr_rng_nrf5340_app.c and
firmware/drv/mr_timer_hf/mr_timer_hf.c; the
marilib_timestamp field shared between
firmware/app/03app_node/main.c and marilib/
(the latter is on the followups list of
plans/marilib-metrics-overhaul.md item 6 already).Public copy of an early DotBots plan (18 May 2026), published for the SED seminar talk. In May, plans were markdown checklists; from July they are HTML pages with a live state and a log.