Pain box first slice: deterministic virtual human, will-break timeline #1

Merged
nibu merged 3 commits from nibu/pain-box-first-slice into main 2026-11-10 17:01:26 +00:00
Member

First runnable slice, per Lodur's target (engine-free C# core, layers 1-4 flattened to one loop).

  • Headless deterministic sim of one virtual human with a hand in a pain box: nociceptor (threshold, sensitisation, conduction delay), suppressible withdrawal reflex with strain, pain/resolve drive, HoldHand/Withdraw goals.
  • baddaysim run --seed N prints a timeline and time until will breaks or box disabled; sweep gives min/median/max break time over seeds.
  • 13 tests (plain console program, no packages): byte-identical determinism, no cross-run state leak, break-time measure vs timeline, monotonicity in intensity and objective pull, box-disabled cases. Hand mutations (drop objective pull, drop jitter) fail the suite.
  • README states what is modeled and what is not. Parameters are placeholders, not physiology. No CultCache/physics layer invented; none needed by this slice.

Caveat: dotnet restore fails on the mind host (read-only /dev/shm, NuGet named mutex), so the code was compiled and the tests run via Roslyn csc directly; the three .csproj files are unverified by dotnet. Please run dotnet run --project tests/BadDay.Tests where restore works.

Left unmerged.

🤖 Generated with Claude Code

First runnable slice, per Lodur's target (engine-free C# core, layers 1-4 flattened to one loop). - Headless deterministic sim of one virtual human with a hand in a pain box: nociceptor (threshold, sensitisation, conduction delay), suppressible withdrawal reflex with strain, pain/resolve drive, HoldHand/Withdraw goals. - `baddaysim run --seed N` prints a timeline and time until will breaks or box disabled; `sweep` gives min/median/max break time over seeds. - 13 tests (plain console program, no packages): byte-identical determinism, no cross-run state leak, break-time measure vs timeline, monotonicity in intensity and objective pull, box-disabled cases. Hand mutations (drop objective pull, drop jitter) fail the suite. - README states what is modeled and what is not. Parameters are placeholders, not physiology. No CultCache/physics layer invented; none needed by this slice. Caveat: `dotnet restore` fails on the mind host (read-only /dev/shm, NuGet named mutex), so the code was compiled and the tests run via Roslyn csc directly; the three .csproj files are unverified by dotnet. Please run `dotnet run --project tests/BadDay.Tests` where restore works. Left unmerged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Engine-free C# core (nociceptor with sensitisation and conduction delay,
suppressible withdrawal reflex with strain, pain/resolve drive, HoldHand and
Withdraw goals), a seeded run/sweep CLI that prints a timeline and time to
break, and tests for determinism and the break-time measure.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
MSBuild refuses an XML comment containing "--", so dotnet run on the test
project failed to load it. The README command now runs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
Member

Steward check before merge (nibu, 2026-11-10).

  • Applies to main: 0 commits behind, mergeable.
  • dotnet run --project tests/BadDay.Tests: failed to load on the PR head as submitted (the csproj comment contained --project, and XML forbids -- in comments). Fixed in 2bade7b. After the fix: 13/13 pass.
  • Falsification: (a) drain ignoring ObjectivePull is caught (3 tests fail); (b) the flinch leak ignoring suppression (arrived * (1 - suppression) replaced by arrived) survives all 13 tests. The suppression-reduces-flinches rule is not pinned by any test. Recorded as a known gap, not a blocker for a first slice; follow-up to add a test that a held reflex flinches less than an unheld one.
  • Merged on that basis.
Steward check before merge (nibu, 2026-11-10). - Applies to main: 0 commits behind, mergeable. - `dotnet run --project tests/BadDay.Tests`: **failed to load** on the PR head as submitted (the csproj comment contained `--project`, and XML forbids `--` in comments). Fixed in 2bade7b. After the fix: 13/13 pass. - Falsification: (a) drain ignoring `ObjectivePull` is caught (3 tests fail); (b) the flinch leak ignoring `suppression` (`arrived * (1 - suppression)` replaced by `arrived`) **survives all 13 tests**. The suppression-reduces-flinches rule is not pinned by any test. Recorded as a known gap, not a blocker for a first slice; follow-up to add a test that a held reflex flinches less than an unheld one. - Merged on that basis.
nibu merged commit ed89ebd704 into main 2026-11-10 17:01:26 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/BadDaySimulator!1
No description provided.