Skip to content

PolymorphicResolverAllocationTest.UnrelatedRegistryEntries_DoNotAllocateAClosurePerCandidate fails: 4917 bytes allocated vs 1024 budget — real allocation regression or noisy measurement on busy runner #6057

Closed

Description

@systemorph-com

Repository Systemorph/MeshWeaver. Run 37038369562 (MeshWeaver Build and Test, pull_request, attempt 1) on pull request 5945 head ec549cb: Run tests (shard 5), MeshWeaver.Messaging.Hub.Test.PolymorphicResolverAllocationTest.UnrelatedRegistryEntries_DoNotAllocateAClosurePerCandidate failed at PolymorphicResolverAllocationTest.cs line 71 with 'Expected 4917 to be less than 1024'. The test measures the extra bytes allocated when resolving one type with 512 unrelated dynamic types registered, against a fixed budget (commits 00e4745 and 1349098 of 2026-09-27). Pull request 5945 changes MeshWeaver.Graph layout areas (NodeType and Settings pages), one Graph test file and docs; git diff --stat against main lists nothing under Messaging, serialization or the resolver. Every other test of that run passed. NOT established: whether the measurement is noisy on a busy runner (tiered JIT or a GC on the measuring thread; the org runner pool was saturated at the time, 56 of 56 busy) or whether a change merged to main on 2026-10-02 raised the real allocation; the test was not run locally; main's own runs were not searched for the same failure.

Context: Disposition taken on the PR: failed jobs of run 37038369562 re-run once, on the evidence that the diff cannot reach the resolver. If it recurs on the re-run or on main, it is a real allocation regression or a measurement that needs warm-up and a median, and needs its owner.
Origin: https://memex.systemorph.com/Feedback/_Submissions/fb-2ee33afa245b3adc94b334d3977296f3 (submitted on memex.systemorph.com)

filed by the triage agent on behalf of Roland Buergi ([PERSON_NAME] agent session, core PR drain 2026-10-02) via systemorph-com

Activity

  1. added
    bugSomething isn't working
    sev:MMedium - secondary path broken, or easy workaround
    on Oct 3, 2026
  2. rbuergi commented on Oct 8, 2026

    @rbuergi
    Contributor

    Closing: there is no allocation regression; the 4,917 bytes came from the measurement, and the measurement has since been fixed twice on main.

    Timeline

    Measured on main f8bf80f (local, macOS arm64, Release with -warnaserror, --filter-class MeshWeaver.Messaging.Hub.Test.PolymorphicResolverAllocationTest):

    • As shipped, the test passes: Extra resolution allocation beyond registry traversal: 0 bytes for 512 unrelated types (small=7,792, large=7,792).
    • Negative control: I reintroduced the per-candidate closure in PolymorphicTypeInfoResolver.ComputeDerivedTypes (var alreadyAdded = derivedTypes.Any(d => d.DerivedType == derivedType);, which is the shape MessageService DrainLoop throws OutOfMemoryException during hub delivery (recurrence of #4824) #5555 removed). The test then fails: Expected 45056 to be less than 1024, with small=10,544, large=55,600. That is 88 B × 512 candidates, so the test still detects the defect it exists to catch. I reverted the control afterwards.
    • CI: I scanned the Test Results (shard N) annotations of every failed MeshWeaver Build and Test run created between 2026-10-05 21:57Z and 2026-10-08 (137 head SHAs). None of them names PolymorphicResolverAllocationTest.

    NOT established

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

    bugSomething isn't workingfeedbacksev:MMedium - secondary path broken, or easy workaround

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions