Offline: property tests for riptide-mem alias/continue/commit
Opened by @Nixitov · Assignees: None
Solve & Merge Reward: Up to +210 XP & +60 Coins
+30 XP on PR open · +180 XP & +60 coins on merge
Claim Status & GitHub Signal
Unassigned, with 2 comments. Unassigned does not guarantee unclaimed—read comments and linked PRs first.
Estimated from issue labels (good first issue, memory), Rust context, and discussion depth. There are 2 GitHub comments to review for maintainer clarifications. Note: this is an estimate, not a guarantee.
What It's About
Offline: property tests for riptide-mem alias/continue/commit. Why PLAN N1 acceptance already states the invariants: no two live pages alias unless explicitly mapped; continuing an allocation preserves every byte; decommit then recommit returns zeroed storage. crates/riptide-mem/tests/page_table.rs covers examples; random
Why It Matters
Resolving #21 improves reliability and developer experience in Nixitov/Riptide-Native.
Expected Outcome
A focused pull request addressing #21 with relevant checks or tests verified locally.
Log in to compare this issue's requirements against your profile skills. Required concepts: Machine Learning, C / C++ & Memory.
Progressive AI Hints
Hint #1 is always free and calibrated to your experience level. Extra hints unlock with coins without spoiling the full solution.
Skill-Gap Learning
Issue Description
Why
PLAN N1 acceptance already states the invariants: no two live pages alias unless explicitly
mapped; continuing an allocation preserves every byte; decommit then recommit returns
zeroed storage. crates/riptide-mem/tests/page_table.rs covers examples; randomized
sequences would catch the edge cases before the live path does.
Scope
- Add deterministic property/randomized tests (fixed seed, printed on failure) in
crates/riptide-mem/tests/, or a newtests/properties.rs. - Cover: reserve/commit/free interleavings, continuing runs across page boundaries,
aliases via
map,free_physical, and double-free/re-commit. - Test only. Do not change
AddressSpacesemantics.
Acceptance
-
cargo test -p riptide-mempasses. - A failing case prints the exact operation sequence and the seed.
- No title, no dump, no GPU.
Good first issue?
Yes. Pure Rust, fast, and it hardens the memory model the whole port stands on.
Linked Pull Requests (0)
No linked or cross-referenced pull requests detected via GitHub timeline. Check comments below for informal claims before starting.
GitHub Comments (2)
Claimed in #25 (@Quat3rnion).
Question for the maintainer, from the property-test work in #25: are AddressSpace range operations meant to be all-or-nothing?
Minimal repro on unmodified master (native Rust probe):
reserve(0 .. 2*PAGE_SIZE)
commit(0 .. PAGE_SIZE)
p = allocate_physical(1); map(PAGE_SIZE, &p)
# before: page 0 Committed, page 1 Mapped
decommit(0 .. 2*PAGE_SIZE) -> Err(MappedPage(0x10000))
# after: page 0 Reserved (already decommitted), page 1 Mapped
The call fails, but it has already changed page 0. release and unmap follow the same loop pattern. N1 does not say which behaviour is intended.
The #25 tests do not change any semantics. They model the current behaviour (the pages before the failing page are applied) in one named helper, labelled "mirrors current behaviour, not a documented contract". If you want these operations to be atomic (validate the whole range first), that is a separate fix, and I can claim it. Otherwise, the docs could state the prefix rule.
Issue Troubleshooting Threads (0)
No troubleshooting threads opened for this issue yet. If you hit a test, build, or navigation blocker, post what you've tried so fellow contributors can help.
PR Verification & Rewards
Sign in and link GitHub to verify your PR against this issue and earn XP + coins.
Contribution Workflow
Track your local progress before opening a pull request on GitHub.
Repository Context
Top Repository Paths
CONTRIBUTING.md Excerpt
Contributing
The three rules
- No game files, game-derived binaries or assets. Everything the renderer needs
from the title is supplied by the user at runtime or produced locally into a path
outside this repository. A pull request that adds a
.bin,.xvd, extracted texture, shader dump, frame capture or screenshot containing title content is rejected. Logs with addresses and counts are fine; dumps of title memory are not. - No DRM circumvention. Do not add code whose purpose is to break copy protection. Loading a user-supplied executable for interoperability is the scope; anything beyond that is out.
- Every merged change carries an evidence line. The commit message or the PR
description says how the change was verified: a command and its output, a test
name, or a log path under
docs/evidence/. "Should work" is not evidence.
Build
Prerequisites: Windows 10/11 x64, Rust 1.98.1 (see rust-toolchain.toml), a D3D12
capable GPU and the Windows SDK.
cargo build --locked
cargo test --workspace
The first milestone does not need the game. Later milestones that do need it will say
so in NEXT.md; never launch the title while another session holds the measurement
lock (C:\Users\Nix\Desktop\play-riptide.ps1 and the tools in public-v082\tools
document it).
Linux (Proton) local runs
Install the repository's Rust toolchain, the x86_64-pc-windows-gnu Rust target,
a MinGW-w64 cross linker, and Proton Experimental. The script uses Bash, GNU
coreutils, setsid, pgrep, and Bubblewrap (bwrap). Headless runs also need
Xvfb, xvfb-run, and xauth. If you cannot use Bubblewrap, pass --no-sandbox.
Use a dedicated Wine prefix with G: and T: free and Z: mapped to /. The
script initializes a new prefix if needed. Give each run a new cache directory
outside the checkout.
tools/run-bounded-proton.sh --exe "$TITLE_DIR/game_scarlett_master.exe" \
--prefix "$HOME/.local/share/riptide/proton-prefix" \
--cache "$HOME/.cache/riptide/run-1" --real-device --headless
Run only one title instance at a time. Label these results local Proton. They do not count as the gated run in PROCESS.md.
Picking a task
- Read
NEXT.md,PROCESS.mdanddocs/STATUS.md. - Check the claims before you pick anything:
powershell -File tools/claims.ps1(or
... (truncated)
Advisory PR Assistant
Helps structure your PR description or unpack reviewer feedback. Does not perform GitHub actions.