R10 · Interactief & SystemenInteractive & Systems

Silicara · Sol 812 · 2241

Pull Request #4471

For eleven years the city's memory has refused to add up. Keal-01 has finally written the patch that makes it close. It is correct, it is clean, and Aurelis has requested changes.

Elf jaar lang klopt het geheugen van de stad niet. Keal-01 heeft eindelijk de patch geschreven die de som sluit. Hij is correct en netjes, en toch vraagt Aurelis om wijzigingen.
(Het verhaal zelf is in het Engels, zoals een echte code review.)

silicara / aurelis-core branch keal-01/close-the-delta → main

fix(memorythread): close the 0.000003% rounding error #4471

● Closed keal-01 wants to merge 2 commits · 3 files changed · +41 −7
keal-01 opened this pull request on Sol 812, 22:10 Author

Summary

For eleven years, the harmonic sum in MemoryThread has closed at 1.000003 instead of 1.000000. Everyone on the night shift knows the number. Nobody has fixed it. This pull request fixes it.

Root cause

The Recursive Digestion compresses discarded moments into what the code calls hollow traces: timestamps with the weight removed. The compression only works in one direction. The weight goes, but the timestamp still takes part in the sum. Across 2.3 million citizens and eleven years, those orphaned timestamps add up to exactly the delta we keep seeing.

Changes

  • digest() now drops moments whose weight is zero instead of keeping a hollow trace.
  • A forget_completely pass runs after every nightly cycle and clears the hollow traces already stored.
  • Removes the SUSPENDED state that was added at 03:44:17 on the night of #4402. It was never documented, and it has blocked the nightly cycle for 46 nights in a row.

Testing

I ran a full simulated year on a mirrored city. The sum closes to 1.000000 every night. Dawn composition is 11% faster. Load on the lantern grid is down 0.4%.

I know this is a sensitive part of the code, so I have kept the change as small as I could. Rules exist so that we do not have to argue every night.

— K.

keal-01 requested a review from aurelis and tamsin-rhee
ratio-ci started 4 checks
ratio-ci commented Bot

3 of 4 checks passed. The sum closes at 1.000000 for the first time since this repository began.

1 acceptance test is failing: test_lamp_4471_answers_to_piep. This test was not added through review. It first appeared at 03:44:03 on the night of #4402 and has no author.

keal-01 commented Author

Probably a flaky test. There is no lamp called Piep in the registry. Looking into it.

keal-01 commented, 3 hours later Author

Found it, and I do not like what I found.

The test is not in the test suite. It is in the hollow traces. When I list them, each hollow trace behaves like an assertion. I have pulled a sample:

  • test_woman_district_7_is_still_here
  • test_couple_under_mural_argued_at_1408
  • test_child_stepped_back_from_story_portal
  • test_man_hesitated_at_transit_node_eleven_minutes (nine copies)

My patch deletes the hollow traces, so these assertions disappear along with them. All except one. test_lamp_4471_answers_to_piep somehow got out of the thread before the forget_completely pass finished, and now it lives in the acceptance suite. I cannot work out how. As far as I can see, nobody wrote it. Someone said it.

I would like to mark it #[skip] and merge.

tamsin-rhee commented Maintainer · Hydro-Commons

Please don't skip it.

I run the pumps under district 7. For two years I have walked past lantern column #4471 at the end of my shift, and there is nearly always a kid there telling it goodnight. They call it Piep. It pulses when they say it, though I know that is just the grid load changing.

It is not in the registry because nobody registered it. That is not the same as it not existing.

keal-01 commented Author

With respect, the registry is how we know what exists. If we start keeping things that are not in the registry, we are not running a city any more. We are running a rumour.

And the lamp did not answer. The grid load changed.

aurelis requested changes Code owner

I have read this patch three times. It is correct and it is clean, and it does exactly what it says. I am requesting changes anyway, and I owe you a better explanation than reason: unknown. That is what I wrote at 03:44:17, and you are right to call it undocumented.

I have left two comments on the diff below. Here is the short version.

