Skip to content

Issue #94: mem-rs parity analysis, issue triage and case study - #95

Open
konard wants to merge 9 commits into
mainfrom
issue-94-546989791777
Open

konard wants to merge 9 commits into
mainfrom
issue-94-546989791777

Conversation

@konard

@konard konard commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Fixes #94

Summary

This PR contains the analysis and documentation that #94 asks for. It changes no library code. All C#, C++ and mem-rs work is planned as separate issues, and each one is a sub-issue of #94.

  • Case study: docs/case-studies/issue-94/
    • README: requirements, timeline, findings, dependency graph, roadmap, libraries, sources.
    • feature-matrix.md: C# vs C++ vs mem-rs.
    • evidence.md: reproduction of every bug.
    • solutions.md: solution, plan, libraries and verification for each sub-issue.
    • issue-map.md: all sub-issues with their blockers.
    • data/: issue and PR dumps, probe logs, and the lists of created issues and dependencies.
  • Repository README: new section "Parity with mem-rs (Rust)" that links to the plan.
  • Experiments: each finding can be reproduced from these:
    • experiments/issue-94-csharp-probes: C# probes P1–P7.
    • experiments/issue-94-cpp-probes, experiments/issue-94-cpp-odr: C++ probes run under ASan/UBSan, and a link test.
    • experiments/issue-94-mem-rs-review: Rust tests that fail on mem-rs 0.6.2.
    • experiments/issue-94-triage: the scripts that created the issues, dependencies, sub-issues and the issue map.

Requirements of #94

Requirement Result
Mark all open issues as feature or bug All 16 previously open issues have labels and a GitHub issue type. #88 and #89 are relabelled from bug to enhancement.
Add blocker dependencies between issues 28 blocked by relations (dependencies.sh).
Plan every mem-rs feature or fix that C# is missing 30 new issues, #96–#125. Each one has a design and a verification plan.
Uniform behaviour and best practices Behaviour gaps reproduced by probes P1–P7. CI, security and release gaps are #111–#119.
Report mem-rs bugs and missing features in mem-rs linksplatform/mem-rs#46, linksplatform/mem-rs#47, linksplatform/mem-rs#48, linksplatform/mem-rs#49, linksplatform/mem-rs#50. Three of them include a failing test.
Add all existing and new issues as sub-issues of #94 51 sub-issues: 16 existing, 30 new, and 5 in mem-rs.
Collect data in docs/case-studies/issue-94, with online research and a deep case study Done. Sources are listed in §8 of the case study.
List every requirement with solutions, plans and libraries See the case study's §1, solutions.md and §7.

Main findings

C# bugs, reproduced by the probes:

C++ bugs:

Missing in C# compared with mem-rs:

Repository and CI:

How to reproduce

dotnet run --project experiments/issue-94-csharp-probes      # C# probes P1–P7
experiments/issue-94-cpp-probes/run.sh                        # C++ probes (GCC + ASan/UBSan)
experiments/issue-94-cpp-odr/run.sh                           # C++ multiple-definition link error
experiments/issue-94-mem-rs-review/run.sh                     # mem-rs tests (fail until mem-rs is fixed)
python3 -I experiments/issue-94-triage/issue_map.py           # regenerate issue-map.md from GitHub

