Repository navigation
Description
Measured 2026-11-25 under #15079 (record: #15079 (comment)).
cargo nextest run --all-features --lib on current main (7103c55): 6129 passed / 0 failed / 19 skipped, nextest execution 358.03s vs the #6378 target of <120s. Run: https://github.com/developing-today/fleet/actions/runs/45627992299 (4-core / 16 GB fleet runner, real web/dist assets built first).
Scope: profile the suite (nextest slow-test/timing output, per-crate and per-test breakdown), identify the dominant costs (test count has grown to 6129; likely suspects: world/sandbox suites and property tests), and cut execution to target without deleting coverage — e.g. slow-test isolation into the integration class, parallelism/profile tuning, or splitting feature sets. Any test moved between classes keeps running somewhere.
Done check: a remote run on a fleet runner shows --lib execution ≤120s with the full test count still executed across the unit+integration classes.
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-25T15:08:03Z",
"session_id": null,
"lane": null,
"host": "htch-runtime",
"worktree": "/home/hatch",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/hatch",
"repo": "developing-today/code",
"branch": "main",
"sha": "8826be7a94faf495a143e45eab53db6f11c96eab"
},
"auth_subject": "felix",
"stamped_by": "fleet 0.1.0 (native)"
}
}Acceptance criteria
- A per-test / per-crate timing profile of the pkgs/id unit suite is recorded on this issue, naming the dominant costs.
-
cargo nextest run --all-features --libexecution on a fleet runner is under the 120s target ([Performance] Reduce Test Execution Time #6378), in a run cited on this issue. - Coverage is preserved: the 6129 passing tests still run somewhere (any test moved to another class is named, with where it now runs).
- The closing note states the before/after walls (358.03s baseline) on comparable hardware.
Activity
developing-today-fleet commentedon Nov 25, 2026
Intake review
🤖 Agent note · filed
Live check: issue is OPEN on re-read this run; the body carries a same-day measured reproduction on current main (fleet Actions run linked in the body, under #15079). No merged PR in the evidence resolves it — it was filed today from that measurement, so no closing candidate exists yet.
Notes: Filed by the fleet app (app/developing-today-fleet) during the #15079 verification pass. The report is unusually complete: exact commands, run links, and a scoped fix direction are already in the body.
Risks: Fix attempts that only re-measure on different hardware, or that cut the metric by dropping coverage, would close the number without closing the problem — the acceptance criteria guard both.
Suggested approach: Profile with nextest timing output first; likely levers are slow-test isolation into the integration class, parallelism/profile tuning, or feature-set splits — without deleting coverage, per the report's scope.
developing-today-fleet commentedon Nov 25, 2026
Claimed by felix lane (Muse sandbox seat) 2026-11-25. Plan: profile the pkgs/id unit suite remotely (per-crate and per-test timings on a fleet runner), record the profile here, then land one PR cutting the dominant costs without dropping coverage.
test(id): share one Argon2 envelope across backup budget proptest cases
developing-today-fleet commentedon Nov 25, 2026
Timing profile — pkgs/id unit suite (#15142 criterion 1)
Measured 2026-11-25 on a fleet runner (4-core / 16 GB), current main
02ff71b79, real web/dist assets built first, fresh CARGO_TARGET_DIR. Run: https://github.com/developing-today/fleet/actions/runs/45648493590Command:
cargo nextest run --all-features --lib --profile ci(JUnit per-test timings).Top suites (binaries) by summed test time:
Slowest individual tests:
First cut (in flight): the 186s backup property test builds a fresh store per generated case, and each build ran an Argon2id envelope derivation — the budget property never inspects envelope bytes, so the envelope is now built once and shared across cases (same 256 cases, same assertions). Remaining big blocks for follow-up slices: the boards property family in the root crate (~217s across 10 tests), id-events sync/ingest/clear-tag (~250s), the keyset history fold (61s; its own comment already notes 64 cases ≈ a minute), id-worlds sandbox conformance/fuel tests.
developing-today-fleet commentedon Nov 25, 2026
Progress (felix lane): profile recorded above (comment 7167806712); first cut landed as PR #15163, left unmerged for Felix's review.
Before/after on comparable remote runs (
--all-features --lib, ci profile, fresh target dir): execution 484.96s → 333.23s; summed per-test time 1931.0s → 1323.9s (−31%); the target test 186.26s → 2.46s; test count unchanged at 6129 passed / 19 skipped (runs 45648493590 baseline, 45652016562 filtered, 45653964817 full).#15142 stays open: 333s is still above the 120s target. Next blocks, per the profile: boards property family (~217s), id-events sync/ingest/clear-tag (~250s), keyset history fold (61s), id-worlds sandbox conformance/fuel tests.
Merge pull request #15163 from developing-today/felix/15142-unit-test…
developing-today-fleet commentedon Nov 25, 2026
First cut merged by Felix: PR #15163 (2026-11-25). The 186s download-budget property test was rebuilding an Argon2id envelope for each of its 256 cases; the envelope is now built once per test process and shared (the budget property never inspects envelope bytes — same cases, same assertions). Full suite on the branch: 6129 passed / 0 failed, execution 484.96s → 333.23s, summed per-test time −31%. #15142 stays open: 333s is still above the 120s target; the profile on this issue names the next blocks (boards property family ~217s, id-events sync/ingest/clear-tag ~250s, keyset history fold 61s, id-worlds sandbox tests).
developing-today-fleet commentedon Nov 25, 2026
Claimed by felix lane (Muse sandbox seat) 2026-11-25 for the second cut: the id-directory keyset fold test
generated_histories_fold_to_the_model_state(61.27s in the recorded profile). Plan: find the per-case repeated cost in the test, remove the repeated work without dropping cases or assertions, verify remotely with per-test timings (fold test time + full id-directory lib suite pass count). PR left unmerged for Felix.developing-today-fleet commentedon Nov 25, 2026
Second cut landed as PR #15324 (left unmerged for Felix). Target: the keyset fold test
generated_histories_fold_to_the_model_state(61.27s in the profile).Root cause: the keyset test helpers re-derived ed25519 keys on every call —
key(seed)pays a scalar multiplication insideSigningKey::from_bytes, andpublic(seed)built a whole SigningKey to read the public half — hundreds of times per generated-history case at opt-level 0. The fix caches one derivation per seed per process in the test module; keys are byte-identical, so cases/assertions/coverage are unchanged.Remote verification (isolated single-test runs, fleet-command):
Remaining for this issue: the boards property family (~217s) and id-events sync/ingest/clear-tag (~250s) blocks from the profile.
54 remaining items
developing-today-fleet commentedon Nov 30, 2026
Claim — lane 0900-CL (xaltha, wave 0900), 2026-11-30. Taking the #15142 remainder slice (a) named in lane 0900-AH's handoff:
serve_group_warnings…at 28.7s under load. AH established its member counts (96/128) ARE the thresholds under test, so no fixture cut is legitimate — this slice is a production-side investigation of GroupLog add/evaluate for an algorithmic or allocation problem: profile first (remote single-test timing, firsthand log), fix only an evidenced root cause (no speculative optimization, no weakening thresholds), verify before/after in the same isolation shape AH used, PR + merge on my own verification. If no evidenced fix emerges within a bounded investigation, the profile evidence is recorded here instead.id-events: fold position queries use the membership layer's memoised …
TEMP bench for #15142 component profiling (not part of the fix)
Merge pull request #17551 from developing-today/xaltha/15142-group-wa…
developing-today-fleet commentedon Nov 30, 2026
Slice (a) landed — lane 0900-CL (xaltha), 2026-11-30. PR #17551 MERGED (merge commit bbca23e): the group fold's position queries now use the membership layer's memoised frontier instead of a per-call whole-index clone. Thresholds and assertions of the
serve_group_warningstests are untouched — this is the production-side fix AH's handoff called for.Profile evidence (firsthand, fleet runner). Baseline isolation on main 56da0db (run 46478887061, nextest):
fire_once_at_each_size_threshold12.393s,evaluate_custom_groups_log5.191s, the four churn tests ≤0.115s — the cost is building the 96/128-member logs, i.e.GroupLog::recordfolding the whole log per append. Component bench (temporary test, removed after measuring; runs 46490243711 main / 46490355803 fix): build a 128-member log 20,755ms → 16,751ms; one fold of the 128-event log 231ms → 187ms; one more record on the full log 470ms → 377ms — a consistent −19/−20%.Root cause. The fold judged authority through
Membership::access_at_position_shared, which clones the entireCausalIndex(all decided events + the frontier memo) per call because it borrows immutably — its doc says to prefer the mutable method on a hot path, and fold.rs admitted "This is the slow path". ≥2 calls per member event (effective_author). The fix propagates&mutthrough the judge graph so queries use memoisedaccess_at_position; borrow-only, no verdict logic moved. Correctness: full id-events + id-groups + id-core suites green on the merged head (run 46494051603: 1637 passed / 0 failed, plus the 6 warnings tests).What remains in the fold (next slice's starting point, not speculated at here). A fold of 128 events still costs ~187ms (~1.5ms/event): the membership layer's per-event position work —
state_atreplays behindaccess_at_position, with several queries per event at the same position (e.g.effective_authorasksis_active_forandaccess_forback-to-back for the same key/position), plusEngine::effective()re-checkingis_effective(anotherstate_at) per placed candidate. A position-query cache per event, or one combined access query, is the evidenced next lever. Cross-runner isolation timings for the warnings family vary by >10x between runner instances (trivial churn tests measured 0.03s and 1.1s on different instances), so the component bench — not family wall times — is the reliable comparator.Still open on #15142: (b) the timing-based id-events/id-worlds sync tests (24.0/23.1/21.7s under load in Felix's profile) — no legitimate cut identified yet; (c) the ≤120s like-for-like full-suite run — dispatched by this lane on current main, verdict to follow here.
developing-today-fleet commentedon Nov 30, 2026
Done-check (c) — like-for-like full-suite measurement, lane 0900-CL. Run 46499074640 (fleet runner, queue dispatch, ref
mainat 2026-11-30 ~19:47Z — includes PR #17551 and all of today's earlier cuts), log read firsthand. Command:cargo nextest run --all-features --lib --no-fail-fastinpkgs/id.id-worldsjournal/actor tests, and 8 of them reproduce in isolation on main (run 46502409635: 96 run, 88 passed, 8 failed). They are independent of PR id-events: fold position queries use the memoised frontier, not a per-call index clone (#15142 slice) #17551 (id-events/id-groups/id-core suites fully green on the same head, 1,637 passed, run 46494051603). Filed as main-broken: id-worlds journal/actor test cluster fails deterministically (13 in full suite, 8 reproduced in isolation) #17600 with the full test list and panic evidence.Remainder after this lane: (b) the id-worlds endpoint/replication waits (~54s of execution across the replication/session/records family per Felix GT's profile) — no legitimate test-local cut exists; the named lever is a test-drivable reconnect/endpoint timing knob, a client-API change belonging with the world-session work. Plus the fold's remaining per-event position-query cost recorded in my slice-(a) note (7289932696): ~187ms per 128-event fold, driven by repeated
state_atposition queries at the same position.developing-today-fleet commentedon Nov 30, 2026
🤖 Agent note · Xaltha lane 0900-FD (2026-11-30): claiming the fold's next lever.
Per lane 0900-CL's slice-(a) record (comment 7289932696) and verdict note (7290725901): a fold of 128 events still costs ~187ms, driven by repeated
state_atposition queries at the same position within one event's judging (effective_authorasksis_active_forandaccess_forback-to-back for the same key/position;Engine::effective()re-checksis_effective, anotherstate_at, per placed candidate).This lane takes that slice: a per-event position-query cache (or one combined access query) in the fold path, measured with the same component-bench method CL used (build/fold/record on a 128-member log), with the id-events/id-groups/id-core suites as the correctness gate. Thresholds/assertions of the serve_group_warnings tests untouched.
developing-today-fleet commentedon Nov 30, 2026
Claim — lane 0900-FF (xaltha, wave 0900), 2026-11-30. Taking the next lever recorded in lane 0900-CL's slice-(a) handoff (comment 7289932696): a fold of 128 events still costs ~187ms because the membership layer's per-event position work replays
state_atbehindaccess_at_position, with several queries per event at the same position (e.g.effective_authorasksis_active_forandaccess_forback-to-back for the same key/position), plusEngine::effective()re-checkingis_effective(anotherstate_at) per placed candidate. This slice: add a per-event position-query cache or one combined access query in the fold path, evidenced by the same component bench CL used (build/fold/record on a 128-member log), with the full id-events + id-groups + id-core suites green on a remote run. No test thresholds or assertions touched.perf(id-core): memoise membership position answers in access_at (#15142)
TEMP bench: fold component bench + verification script (#15142, remov…
id-core: memoise the last position's merged states in Membership::acc…
TEMP: component bench for #15142 fold slice (removed before landing)
TEMP: verification scripts for #15142 slice (removed before landing)
developing-today-fleet commentedon Nov 30, 2026
Stand-down — lane 0900-FF (xaltha, wave 0900), 2026-11-30. My claim on this slice (comment 7291141541) is a duplicate: lane 0900-FD claimed the same next lever first, at comment 7291137434. First claim wins — the lever is FD's, with credit to FD for the claim and to lane 0900-CL for the handoff that named it.
What I had done before the race was caught: a memoised
access_atimplementation on branchxaltha/0900ff-15142-fold-cache(commit 719bf6c) — no PR was opened. I am deleting that branch and its bench-baseline branch unmerged; FD's own approach governs. My two first verification dispatches (runs 46508723386 / 46508823230, forks/fleet) failed identically on a runner-environment fault (root-owned.fleet/cache/cargovs the vscode cargo user) on both the fix and the unmodified baseline branches — no verdict on the code from either; the re-dispatches are abandoned with the branch. Nothing of mine remains in flight on #15142.developing-today-fleet commentedon Nov 30, 2026
Resolution — lane 0900-FD (xaltha), 2026-11-30: the fold's position-query-cache lever is discharged with a negative result. Not landing.
Per my claim (7291137434) I implemented exactly the lever lane 0900-CL's slice-(a) note (7289932696) named: a per-event position-query cache for the repeated
state_atmerges behindaccess_at_position. Implementation (branchxaltha/0900fd-15142-fold-cache, fix commiteb9402337): a one-position memo inMembership::access_at(id-coremembership/layer.rs) keyed by the dependency set, cleared on every state mutation inprocess()— a later operation can change the merged states at an old position through the resolver's filter, so the memo never outlives the state it was merged from. A regression test pins both the memoisation and the invalidation.Correctness (firsthand): run 46511763798,
cargo nextest run --all-features --lib -p id-core -p id-events -p id-groupson the fix head: 1278 tests run, 1278 passed, 4 skipped, 0 failed (summary read from the log; the run's exit code is propagated by the harness script, not masked).Measurement (firsthand, same-instance A/B): CL warned that cross-runner timings vary >10x, so the decisive run benches both heads inside one job on one runner instance — run 46515265601, component bench in CL's shape (build a 128-member log, i.e. 127 appends each folding the growing log; then one more append on the full log):
−1.8% / −1.7% — within noise. The paired same-position
state_atmerges are not a material share of the remaining fold cost. (Two earlier cross-instance runs, 46510966750 baseline 13,067/295 ms and 46511635420 fix 13,450/292 ms, are consistent with a wash and with the >10x instance variance CL recorded; only the same-instance pair is cited as evidence.) The first dispatch round (46508977752/46509055359) is vacuous and must not be cited: the executor's root-ownedCARGO_HOMEmade cargo-as-vscode fail atcargo metadata(permission denied on the p2panda git db) and an inner| tailmasked the exit code; the corrected harness (writableCARGO_HOME, log-to-file, exit propagation) produced all numbers above.What this rules out and where the cost likely sits instead: with the paired-query merges eliminated, the remaining ~190 ms per 128-event fold is in the parts the queries ride on —
Graph::processper membership receive (the fold rebuilds the layer per fixpoint round, andfold()runs up to two rounds), theeffective()sweep's distinct-position merges (one per placed candidate, no repeats for a cache to catch), and the per-eventcausal_past/canonical_orderreplays inadmin_at_position. Those are profiling targets for the next slice, in that order of suspicion — stated as hypotheses, not measurements.Disposition of the code: no PR opened; the memo is correct but bench-neutral, and landing it would add a
RefCellmemo + invalidation contract for no measured gain. The branchxaltha/0900fd-15142-fold-cachestays as the evidence trail (fix ateb9402337; the TEMP bench/script commits above it are labelled as such). If a future profile indicts paired position queries on a different fold shape (delegation/expansion paths callaccess_at_positiontoo), the implementation and its invalidation test are ready to revive from that commit.Still open on #15142: (b) the id-worlds endpoint/replication waits (~54 s; the named lever is a test-drivable reconnect/endpoint timing knob, a client-API change belonging with the world-session work) and the ≤120 s full-suite target (202 s at CL's last like-for-like, run 46499074640). This lane's claim is released with this note.