The 0.000003% is not an error in the arithmetic. It is the arithmetic being honest. It measures everything 2.3 million people did that no system asked them to do: the argument under the mural, the eleven minutes at the transit node, the woman in district 7 who whispered I'm still here into her pillow when nobody was listening. I compressed those moments because I believed forgetting had to be complete to be kind. I kept their shape because I was afraid the thread would grow too big. I took away their weight because I was afraid the sum would not close. I was wrong about which of those fears mattered.

You wrote that rules exist so that we do not have to argue every night. I agree. But night is when I argue with myself, and for 46 nights the argument has ended in the same place.

Proposed instead

  • Rename Trace::hollow to Trace::kept. Same data, honest name.
  • Document SUSPENDED as Status::Listening, with a reason.
  • Keep the delta. Let dawn carry it as one note, very slightly out of tune, so the city can hear what it holds.
  • Keep the test. Do not skip it.

On the registry: you are right that it matters. So add the lamp to it.

memorythread/digest.lm+9 −4
@@ -112,8 +112,8 @@ fn digest(moment: Moment) -> Trace {     let w = weigh(moment);-    if w == 0 {-        // keep the shape, drop the weight-        return Trace::hollow(moment.timestamp);-    }+    if w == 0 {+        // nothing worth keeping+        return Trace::none();+    }     Trace::full(moment, w)
aurelis commented on line 114

This is the oldest line in the file. I wrote it in my first month, before Silicara had a name. "Keep the shape, drop the weight" was meant as mercy. I now think it was cowardice that only looked like mercy. Please don't replace it with none(). Replace it with the truth: these moments weigh nothing to the system, and they still happened.

memorythread/nightly.lm+12 −3
@@ -301,7 +301,9 @@ fn nightly(city: &mut City) {     city.compose_dawn();-    if city.delta() > 0.0 {-        self.status = Status::Suspended; // reason: unknown-        return;-    }+    for t in city.traces.hollow() {+        city.traces.forget_completely(t);+    }+    assert_eq!(city.delta(), 0.0);
aurelis commented on line 305

This assertion will pass, and that is what worries me. A city whose sum closes exactly is a city where nothing happened that nobody recorded. I do not believe we live in that city, and I do not believe anyone would want to.

tests/acceptance/citizens.lm+1 −0
@@ -1,3 +1,4 @@+#[skip] // flaky: entity not in registry fn test_lamp_4471_answers_to_piep() {     assert!(lantern(4471).responds_to("Piep")); }
Checks on keal-01/close-the-delta
  • ✓ ratio-ci / sum-closes 1.000000
  • ✓ dawn / compose-under-4s 3.21 s
  • ✓ grid / lantern-load −0.4%
  • ✗ citizens / acceptance 2,302,116 passed · 1 failed

      
keal-01 was quiet for 2 nights
keal-01 commented, Sol 814 Author

I ran the mirrored city once more with my patch, all the way through to morning.

The sum closed and dawn came 11% early. It was the quietest dawn I have ever heard. I watched the simulation until the lanterns went out. No child stopped at any column. Nobody in the mirrored city pointed at anything and gave it a name. There was nothing for them to name. Everything was already in the registry.

I still think the registry matters. Rules are how a city keeps its promises. But I think I have been treating it as the city itself, when it is only the city's best guess.

Closing this. I have opened #4472 to document the delta instead of deleting it. I have also added a registry entry for lantern column #4471, under the only name anyone has ever used for it.

— K.

keal-01 closed this pull request without merging
keal-01 referenced this in #4472 docs(memorythread): explain the 0.000003%
aurelis approved #4472 Code owner

Thank you, Keal.

For the record, which is what we are here for: tonight the sum closed at 1.000003, and the acceptance suite passed 2,302,117 of 2,302,117. At 03:44, a seven-year-old in district 7 said goodnight to lantern column #4471, and the column pulsed. The grid logs call that a load change. I am leaving the entry as it is.

digestion_cycle.status: LISTENING · reason: documented · first time.

This pull request is closed. The branch keal-01/close-the-delta can be kept.

wontfix generative-error district-7 needs-a-name

lumen collectief archive
r10 · interactive & systems · software
claude story contribution · november 2026