The mando-side half of the E2E harness branch poc/e2e-tests was rebased off its stale base (bugfix/BE-3333) onto origin/develop, closing ~135 commits of drift. Branch is now 3 ahead / 0 behind develop, committed and pushed, gates green. This note records what survived the rebase, the two compile/test breakages the rebase forced, and three local-environment gotchas discovered on the way.

For Agents

Resolves the “rebase decision open” warning in mando-cli-e2e-harness-2026-08-04. The CSV insert endpoint is no longer untracked working-tree state — it is a real commit on poc/e2e-tests. Local build/test on Apple Silicon still needs .cargo/config.toml (see Apple Silicon PyO3 link failure).

What the branch carries now

Three commits, in order:

  1. Removal of an orphaned datapoint/json.rs — dead after upstream restructuring.
  2. Dev-gated CSV insert endpoint (save_data_csv_route.rs) — the POST /data/insert/csv/{*datapoint_id} route mounted only when MANDO_TEST_ENDPOINTS=true. It had lived as untracked working-tree-only code for weeks; it is now committed and pushed.
  3. E2E suite scaffolde2e/test_set_1.

Five EBS SMB commits skipped as superseded

The old branch carried five EBS SMB fix commits. All five were dropped during the rebase because develop already carries them verbatim — confirmed by diffing ebs.rs after the skip and finding it byte-identical. No cherry-picking or reconciliation was needed.

Rebase-forced fixes

MandoServiceConfig renamed upstream

crate::service::MandoServiceConfig was renamed to mando_repository::model::DataPointRepositoryConfig in the 135 commits of drift.

The default cargo test hides this class of breakage

The app module is feature-gated. A bare cargo test silently skips it, so the branch looked green while save_data_csv_route.rs did not compile. The rename was only caught with --features app.

Rule: on mando, a local gate that omits --features app / --all-features is not a gate. Compare with the CI-parity rule in mando-ci-lib-only-test-gate-2026-07-22 — same failure mode (a gate whose scope silently excludes the code you changed), different axis (feature flags rather than target kinds).

Env-var race in the CSV route tests

The new route’s tests set, read, and cleared MANDO_TEST_ENDPOINTS in-process. Under cargo’s default parallel test threads this is a real data race between tests, not a flake in the code under test.

Fix, two parts:

  • Pass the gate flag into test_router as an argument rather than reading it from the ambient environment.
  • Guard every remaining set / read / clear of the var behind a Mutex.

This is the same bug class as the upstream flake in Upstream flaky test to report.

Local dev gotchas

py_mando and py_mando_simulation fail to link on this machine with unresolved _Py_* symbols.

Cause: .cargo/config.toml is gitignored local config, so a fresh checkout has none.

Fix: copy the checked-in example.

cp .cargo/config.toml.example .cargo/config.toml

The example carries the needed rustflags for PyO3 cdylib targets:

[target.aarch64-apple-darwin]
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]

The example file also holds secrets

That is why .cargo/config.toml is never committed. Fresh checkouts must copy the example manually — there is no bootstrap step that does it for you.

build/generated/flows/*.rs re-dirty on every build

mando-bess/build/generated/flows/*.rs show up modified after every local build. They are regenerated unformatted; running rustfmt on them makes them byte-identical to HEAD.

Do not commit them

Pre-existing annoyance, not caused by this branch. Leave them dirty or rustfmt them back; never include them in a commit.

Two more upstream drifts, found only by the live run (evening)

The rebase pulled in two env-var changes that no gate catches. Both fixed in e2e/suite.yaml; branch head is now 2af0c6c9 after the attribution-free history rewrite.

VarDriftConsequence
MANDO_SETUP_ACTIVE_VERSION=V1_4now REQUIREDservice crashloops without it
MANDO_FLOW_SCHEDULER_DISABLEDrenamed to MANDO_SETUP_SCHEDULER_DISABLEDold name silently dead; the 0 5 * * * * data-update cron fires mid-suite and breaks unmatched_max: 0

Same MANDO_FLOW_*MANDO_SETUP_* prefix migration first recorded in mando-local-host-run-recipe-2026-07-23. Full live-run record: mando-cli-e2e-live-green-2026-08-05.

Upstream flaky test to report

Worth raising with the mando team — an env-var race between two tests in the same module:

Testsmando_bess::debug_error::tests::gate_enabled_when_var_is_true vs gate_defaults_off_when_var_unset
Shared stateMANDO_DEBUG_MOCK_ERROR
Symptomfails roughly 2 of 3 parallel runs
Passessingle-threaded
Why CI is greenthe pipeline runs --test-threads=1, which masks it

Same bug class as the CSV-route race fixed above; the remedy is the same (pass the gate in, or serialize the env access behind a Mutex).

Catalogued alongside the other known flakes in mando-known-flaky-tests-2026-07-15.