fix(physics): restore relative slingshot response

A full comparison against the 175-record ledger found stale guessed coordinates
in both relative slingshot chains. Circles 56/58/71/73 and lines 57/59/72/74
were displaced by up to 70 pixels. The corrected record-57 geometry then
exposed a second issue: readable C and Rust had collapsed two independent
binary response projections into one.

Transcribe the accumulated initializer coordinates exactly. Use the
swapped-component projection only to sign the current tangential response
`abs(normal_velocity) * response_tangent`, and use the standard dot product for
`spin_delta * 0.02 * response_tangent`. Correct the readable C evidence and
Rust together, extend live tracing with the six-byte spin field, and seal the
stopped-Wine transition from `(75530,354765)/(3000,15)` to
`(77369,356597)/(1839,1832)` with Real48 spin `-5.28` in both harnesses.

Test Plan:
- stopped Wine 11.15 record-57 injection/trace -- matched position, velocity, and spin
- `cargo test --workspace --all-targets --all-features` -- 123 passed
- `cargo clippy --workspace --all-targets --all-features -- -D warnings` -- passed
- `bash original/tools/test_reconstructed_c.sh` -- passed
- `python3 original/tools/audit_reconstruction.py --require-complete` -- passed with zero incomplete or unclassified units
- `python3 -m py_compile original/tools/trace_original_state.py original/tools/inject_original_state.py` -- passed
- `rumdl check --flavor commonmark RECONSTRUCTION.md CHANGELOG.md` -- passed
- `git diff --cached --check` -- passed
This commit is contained in:
2026-08-23 20:28:29 +02:00
parent 9b56247c32
commit f79652bc9f
11 changed files with 222 additions and 49 deletions
+44 -12
View File
@@ -66,10 +66,10 @@ impl TableSegment {
96..=98 => 96,
99..=101 => 99,
102..=104 => 102,
109..=111 => 109,
112..=114 => 112,
115..=117 => 115,
118..=120 => 118,
109 => 109,
112 => 112,
115 => 115,
118 => 118,
_ => 0,
};
let (response_auxiliary, response_kick) = match id {
@@ -210,8 +210,8 @@ pub const WALLS: &[TableSegment] = &[
TableSegment::new(49, Vec2::new(33.0, 231.0), Vec2::new(10.0, 300.0)),
TableSegment::new(50, Vec2::new(12.0, 261.0), Vec2::new(12.0, 407.0)),
TableSegment::new(55, Vec2::new(59.0, 287.0), Vec2::new(107.0, 359.0)),
TableSegment::new(57, Vec2::new(49.0, 294.0), Vec2::new(2.0, 268.0)),
TableSegment::new(59, Vec2::new(44.0, 287.0), Vec2::new(44.0, 242.0)),
TableSegment::new(57, Vec2::new(97.0, 366.0), Vec2::new(50.0, 340.0)),
TableSegment::new(59, Vec2::new(45.0, 333.0), Vec2::new(45.0, 288.0)),
TableSegment::new(61, Vec2::new(37.0, 292.0), Vec2::new(37.0, 347.0)),
TableSegment::new(62, Vec2::new(37.0, 347.0), Vec2::new(110.0, 384.0)),
TableSegment::new(63, Vec2::new(92.0, 408.0), Vec2::new(19.0, 385.0)),
@@ -219,8 +219,8 @@ pub const WALLS: &[TableSegment] = &[
TableSegment::new(66, Vec2::new(112.0, 386.0), Vec2::new(141.0, 413.0)),
TableSegment::new(68, Vec2::new(130.0, 427.0), Vec2::new(97.0, 411.0)),
TableSegment::new(70, Vec2::new(267.0, 292.0), Vec2::new(267.0, 337.0)),
TableSegment::new(72, Vec2::new(261.0, 299.0), Vec2::new(214.0, 321.0)),
TableSegment::new(74, Vec2::new(252.0, 289.0), Vec2::new(302.0, 218.0)),
TableSegment::new(72, Vec2::new(261.0, 344.0), Vec2::new(214.0, 366.0)),
TableSegment::new(74, Vec2::new(205.0, 356.0), Vec2::new(255.0, 285.0)),
TableSegment::new(76, Vec2::new(292.0, 291.0), Vec2::new(292.0, 385.0)),
TableSegment::new(77, Vec2::new(292.0, 385.0), Vec2::new(221.0, 408.0)),
TableSegment::new(78, Vec2::new(205.0, 384.0), Vec2::new(275.0, 347.0)),
@@ -291,14 +291,14 @@ pub const PASSIVE_CIRCLES: &[StaticCircle] = &[
StaticCircle::new(42, Vec2::new(38.0, 183.0), 8.0),
StaticCircle::new(48, Vec2::new(25.0, 231.0), 8.0),
StaticCircle::new(54, Vec2::new(53.0, 292.0), 8.0),
StaticCircle::new(56, Vec2::new(50.0, 287.0), 8.0),
StaticCircle::new(58, Vec2::new(52.0, 287.0), 8.0),
StaticCircle::new(56, Vec2::new(98.0, 359.0), 8.0),
StaticCircle::new(58, Vec2::new(53.0, 333.0), 8.0),
StaticCircle::new(60, Vec2::new(29.0, 294.0), 10.0),
StaticCircle::new(65, Vec2::new(103.0, 397.0), 15.0),
StaticCircle::new(67, Vec2::new(134.0, 419.0), 9.0),
StaticCircle::new(69, Vec2::new(260.0, 292.0), 8.0),
StaticCircle::new(71, Vec2::new(260.0, 291.0), 8.0),
StaticCircle::new(73, Vec2::new(261.0, 291.0), 8.0),
StaticCircle::new(71, Vec2::new(260.0, 336.0), 8.0),
StaticCircle::new(73, Vec2::new(214.0, 358.0), 8.0),
StaticCircle::new(75, Vec2::new(284.0, 292.0), 9.0),
StaticCircle::new(80, Vec2::new(210.0, 397.0), 15.0),
StaticCircle::new(82, Vec2::new(179.0, 419.0), 9.0),
@@ -411,6 +411,38 @@ mod tests {
assert_eq!(shooter_wall.segment.end, Vec2::new(328.0, 58.0));
}
#[test]
fn relative_slingshot_chains_match_the_initialized_record_ledger() {
for (id, expected_start, expected_end) in [
(55, Vec2::new(59.0, 287.0), Vec2::new(107.0, 359.0)),
(57, Vec2::new(97.0, 366.0), Vec2::new(50.0, 340.0)),
(59, Vec2::new(45.0, 333.0), Vec2::new(45.0, 288.0)),
(70, Vec2::new(267.0, 292.0), Vec2::new(267.0, 337.0)),
(72, Vec2::new(261.0, 344.0), Vec2::new(214.0, 366.0)),
(74, Vec2::new(205.0, 356.0), Vec2::new(255.0, 285.0)),
] {
let wall = WALLS
.iter()
.find(|wall| wall.id == id)
.expect("relative line record must be present");
assert_eq!((wall.segment.start, wall.segment.end), (expected_start, expected_end));
}
for (id, expected_center) in [
(54, Vec2::new(53.0, 292.0)),
(56, Vec2::new(98.0, 359.0)),
(58, Vec2::new(53.0, 333.0)),
(69, Vec2::new(260.0, 292.0)),
(71, Vec2::new(260.0, 336.0)),
(73, Vec2::new(214.0, 358.0)),
] {
let circle = PASSIVE_CIRCLES
.iter()
.find(|circle| circle.id == id)
.expect("relative circle record must be present");
assert_eq!(circle.center, expected_center);
}
}
#[test]
fn every_recovered_wall_has_its_registered_one_sided_contact() {
for wall in WALLS {