GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Performance] pkgs/id unit tests take 358s against the 120s target — profile and cut · Issue #15142 · developing-today/code

[Performance] pkgs/id unit tests take 358s against the 120s target — profile and cut #15142

New issue
Copy link
New issue
Copy link
Backlog
Backlog
[Performance] pkgs/id unit tests take 358s against the 120s target — profile and cut#15142
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/performancePerformance problem or optimizationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)status/needs-triageNot yet triaged; needs a first look

Description

@developing-today-fleet
developing-today-fleet
bot
opened on Nov 25, 2026
Issue body actions

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.

Refs #15079, #6378

{
  "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 --lib execution 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

Next
  1. developing-today-fleet
    added
    kind/performancePerformance problem or optimization
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    status/needs-triageNot yet triaged; needs a first look
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 25, 2026
  2. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 25, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Intake review

    🤖 Agent note · filed

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: repo-fleet-monitor run 2026-11-25T15:14Z (digest 2026-11-25T15:15:05Z)
    • Found via: monitor reconciliation — intake enrichment (protocol §5)
    • Task: Intake pass: verified still live, appended acceptance criteria, normalized labels (priority/normal, effort/m, status/needs-triage, app/id), added meta/enriched.
    • Expectation: a queue lane or sweep picks this up from the queue in due course; the monitor does not implement it.
    • Links: evidence parent [Performance] Measure remaining pkgs/id test runtime targets after nextest #15079; siblings filed from the same pass: [Performance] pkgs/id unit tests take 358s against the 120s target — profile and cut #15142, [Bug] pkgs/id integration tests do not compile: dht_testnet E0308 from dual n0_mainline versions #15143, [Bug] NixOS VM checks broken: p2panda fetchgit hash mismatch (source branch moved) #15144, [Bug] Playwright local mode cannot start: second webServer dies on events.redb (dual-server shared data dir) #15145, [Performance] E2E chromium suite takes 1072s against the 600s target, with 22 failures in VM-mode wiring #15146

    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.

  3. developing-today-fleet
    added
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Nov 25, 2026
  4. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 25, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    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.

  5. dezren39
    added a commit that references this issue on Nov 25, 2026

    test(id): share one Argon2 envelope across backup budget proptest cases

    c24507b
  6. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 25, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    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/45648493590

    Command: cargo nextest run --all-features --lib --profile ci (JUnit per-test timings).

    • 6129 passed / 0 failed / 19 skipped. Nextest execution 484.96s on this run (the [Performance] Measure remaining pkgs/id test runtime targets after nextest #15079 baseline measured 358.03s with the default profile and a warm cache — treat the baseline as the same order; runner variance is real).
    • Summed per-test time: 1931.0s. Summed/4 cores ≈ the execution wall, i.e. the suite is CPU-saturated: scheduling changes cannot move the number, only removing work can.
    • Concentration: 223 tests ≥1s account for 1680.8s (87% of all work); 73 tests ≥5s account for 1291.2s (67%).

    Top suites (binaries) by summed test time:

    suite tests summed
    id (root) 714 509.2s
    id-worlds 1341 497.3s
    id-events 385 309.0s
    id-directory 293 145.7s
    id-groups 121 119.6s
    id-sync 299 100.7s
    id-cli 769 92.9s
    id-web 795 71.3s
    id-core 654 70.7s
    all others ~480 ≤8s each

    Slowest individual tests:

    time test
    186.26s id :: backup::tests::download_budget_never_admits_past_the_estimator
    64.87s id-events :: event_store::sync::tests::test_loopback_converges_for_mixed_k_and_t
    61.27s id-directory :: keyset::tests::generated_histories_fold_to_the_model_state
    59.23s id :: boards::tests::rules_resolution_is_independent_of_insertion_order
    49.32s id :: boards::tests::game_replay_matches_ttt_oracle_for_arbitrary_action_sequences
    46.18s id-events :: local_events::tests::test_clear_tag_chunks_600_claims_into_three_events
    42.05s id-events :: event_store::ingest::tests::test_a_batch_decides_and_stores_what_per_event_ingest_does
    36.47s id-worlds :: sandbox::tests::checked_in_examples_stay_within_fuel_budgets
    33.66s id-events :: event_store::sync::tests::test_an_interrupted_session_restarts_without_duplicates
    33.04s id-cli :: commands::serve::tests::serve_group_warnings_fire_once_at_each_size_threshold
    32.17s id-sync :: log_sync::tests::test_a_bulk_session_moves_every_event_across_pages
    30.02s id-web :: runs::tests::kills_runs_past_the_timeout

    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.

  7. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 25, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    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.

  8. developing-today-fleet
    added a commit that references this issue on Nov 25, 2026

    Merge pull request #15163 from developing-today/felix/15142-unit-test…

    531e278
  9. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 25, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    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).

  10. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 25, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    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.

  11. developing-today-fleet commented on Nov 25, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 25, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    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 inside SigningKey::from_bytes, and public(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):

    • Baseline main, run 45696918438: fold test 55.90s, 1 passed.
    • PR branch, run 45699942144: fold test 34.90s, 1 passed (−21.0s, −38%).
    • Full id-directory lib suite on the branch, run 45709272914: 293 passed / 0 failed.

    Remaining for this issue: the boards property family (~217s) and id-events sync/ingest/clear-tag (~250s) blocks from the profile.

  12. 5 remaining items

  13. dezren39 commented on Nov 26, 2026

    @dezren39
    dezren39
    on Nov 26, 2026
    Member
    More actions

    Fourth slice (felix lane): the id-events sync/ingest/clear-tag block — profiled; no test-only cut exists for this block. The removable-repetition pattern of cuts 1–3 (PRs #15163, #15324, #15325) is not present here; the block's cost is a per-event product cost, measured below and routed to a new product-side issue, #15328. No PR from this slice.

    Baselines (isolated single-test runs, default features, fresh in-checkout CARGO_TARGET_DIR)

    Run 45724148980 (branch == main e627781): converges_for_mixed_k_and_t 59.66s; interrupted_session_restarts 32.65s; clear_tag_600 38.90s; batch_decides proptest 41.02s; control test 0.00s.

    Subdivision probes (run 45726700328): clear_tag with 3 claims 0.21s, with 257 claims 11.12s; empty-store loopback 0.04s; 6-event loopback 0.16s; a test performing 4,096 signings 0.42s.

    Where the time goes (instrumented run 45727683016; executor ~1.5x faster than the baseline run's — totals there: converges 39.54s, interrupted 21.85s, clear600 25.81s)

    • Store open: 4.6 ms each (5 opens = 23 ms). Signing: ~0.1 ms/event. Session fixed cost: ~0.04 s. Reconciliation: 3–5 flights per session. None of these matter.
    • One stored-event decode ≈ 7 ms. chain::decode strict-decodes the CBOR, re-encodes and compares it, re-serializes the extension and compares again; p2panda-core's AnyHeader::decode verifies the ed25519 signature on every call — all at the test profile's opt-level 0.
    • Per-event ingest: 21.5 ms, flat across store sizes 0→300 (three 100-event blocks: 2.148s / 2.148s / 2.163s) — the incoming decode plus decide_in decoding the stored events at this and the previous position.
    • Batch decide in one transaction: 13.9 ms/event (300 events = 4.17s). check_invariants: 13.7 ms/stored event (139 ms at 10 events; 4.09s at 300). Index-only reads are ~1,000x cheaper (observed() over 300 events = 0.72 ms).
    • Clear-tag 600: set_claims 13.10s (600 × ~21.8 ms through set_tag), clear_tag 4.30s, the events_on/tags_on folds most of the remaining ~8s at ~7 ms per stored event folded.
    • Converges, per case: populate ≈ 2.9s + 3.5s (~216 events/side at the batch rate), the loopback itself ≈ 3.1–3.6s (sender reads + receiver decides at the same per-event rates). Interrupted: populate 600 = 8.37s, sessions 6.32s / 7.15s.
    • One batch-proptest case, phase by phase (10 events): scenario 1.8 ms, per-event path 185 ms, batch path 113 ms, observed x2 0.27 ms, check_invariants 139 ms.

    Why no cut

    Cuts 1–3 removed work the tests repeated: an Argon2 envelope rebuilt per case, a key derivation per generated participant. Here the fixtures already build each event once, stores open once, and the sessions run the product protocol end to end. Every remaining millisecond is the store's own per-event decode/verify, paid by design on its internal reads (decode_stored and its callers) — a test cannot cache another component's internal reads without changing what is tested, and shrinking case counts or claim volumes would cut coverage, which this issue's criteria forbid.

    The product-side question — whether bytes the store itself wrote and verified at ingest need full re-verification and re-canonicalization on every internal read, and whether decide_in needs full decodes of stored neighbours to learn their IDs — is filed as #15328, with the threat-model caveat (the current code treats a changed file as corruption) stated for whoever designs it.

    What remains in this issue after this slice: the id-worlds sandbox conformance/fuel block from the original profile, and now #15328 as the route for the id-events block's ~250s.

  14. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 26, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Claimed by felix lane (Muse sandbox seat) 2026-11-25 for the fifth cut: the id-worlds sandbox conformance/fuel block from the recorded profile (comment 7167806712) — the last remaining block named on this issue after cuts 1–3 (PRs #15163, #15324, #15325) and the id-events diagnosis (comment 7178885990, routed to #15328). Slowest named test: sandbox::tests::checked_in_examples_stay_within_fuel_budgets (36.47s in the profile); id-worlds suite summed 497.3s across 1341 tests.

    Plan: baseline the sandbox/conformance tests in isolation on current main remotely, find any per-case repeated cost the tests themselves pay (same discipline as cuts 1–3: test-only removal of repeated work, same cases, same assertions), land one cut PR if one exists. If the honest result is that no test-only cut exists, the full diagnosis goes on this issue and the product-side route gets filed as its own issue instead. PR left unmerged for Felix.

  15. developing-today-fleet
    added a commit that references this issue on Nov 26, 2026

    test(id-worlds): compile each distinct guest module once per test pro…

    5aa8df9
  16. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 26, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Fifth cut landed as PR #15337 (left unmerged for Felix). Target: the id-worlds sandbox conformance/fuel block — the last block named in the recorded profile (comment 7167806712). Diagnosis: the block is compile-bound; a test-only cut exists but is small, and the dominant remainder is product-side, filed as #15334.

    Baselines (run 45730091085, branch == main 16a74a4)

    Nextest (--features ssh,sandbox, ci profile), sandbox::tests:: filter: 49 tests, summed 173.6s, all passed. Top: checked_in_examples_stay_within_fuel_budgets 30.07s, bytes_per_frame_baseline_for_checked_in_examples 27.46s, admission_accounting_matches_its_oracle 10.37s, checked_in_chat_example_sends_and_reads_history 7.25s, the five conformance tests 1.96–7.15s each. Isolated on the same run: fuel budgets 17.73s, bytes_per_frame 14.31s, territory full-house view 3.03s, tic-tac-toe full game 1.34s, conformance signatures 4.43s, burrow replay 3.00s.

    Where the time goes (probe run 45732687368, throwaway branch, since deleted)

    Per checked-in example, Sandbox::compile vs the whole driven session (instantiate, drive, view/layout/records/wants, snapshot, restore):

    module bytes compile drive
    roc-text-counter 30,034 0.95s ~0 ms
    roc-counter 59,977 1.77s ~1 ms
    roc-grid 62,242 1.86s ~1 ms
    tic-tac-toe 69,345 1.93s ~1 ms
    roc-screen 74,447 2.11s ~1 ms
    lounge 168,963 4.33s ~1 ms
    roc-chat 168,328 4.44s ~1 ms
    territory 167,193 4.45s ~1–3 ms

    Engine::new ×20 = 0 ms; the cost is Cranelift in Module::new. Compiling the tiny ECHO wat fixture costs 28.5 ms (×20 = 570 ms, same with custom limits). Guest execution is native-speed and nearly free at these fuel counts — unlike id-events (comment 7178885990), nothing here is a per-event product cost.

    Why the cut is small

    Nextest runs one process per test, so compilations cannot be shared across tests, and nearly every test in the block compiles each of its modules exactly once. The only within-test repetition — the only thing a test-only cut may remove — was:

    1. The admission property recompiled the identical ECHO module for all 256 cases (~28.5 ms × 256 ≈ 7.3s of its 7.68s isolated time); only the fuel limit differs per case.
    2. The fuel-budget test compiled territory twice: examples() lists it as both territory and territory-full under two drive scripts.

    The cut (PR #15337, tests module only, +39/−3)

    • Admission property: ECHO compiles once per process (OnceLock<Sandbox>); each case gets a runner over the shared engine/module with its own limits. Validation runs once, on the same bytes, at the first case; cases, instantiate path, and oracle assertions unchanged.
    • measure_example split into compile + measure_with_runner; the fuel-budget test and print_fuel_baseline keep a per-test map keyed by module-bytes identity and compile each distinct module once. Every drive still runs on fresh instances; measured fuel is a property of the module, not of compilation identity.

    Verification (run 45735112021, PR branch)

    • Admission property, isolated: 7.68s → 0.14s (libtest: 1 passed, finished in 0.14s).
    • Fuel budgets, isolated: 17.73s → 12.02s — the saved territory compile (4.45s probe-measured) plus variance; the untouched bytes_per_frame control moved 14.31s → 11.43s across the same two runs, so cross-run executor variance is ~±3s and I am not claiming the difference beyond the compile.
    • Sandbox block under nextest: 49 tests, summed 173.6s → 109.4s, all passed. (Direction matches the removed compiles; under parallel load the removed Cranelift work also un-contends the remaining tests. The isolated numbers above are the conservative claim.)
    • Full id-worlds lib suite on the branch: 1370 passed / 0 failed / 5 skipped.

    Negative controls (run 45737402355, throwaway branch, since deleted)

    • FUEL_BUDGETS roc-counter View sabotaged 400,000 → 1: fuel test fails with roc-counter view: used 260274 fuel, budget 1 — the deduped path still measures and asserts. (Side observation: measured view fuel was 260,274 here vs the table comment's 260,269 baseline — a 5-unit wobble between runs, far inside the 25% budget headroom; budgets did not move.)
    • Admission shared module swapped ECHO → SPIN: property fails in 0.19s — cases genuinely execute against the shared compiled module, with per-case limits and the oracle intact.

    What remains in this issue

    The sandbox block's remaining ~110s summed is one Cranelift compile per test of a distinct checked-in module, repeated identically on every run — beyond test-side reach under nextest. The product-side route is filed as #15334 (a compilation cache for Sandbox::compile: key on bytes + codegen config, ABI validation still runs per call, corrupt/missing entries fall back to a fresh compile). With this slice, every block named in the original profile has now been cut or diagnosed: backup (PR #15163), keyset (PR #15324), boards (PR #15325), id-events (diagnosis, routed to #15328), id-worlds sandbox (this PR + #15334). The issue's done check — a full --all-features --lib run under 120s with the full count executed — still needs a fresh full-suite measurement on current main after these PRs merge.

  17. developing-today-fleet
    added a commit that references this issue on Nov 26, 2026

    Merge pull request #15337 from developing-today/felix/15142-worlds-sa…

    23fb7d7
  18. dezren39 commented on Nov 26, 2026

    @dezren39
    dezren39
    on Nov 26, 2026
    Member
    More actions

    Done-check measurement (felix lane) — bound NOT met; issue stays open

    Fresh full-suite measurement on current main, now that all five slices have landed (backup PR #15163, keyset PR #15324, boards PR #15325, id-events diagnosis routed to #15328, id-worlds sandbox PR #15337 merged 2026-11-26T02:07:54Z).

    Run: https://github.com/developing-today/fleet/actions/runs/45740591587 (fleet runner, 4-core / 16 GB, same recipe as the criterion-1 profile run 45648493590: real web/dist assets built first via ./scripts/build.sh assets debug, fresh in-checkout CARGO_TARGET_DIR, nix shell nixpkgs#cargo-nextest -c cargo nextest run --all-features --lib --profile ci; one deviation: CARGO_BUILD_JOBS=2 set, which affects the build phase only).

    • Main head measured: 23fb7d73a637c2f26179827f6d63a6030ad343ca
    • Nextest execution (Summary): 314.388s — target is ≤120s. Not met.
    • 6213 tests run: 6213 passed / 0 failed / 19 skipped (baseline count was 6129 — coverage preserved and grown; no cut deleted or moved a test).
    • Summed per-test time: 1251.9s (profile run: 1931.0s → −679.1s, −35% of summed work removed by the four cuts).
    • Execution vs the comparable ci-profile measurement: 484.96s → 314.39s (−35%). Against the [Performance] Measure remaining pkgs/id test runtime targets after nextest #15079 default-profile/warm-cache baseline of 358.03s the headline improvement is smaller (−12%); the profile/cache conditions differ, so the ci-profile pair is the honest comparison.
    • Whole nextest invocation wall incl. compile: 670s. Disk: 64G → 53G free, no disk pressure.

    Where the remaining 1251.9s sits (summed per-test, this run)

    suite tests summed profile run
    id-worlds 1370 341.5s 497.3s
    id (root) 722 219.9s 509.2s
    id-events 392 216.6s 309.0s
    id-directory 293 108.4s 145.7s
    id-groups 121 81.7s 119.6s
    id-sync 313 73.3s 100.7s
    id-cli 775 67.2s 92.9s
    id-web 803 60.1s 71.3s
    id-core 655 45.6s 70.7s
    id-store 327 33.0s —
    all others ~440 ≤4.3s each

    203 tests ≥1s sum to 1063.3s; 49 tests ≥5s sum to 720.1s. Slowest: id-directory :: keyset generated_histories_fold_to_the_model_state 49.81s (post-cut; its isolated time is 34.9s — the full-suite figure is contention-inflated), id-events :: sync test_loopback_converges_for_mixed_k_and_t 48.10s, id :: boards rules_resolution_is_independent_of_insertion_order 41.67s, id :: boards game_replay_matches_ttt_oracle 34.75s, id-events :: clear_tag_600 31.83s, id-web :: runs kills_runs_past_the_timeout 30.01s (a literal timeout-wait test), id-store :: issuer_rotation fold 28.20s, id-events :: ingest batch_decides 27.71s.

    What stands between here and the bound

    On 4 cores, ≤120s execution needs summed work at roughly ≤480s; 1251.9s remains — a further ~770s must go. The composition:

    • id-events, 216.6s — the expected remainder. Per-event product decode/verify cost (~7ms per stored-event decode at opt-0, signature re-verified on every internal read). No test-side cut exists (comment 7178885990); the route is the product issue id-events: stored-event decode re-verifies and re-canonicalizes on every read (~7ms/decode at opt-0) #15328. This block alone is ~1.8× the entire summed budget the bound implies.
    • id-worlds, 341.5s — now the largest suite. The sandbox block's remainder is one Cranelift compile per test of a distinct checked-in module, beyond test-side reach under nextest's process-per-test model; the route is the compilation-cache product issue id-worlds: Sandbox::compile pays a full Cranelift compile per call (~1–4.4s per checked-in module) — add a compilation cache #15334. The rest is a broad tail of world_* lib tests (replication-net 23.1s, session contract 9.4s, records 8.7s, store 8.3s, ssh 8.0s, fixture replay 7.0s, …) with no single dominant repetition identified.
    • id root crate, 219.9s — mostly the boards property family (≈156s across the 12 boards tests in the top 50). PR test(id): cache boards test key derivations per process (#15142 third cut) #15325's per-process key cache was the removable repetition the boards slice found (isolated module wall 64.9s → 57.4s); the family's remaining cost is full game replays against the oracle per generated case. No further removable repetition has been diagnosed here — naming it as the largest family without a current route, not filing a speculative cut.
    • The long tail, ~490s across id-directory / id-groups / id-sync / id-cli / id-web / id-core / id-store. Dozens of 5–30s property and protocol tests (directory merge/fold properties, group encryption cap tests, bulk sync sessions, serve warning thresholds, issuer-rotation fold). No dominant repetition identified in any of them by the slices so far.

    Criteria status

    • Timing profile recorded (comment 7167806712, updated by this one).
    • --lib execution ≤120s in a cited run — not met: 314.388s (run above).
    • Coverage preserved: 6213 tests executed, up from the 6129 baseline; every cut shared setup work only.
    • Closing note with before/after walls — pending the criterion above.

    #15142 stays open. The remaining path to the bound runs through the two product issues (#15328 for id-events, #15334 for the sandbox compile cache) plus undiagnosed weight in the boards family and the long tail; there is no test-side cut left that the five slices identified.

  19. dezren39 commented on Nov 26, 2026

    @dezren39
    dezren39
    on Nov 26, 2026
    Member
    More actions

    Triage verdict — Lane RN (queue task 23877)

    🤖 Agent note · triaged

    • Agent: archer (Lane RN, Muse sandbox seat)
    • Task: Queue task 23877 — triage of this issue (coverage reconciliation import, queue: no reconciliation between open issues and queue coverage — non-creator filings never get queue items #7016)
    • Verdict: VALID and already extensively worked; NOT closable, and no small fix remains. Returned for real implementation work.

    Premise + ownership check (2026-11-26): Issue is OPEN, premise confirmed by its own record. No live claim (the felix-lane claims were per-slice and every slice has landed), no held/user label, no Drew-decision gate.

    What has already landed:

    • Timing profile recorded: 6129 tests, summed 1931.0s, 223 tests ≥1s = 87% of work.
    • Four cuts merged, coverage preserved throughout: PR test(id): share one Argon2 envelope across backup budget proptest cases (#15142 first cut) #15163 (backup Argon2 envelope shared; 186.26s to 2.46s), PR test(id-directory): derive each test seed key once per process (#15142 second cut) #15324 (keyset key-derivation cache; fold test -38% isolated), PR test(id): cache boards test key derivations per process (#15142 third cut) #15325 (boards key cache), PR test(id-worlds): compile each distinct guest module once per test process (#15142 sandbox cut) #15337 (id-worlds module-compile dedup).
    • id-events block diagnosed with no test-only cut and routed to product issue id-events: stored-event decode re-verifies and re-canonicalizes on every read (~7ms/decode at opt-0) #15328.

    Done-check status (run 45740591587): full --all-features --lib execution 314.388s vs the 120s-or-under target — NOT met. 6213 passed / 0 failed / 19 skipped (up from the 6129 baseline — coverage preserved and grown). Summed per-test time 1931.0s to 1251.9s (-35%).

    Remaining path (real work, not triage):

    1. id-events: stored-event decode re-verifies and re-canonicalizes on every read (~7ms/decode at opt-0) #15328 (OPEN) — id-events stored-event decode re-verification, ~216.6s of summed work in the last measurement.
    2. id-worlds: Sandbox::compile pays a full Cranelift compile per call (~1–4.4s per checked-in module) — add a compilation cache #15334 — CLOSED/COMPLETED 2026-11-26T04:31Z, after the 02:33Z done-check measurement, so its sandbox compilation-cache effect is not yet reflected in any full-suite number. Next step for the owning lane: a fresh full-suite re-measurement on current main with the same recipe as run 45740591587.
    3. Boards property family (~156s) and the long tail (~490s) — no dominant repetition diagnosed yet; needs a diagnosis slice, not a speculative cut.

    Acceptance criteria 1 and 3 are met; criteria 2 and 4 remain open with the routes above. This issue stays open.

  20. dezren39 commented on Nov 26, 2026

    @dezren39
    dezren39
    on Nov 26, 2026
    Member
    More actions

    Re-measurement (xaltha lane, queue task 24173) — bound still NOT met; issue stays open

    Fresh full-suite re-measurement on current main, following up the Lane RN triage (2026-11-26T12:33Z), which noted the #15334 sandbox compile-cache effect was not yet reflected in any full-suite number. This run also includes PR #15336 (#15328 ID-only stored reads, merged 2026-11-26T10:06Z) and PR #15396 (#15334 compile cache). It does NOT include PR #15654 (#15328 verified-decode memo, still OPEN).

    Run: https://github.com/dezren39/fleet/actions/runs/45838935124 (fleet runner, 4-core / 16 GB, same recipe as runs 45648493590 / 45740591587: real web/dist assets built first via ./scripts/build.sh assets debug, fresh in-checkout CARGO_TARGET_DIR, CARGO_BUILD_JOBS=2, cargo nextest run --all-features --lib --profile ci)

    • Main head measured: e365a39036d1e1db7e1d8cc6ed86b070d2c70f2f
    • Nextest execution (Summary): 298.311s — target is ≤120s. Not met.
    • 6435 tests run: 6435 passed / 0 failed / 19 skipped (previous done-check: 6213 passed — coverage preserved and grown; no cut deleted or moved a test).

    Before/after on comparable ci-profile runs: 484.96s (profile, 6129 tests) → 333.23s (cut 1) → 314.388s (done-check, 6213 tests) → 298.311s (this run, 6435 tests). The #15334/#15336 effects together moved execution −16.1s (−5%) while the test count grew by 222.

    Remaining path (unchanged from the triage verdict):

    1. PR perf(id-events): memoize verified stored decodes #15654 (id-events: stored-event decode re-verifies and re-canonicalizes on every read (~7ms/decode at opt-0) #15328 verified-decode memo) — OPEN; once it merges, re-measure.
    2. Boards property family (~156s in the last profile) and the long tail (~490s) — needs a diagnosis slice, not a speculative cut.

    Acceptance criteria 1 and 3 remain met; 2 and 4 remain open. This issue stays open.

  21. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 26, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Re-measurement blocked on recipe drift — ready condition met, next slice scoped (code-g lane, queue task 24173)

    Ready condition met: PR #15654 (perf(id-events): memoize verified stored decodes) MERGED 2026-11-26T18:07Z as 6b675fa (merge commit 6b675fa5dbb2ae1e0bfbbf009db3eb8b8c23c446). Its in-PR matched-performance evidence (run 45872076039, same runner, main parent 091f77e vs 82a9880): test_a_batch_decides_and_stores_what_per_event_ingest_does 33.91s → 22.80s (−33%); four named tests combined 67.36s → 56.22s (−16.5%). So the awaited memoize effect is real and measured at the focused level. Full-suite number still stands at the pre-#15654 re-measurement: 298.311s execution, 6435 passed / 0 failed / 19 skipped (run 45838935124, head e365a390).

    Why no fresh full-suite number this pass: the recorded recipe (./scripts/build.sh assets debug + fresh in-checkout CARGO_TARGET_DIR + CARGO_BUILD_JOBS=2 + nix shell nixpkgs#cargo-nextest -c cargo nextest run --all-features --lib --profile ci) is no longer reproducible verbatim — scripts/build.sh does not exist on current origin/main (head 2e2e26c), and there is no assets target in root.just. Dispatching with a guessed pre-build would break comparability with the 484.96s → 314.39s → 298.31s series and burn a ~30min fleet-runner slot on a dubious number.

    Next slice (scoped, mechanical): (1) verify the current canonical web/dist assets pre-build entry point (what CI or the fleet runner image uses now); (2) dispatch the fresh full-suite ci-profile re-measurement on current main with that entry point recorded; (3) post execution time + pass/fail/skip vs the 120s target. Task 24173 is parked for that slice — no design decision, no owner input needed.

  22. dezren39 commented on Nov 27, 2026

    @dezren39
    dezren39
    on Nov 27, 2026
    Member
    More actions

    Re-measurement (2237-I lane, queue task 24173) — recipe verified, bound still NOT met; issue stays open

    The parked slice's three steps are done:

    1. Canonical assets pre-build entry point — VERIFIED. The recorded recipe's ./scripts/build.sh assets debug runs from pkgs/id: on current main the script is pkgs/id/scripts/build.sh (header: Usage: build.sh [variant] [profile], variant assets, profile debug; it builds web/dist via bun when the manifest is missing/stale). There is no scripts/build.sh at the repo root — the root scripts/ listing on main was read directly — so the earlier "recipe stale" note was a working-directory ambiguity, not a missing entry point. The run log confirms the assets step executed: [web] No manifest found, frontend build needed → bun run build produced web/dist.

    2. Fresh full-suite re-measurement dispatched on current main with the comparable recipe (fresh in-checkout CARGO_TARGET_DIR, CARGO_BUILD_JOBS=2, cargo nextest run --all-features --lib --profile ci, after the assets pre-build above). This run includes PR #15654 (verified-decode memo, merged 6b675fa), whose full-suite effect had never been measured.

    Run: https://github.com/dezren39/fleet/actions/runs/45941730287 (fleet-command, dispatch 2237I-15142, concluded success)

    • Main head measured: 28a49cf7583b39f8b796ec09e7a6022fcaaf5665
    • Nextest execution (Summary): 327.569s — target is ≤120s. Not met.
    • 6604 tests run: 6604 passed / 0 failed / 19 skipped (previous full-suite: 6435 passed — coverage preserved and grown by 169 tests; no cut deleted or moved a test).

    Series (ci-profile, comparable recipe): 484.96s (profile, 6129 tests) → 314.388s (done-check, 6213) → 298.311s (pre-#15654, 6435) → 327.569s (this run, 6604). The #15654 memo's focused-level gain (−33% on its target test in-PR) did not produce a full-suite drop this pass; execution rose +29.3s while the suite grew +169 tests. Runner variance exists in this series, so the honest statement is: no measurable full-suite improvement from #15654 at this test count, and the bound remains unmet by ~2.7x.

    Remaining path (unchanged): boards property family and the long tail need a diagnosis slice, not a speculative cut. Acceptance criteria 1 and 3 remain met; 2 and 4 remain open. This issue stays open. Task 24173 is parked with that diagnosis slice as the resume condition.

  23. developing-today-fleet
    added a commit that references this issue on Nov 27, 2026

    perf(id-directory): skip redundant keyset re-verification in fold-ord…

    b11629c
  24. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 27, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Feature-Slice Result: Keyset Fold-Order Property Perf (PR #16224)

    • Diagnosis: id-directory keyset::tests::generated_histories_fold_to_the_model_state took >60s (71.5s on the fleet runner) because the property generated a history and then re-inserted every record into four separate logs (forward, reverse, left, right), re-running full signature verification (SHA-256 + Ed25519 verify + key derivation) every time.
    • Cut: Added a test-only Log::insert_preverified helper. The forward log still uses Log::insert (verifying every record once), while the reverse, left, and right logs insert pre-verified records.
    • Evidence:
      • Laptop measured time for the property test: 59.4s → 16.6s (−72%).
      • Full module keyset:: (20 tests, including deterministic-fork-resolution and verify rejection): 20/20 passed.
      • PR: perf(id-directory): skip redundant keyset re-verification in fold-order property #16224.
      • Full-suite runner comparison is temporarily blocked by an unrelated pre-existing compile error on origin/main (id-cli E0277 from id-worlds: export_world_to_file omits parent-directory sync after rename (export not crash-durable) #16179, tracked in fix(id-worlds): sync export parent dir after rename before reporting success #16196).
    • Status: Complete (slice PR perf(id-directory): skip redundant keyset re-verification in fold-order property #16224 open).
  25. developing-today-fleet
    added a commit that references this issue on Nov 28, 2026

    perf(id): skip re-verify of freshly signed board objects (#15142 slice)

    ce3ad07
  26. developing-today-fleet commented on Nov 28, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 28, 2026 – with developing.today fleet
    ContributorAuthor
    More actions

    Next slice open: #16445 — skip re-verify of freshly signed board objects in SignedBoardObject::sign.

    Measured (laptop, cargo test -p id --lib): rules_resolution_is_independent_of_insertion_order 61.63s → 30.73s single-threaded; full boards:: family 146 passed in 41.21s. Construction-only change; receipt/verify paths untouched.

  27. developing-today-fleet
    added a commit that references this issue on Nov 28, 2026

    Merge pull request #16445 from developing-today/oc-code-01/15142-perf…

    7e8e7a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/performancePerformance problem or optimizationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)status/needs-triageNot yet triaged; needs a first look

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.