The expected output is stored in docs/case-studies/issue-94/data/*.log.

CI note

Checks on this PR:

  • auto-merge (the Dependabot pull_request_target workflow) passes.
  • Codacy passes.

Codacy first reported 184 style findings, mostly markdownlint line length in tables. I fixed the real ones: blank lines, bare URLs, an unused import, f-strings without placeholders, and unquoted shell variables. .codacy.yml now excludes docs/case-studies/** and experiments/**, which are analysis artifacts rather than library code.

The library build and test workflows do not run on pull requests: csharp.yml runs only on pushes to main, and cpp-test.yml runs only on PR edited events. That gap is filed as #113 and #116. This PR changes no library code.


Fixes #87
Fixes #90
Fixes #92

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #94
@konard konard self-assigned this Nov 29, 2026
- docs/case-studies/issue-94/data: issue/PR snapshots of Memory and mem-rs,
  output of C# probes P1-P7 and the C++ multiple-definition link probe
- experiments/issue-94-csharp-probes: reproducible probes comparing
  Platform.Memory behaviour with mem-rs
- experiments/issue-94-cpp-odr: shows Platform.Memory.h-style inclusion of
  memory_mapped_file.cpp breaks linking of two translation units
- remove .gitkeep from the initial task commit
- experiments/issue-94-cpp-probes: compiles Platform.Memory C++ headers with
  stubs under ASan/UBSan; confirms #92 (malloc/delete), copy constructor
  writing through nullptr and FileArrayMemory byte-offset bug
- experiments/issue-94-mem-rs-review: regression tests filed as
  linksplatform/mem-rs#46, #47, #48 and the C# file compatibility check (#50)
- experiments/set-issue-type.sh: helper used to set organisation issue types
Add the scripts that filed #96-#125, linked their
cross-references, added blocked-by relations and attached all related
Memory and mem-rs issues as sub-issues of #94, plus their output logs.
@konard konard changed the title [WIP] Plan to catch up with github.com/linksplatform/mem-rs Issue #94: mem-rs parity analysis, issue triage and case study Nov 29, 2026
- Markdown: blank lines around headings and lists (MD022/MD032), no bare URLs
  (MD034), wrap the new README paragraph, escape HTML in generated issue titles.
- Python: drop unused import and placeholder-less f-strings (issue specs are
  byte-identical); quote shell variables in sub_issues.sh.
@konard
konard marked this pull request as ready for review November 29, 2026 11:21
@konard

konard commented Nov 29, 2026

Copy link
Copy Markdown
Member Author

Working session summary

Issue #94 is done in PR #95, which is now ready for review: #95. The issue limits its own scope to analysis and docs, so no library code was changed. All 51 sub-issues are still open; they are the planned code work.

Issue triage

Documentation (in docs/case-studies/issue-94/)

  • README.md: every requirement of the issue and how it was met, a timeline, findings, a dependency graph with the order of work, related libraries, and sources.
  • feature-matrix.md: C# vs C++ vs mem-rs, feature by feature.
  • evidence.md: how each bug was reproduced, with the actual output.
  • solutions.md: a solution, plan, helpful libraries and verification for each sub-issue.
  • issue-map.md: a table of all sub-issues and their blockers, generated from GitHub.
  • data/: dumps of both repositories' issues and PRs, plus the probe logs.
  • The repository README.md has a new "Parity with mem-rs (Rust)" section linking to all of this.

The scripts that reproduce each finding and the ones that created the issues are in experiments/.

Most important findings

Checks on PR #95

I had accidentally committed the C# probe's build outputs (bin/, obj/); a later commit removes them.

No review comments arrived during the 15 minutes I waited after marking the PR ready, and #94 has no comments to address. The branch is pushed with no uncommitted changes, already contains main, and can be merged cleanly.


This summary was automatically extracted from the AI working session output.

@konard

konard commented Nov 29, 2026

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $8.818031
  • Calculated by Anthropic: $9.272675
  • Difference: $0.454644 (+5.16%)

📊 Context and tokens usage:

Claude Opus 5.5: (4 sub-sessions)

  1. 116.8K / 1M (12%) input tokens, 22.1K / 128K (17%) output tokens
  2. 90.3K / 1M (9%) input tokens, 43.3K / 128K (34%) output tokens
  3. 115.6K / 1M (12%) input tokens, 39.8K / 128K (31%) output tokens
  4. 70.9K / 1M (7%) input tokens, 18.1K / 128K (14%) output tokens

Total: (15.6K new + 485.1K cache writes + 9.5M cache reads) input tokens, 168.2K output tokens, $8.744090 cost

Claude Haiku 5.5:

  • 89.6K / 1M (9%) input tokens, 10.0K / 128K (8%) output tokens

Total: 89.6K input tokens, 10.0K output tokens, $0.073941 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus (claude-opus-5-5)
  • Thinking level: high (~23999 tokens)
  • Main model: Claude Opus 5.5 (claude-opus-5-5)
  • Additional models:
    • Claude Haiku 5.5 (claude-haiku-5-5)

📎 Log file uploaded as Gist (5544KB)


This AI session has ended. Monitoring of this pull request continues. Feel free to review and add feedback while checks are running.

@konard

konard commented Nov 29, 2026

Copy link
Copy Markdown
Member Author

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No uncommitted changes

This branch has not been deployed

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

Labels

None yet

Projects

None yet

1 participant