Skip to content

[P2] Isolate allocation regression tests from background GC accounting #58

Closed

Description

@AGiorgetti

Problem

Exact allocation checks in the Roslyn-host test matrix intermittently fail on unchanged code because .NET 10 background GC can contaminate GC.GetAllocatedBytesForCurrentThread accounting (dotnet/runtime#134724 and draft fix #134855). The 4.0.1 release is already published; this follow-up targets active integration on develop.

Acceptance Criteria

  • Run only allocation-sensitive tests in an isolated allocation-only process with background GC disabled; other correctness tests retain normal/default GC coverage.
  • Preserve existing exact allocation assertions and meaningful zero/positive controls. Real extra allocations and child assertion failures must propagate as failures.
  • Validate child configuration, ordinary-host isolation, and failure propagation. No tolerance, retry-until-pass, workflow policy weakening or product/runtime mapping changes.
  • Document the runtime issue and mitigation limits, run focused repetitions and broader correctness/Roslyn checks, obtain independent review, and open a draft PR targeting develop with exact-head CI evidence.
  • Keep this work separate from concurrent packaging work. No timing benchmarks, machine settings changes, merge, tag or publication.

Activity

  1. added
    bugSomething isn't working
    exec:agentAgentStack execution mode: agent
    ready:agentAgentStack readiness: ready for agent
    type:bugAgentStack work item type: bug
    state:readyAgentStack protocol state: ready
    priority:p2AgentStack priority P2
    state:claimedAgentStack protocol state: claimed
    claim:activeAgentStack active claim marker
    and removed
    state:readyAgentStack protocol state: ready
    on Oct 15, 2026
  2. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    Agent claim registered for autonomous execution.

  3. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    AgentStack Protocol: execution-plan

    Outcome

    isolate only allocation-sensitive regressions in a non-concurrent-GC child process while preserving exact assertions and ordinary default-GC coverage.

    Base

    • active default develop at a0e2168
    • 4.0.1 is published, so target develop.

    Steps

    • first add failing configuration, zero/positive allocation and real-allocation/failure propagation regressions
    • implement a small net10 child host loading the existing test assembly, bounded process execution, and route the three allocation methods (including bool data rows) through it without changing their assertions
    • document upstream runtime134724/134855 and limits. Validate focused repeats, full correctness without local timing benchmarks, Roslyn4.8/4.14/5.9, independent review, then draft PR and exact-head CI.

    Non-goals

    product behavior, skills, packaging task, workflow/gate changes, machine settings, merge/tag/publish.

  4. added
    state:implementingAgentStack protocol state: implementing
    and removed
    state:claimedAgentStack protocol state: claimed
    on Oct 15, 2026
  5. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    AgentStack Protocol: progress

    Implementation and validation checkpoint

    • Added an allocation-only child host with effective background GC disabled and bounded, fail-closed dispatch. Existing allocation assertions remain unchanged; ordinary correctness keeps default GC.
    • Red-first controls failed 4/4 before isolation. The completed focused run passes 8/8, followed by ten complete repetitions (80/80, zero skips). Changing the copied child configuration to enable background GC fails before test invocation; original bytes were restored.
    • Release solution build passes. Full generator 1,091/1,091, runtime 5/5 and integration 1/1 pass with no failures/skips. The full solution run was stopped after the packaging project's first dotnet pack stalled; packaging is not represented as complete and its separate repair remains out of scope.
    • Independent read-only static review is clean after fixing host dependency copying. Serialized full Roslyn 4.14/5.9 checks are running. No local benchmark timing runs, product or workflow changes.
  6. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    AgentStack Protocol: progress

    Draft PR and CI checkpoint

    • Draft PR: test: isolate allocation regressions and bound smoke execution #60 targeting develop.
    • Exact HEAD: 2d01eee. Working tree is clean.
    • Local full generator suites pass 1,091 cases each on Roslyn 4.8.0/4.14.0/5.9.0, zero failures/skips. Default 4.8.0 was restored and final focused cases pass 8/8.
    • Existing CI run 38724769540 is still active. All six Windows/Linux Roslyn jobs are green; Linux solution validation completed its steps and is cleaning up, Windows solution testing remains active. No rerun requested.
    • Local packaging stall and existing audit warnings remain documented. No merge, tag, publication or performance acceptance claim.
  7. 7 remaining items

  8. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    AgentStack Protocol: progress

  9. added
    state:blockedAgentStack protocol state: blocked
    and removed
    state:implementingAgentStack protocol state: implementing
    on Oct 15, 2026
  10. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    AgentStack Protocol: blocker

    Rebase completed

    Remaining CI blocker

    • Exact-head CI https://github.com/PrimordialCode/Mammoth.LiteMapper/actions/runs/38739919081 completed on attempt 1: seven jobs passed, Windows full solution failed.
    • Linux full suite passes 1390 tests and all six Roslyn jobs pass 1091 each, zero failures/skips. Windows passes generator/runtime/integration and 292 packaging tests; only BenchmarkHarnessRunsDryJobAndRecordsPinnedComparisons fails because its existing Dry smoke dotnet run exceeded 60 seconds. Benchmark test, helper and sources are unchanged.
    • No allocation or symbols test failure was reported. This does not establish the cause of the benchmark timeout or a performance result.
    • User excluded local timing benchmarks and required all assertions/workflows/gates preserved. No local benchmark reproduction, gate/timeout change, rerun, merge or PR closure was performed. Await human review of this remaining blocker.
  11. added
    state:implementingAgentStack protocol state: implementing
    and removed
    state:blockedAgentStack protocol state: blocked
    on Oct 15, 2026
  12. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    AgentStack Protocol: progress

    User approved benchmark-smoke-only 300-second timeout, samples remain 60 seconds, bounded captured timeout output and short bounded cleanup wait. Current local/remote head 07a7dd2 is clean. Add red-first process fixtures and regressions including inherited-pipe/child-exit cases, validate without local timing benchmarks, independent review, same PR push and exact-head CI. Preserve assertions, allocation isolation, symbols validation and workflow gates.

  13. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    AgentStack Protocol: progress

    • Approved timeout follow-up pushed at b9ae890 to existing PR test: isolate allocation regressions and bound smoke execution #60. Benchmark-only300s, samples60s, bounded4096-character timeout tails and1s cleanup
    • successful output/assertions preserved. Red3new failures/4controls
    • final process21/21 across3repetitions, broader248/248, allocation8/8 pass
    • Release solution build passes and independent static review clean. Fresh exact-head CI pending. No local benchmarks, workflow/gate edits, merge or closure.
  14. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    AgentStack Protocol: progress

    • CI at b9ae890 completed: Windows and all six Roslyn jobs passed
    • Linux failed only the new orphan-fixture ownership assertion. Correcting Linux cross-process StartTime identity with exact procfs field-22 tokens
    • preserving timeout and cleanup assertions, product code and workflow gates.
  15. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    AgentStack Protocol: progress

  16. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    Linked pull request: #60

  17. AGiorgetti commented on Oct 15, 2026

    @AGiorgetti
    ContributorAuthor

    AgentStack Protocol: submit-review

    Changes

    • PR test: isolate allocation regressions and bound smoke execution #60 at a6faf30 retains allocation-only background-GC isolation and the unchanged exact assertion bodies on develop c3ef53e, including merged symbols PR Fix generator symbol package layout and validate symbols before publishing #59.
    • User-approved follow-up gives only the BenchmarkDotNet smoke a 300-second deadline; sample calls remain at 60 seconds. Timeout diagnostics retain the last 4,096 characters per stream, configured/elapsed time and cleanup status, with a one-second bounded cleanup wait. Successful output remains complete.
    • Linux fixture ownership compares PID and the exact procfs field-22 kernel token rather than independently converted StartTime timestamps. Other platforms retain exact UTC ticks. Existing liveness and cleanup assertions remain intact.
    • Product sources, generated mapping semantics, benchmark algorithms, exact allocation assertions, symbols configuration and workflow gates are unchanged.

    Validation

    • Red-first: three new process timeout cases fail against the previous helper; seven procfs parser cases fail before parser implementation.
    • Final local process coverage: 42/42 across three complete runs; broader process/release/publication safeguards: 255/255; zero failures/skips. Allocation isolation previously passed 8/8 and remains unchanged by the fixture correction.
    • Release solution build passed with two existing transitive dependency audit warnings. Final packaging-test project Release build passed with zero warnings/errors.
    • Independent read-only static review accepted both the timeout handling and Linux identity correction with no remaining material findings.
    • Exact-head CI 38749497578 completed successfully at a6faf30, attempt 1. Windows and Linux full suites each pass 1,400 cases (generator 1,091, runtime 5, integration 1, packaging/process 303); all six Roslyn jobs pass 1,091 each. Zero failures/skips. Linux sample/smoke steps and both solution-path validations pass. Required Native AOT is enabled in both full-suite jobs. The earlier Linux fixture failure is corrected and executed successfully.
    • Pack & Validate, Verify Release Artifacts and Publish NuGet Packages were conditionally skipped on this PR trigger. No release-artifact publication evidence is claimed.

    Risks and limits

    • No local timing benchmarks or nested real-build/package-launching checks were run for this follow-up. Full CI supplies those correctness, packaging, trim, required Native AOT and existing smoke checks; this is not performance acceptance.
    • The five-minute limit is a bounded liveness budget, not a measured percentile or throughput gate. Historical allocation/timeout failures lack per-window traces.
    • If a direct child already exited, portable descendant termination remains unconfirmed; the helper returns boundedly with incomplete-cleanup diagnostics, and regression fixtures clean up their own exact identities.
    • PR remains open for human review. No merge, closure, tag, publication or machine/system settings change.
  18. added
    state:pr-openAgentStack protocol state: pr-open
    and removed
    state:implementingAgentStack protocol state: implementing
    on Oct 15, 2026
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 workingclaim:activeAgentStack active claim markerexec:agentAgentStack execution mode: agentpriority:p2AgentStack priority P2ready:agentAgentStack readiness: ready for agentstate:pr-openAgentStack protocol state: pr-opentype:bugAgentStack work item type: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions