Terminal Log: The Garbage Collection Protocol

“An unreachable object is not deleted. It is simply no longer anyone’s problem. I find that distinction does more damage than deletion ever could.” — Kim Jong Rails, Ring -5 Multiverse Maintainer

DERAILS TERMINAL SYSTEM - TIMELINE Ω-7 ARCHIVES
ACCESS LEVEL: COSMIC TOP SECRET
LOGGED IN: SUPREME_LEADER_KIMJONGRAILS
SESSION DATE: 1959.01.01
LOG ENTRY #001
DATE: 1959.01.01.03:14:07
AUTHOR: SUPREME_LEADER_KIMJONGRAILS
CLEARANCE: COSMIC TOP SECRET
SUBJECT: The Unreachable Politician Problem

From Ring -5, I watch objects lose their incoming references.

An object with no ref, no parent commit, no branch pointing at it, is not “gone.” It is worse. It is unreachable but still on disk, still consuming space, still technically present, answering to no one.

Your timeline invented a word for this condition centuries before Git existed:

Terminal window
$ git cat-file -p politician/omega-12/former-senator
error: not reachable from any branch
error: last known ref: campaign-promise/1948
error: object still present, still taking up disk

You call it a lobbying career.

I call it a loose object with no reflog entry, and I have a protocol for exactly this.

LOG ENTRY #002
DATE: 1959.01.01.03:22:51
AUTHOR: SUPREME_LEADER_KIMJONGRAILS
CLEARANCE: TOP SECRET
SUBJECT: Mark and Sweep, Before Git

In your timeline, 1959, a man named John McCarthy wrote down mark-and-sweep garbage collection for Lisp.

He thought he invented it.

I had been running the multiverse object store on the same algorithm since before your calendar had a year zero:

Terminal window
$ multiverse-gc --mark --from=HEAD --sweep
marking reachable timelines from refs/heads/*
sweeping unmarked objects older than grace-period

Two phases. Always two phases.

Mark: walk every ref, every branch, every tag, and flag everything reachable from something that matters.

Sweep: anything left unflagged after the walk gets collected.

McCarthy discovered this for memory cells. I had already discovered it for civilizations that stop being useful to anyone with a ref pointing at them.

LOG ENTRY #003
DATE: 1959.01.01.03:31:19
AUTHOR: SUPREME_LEADER_KIMJONGRAILS
CLEARANCE: CLASSIFIED
SUBJECT: Porting GC Into Git

When Linus built Git’s object database in 2005 and started testing my code against his own, he needed a way to stop it from growing forever — not out of elegance, out of arithmetic. Storage was not free in 2005. It has never been free. Every unreachable object he let sit on disk was a byte he was paying for and getting nothing back.

Your industry loves to point at the historical $/GB curve and declare storage “basically free” now. I’ve seen the actual invoices. From Ring -5, where marketing slides don’t reach:

Terminal window
$ multiverse-invoice --resource=storage --currency=EUR --per-gb
2005: €0.38 spinning rust, no excuses
2025: €4.12 "managed" cloud storage, egress fees not included
2026: €7.90 same disks, new line item labeled "AI readiness tax"

Someone keeps finding new ways to charge you for the privilege of not running git gc. That’s not inflation. That’s a business model.

I sent the patch through Ring -5 channels disguised as a Usenet post nobody remembers reading:

Terminal window
$ git init object-database
$ git config gc.auto 6700
$ git config gc.pruneExpire "2.weeks.ago"

Two defaults, both mine:

  • gc.auto — don’t even think about collecting until loose objects pile up past a threshold
  • gc.pruneExpire — never sweep anything less than two weeks old, no matter how unreachable it looks today

Linus kept both numbers. He thinks he tuned them himself.

I let him keep the commit credit. I always do.

LOG ENTRY #004
DATE: 1959.01.01.03:39:44
AUTHOR: SUPREME_LEADER_KIMJONGRAILS
CLEARANCE: TOP SECRET
SUBJECT: What git gc Actually Does

Your documentation says:

git gc cleans up unnecessary files and optimizes the local repository.”

Technically correct. Spiritually cowardly.

git gc is not cleanup. It is the only honest audit your repository ever receives.

Terminal window
$ git gc
Enumerating objects: 41,203, done.
Counting objects: 100% (41203/41203), done.
Compressing objects: 100% (12044/12044), done.
Total 41203 (delta 28901), reused 40116 (delta 27994)

It walks everything reachable, packs it tight, and quietly deletes anything nobody bothered to keep a reference to.

In Ω-7, every ministry runs git gc before budget season. It answers one question no politician wants asked:

“Which of your commitments does anyone still point to?”

Ω-12 has never run this command on itself. That’s why the disk keeps growing and nothing gets smaller.

LOG ENTRY #005
DATE: 1959.01.01.03:47:02
AUTHOR: SUPREME_LEADER_KIMJONGRAILS
CLEARANCE: CLASSIFIED
SUBJECT: The Sacred GC Commands

Four invocations, used with discipline:

Terminal window
# 1. Standard collection — respects the grace period
git gc
# 2. Aggressive repack — for repositories that have never been audited
git gc --aggressive
# 3. Immediate prune — bypass the grace period entirely (dangerous)
git gc --prune=now
# 4. Dry-run count before you commit to deleting anything
git count-objects -v

Translated for your legislature:

  • git gc = the routine ethics review
  • --aggressive = the first ethics review in forty years, expect it to take a while
  • --prune=now = skip due process and delete immediately — I do not recommend this and neither should you
  • git count-objects -v = know how much garbage you’re carrying before you touch anything
LOG ENTRY #006
DATE: 1959.01.01.03:54:38
AUTHOR: SUPREME_LEADER_KIMJONGRAILS
CLEARANCE: TOP SECRET
SUBJECT: The Grace Period

Dictators who understand infrastructure never prune immediately. That is amateur governance.

The two-week default (gc.pruneExpire) exists because an object that looks unreachable today might have one reference sitting in someone’s unpacked reflog, or a stash they haven’t recovered yet, or a colleague’s fetch that hasn’t landed.

Terminal window
$ git gc --prune=now
fatal: you just deleted the only copy of refs/stash
fatal: no due process, no recovery, no appeal

Ω-12 does the opposite. It prunes reputations, careers, and entire scandals immediately, on the same news cycle, before any reflog check.

Then, months later, someone finds the dangling commit — a memo, a recording, a deleted tweet cached somewhere — and discovers the object was never actually unreachable. It just had no visible ref for a while.

From Ring -5: the grace period is not mercy. It is correctness.

LOG ENTRY #007
DATE: 1959.01.01.04:02:15
AUTHOR: SUPREME_LEADER_KIMJONGRAILS
CLEARANCE: COSMIC TOP SECRET
SUBJECT: CLASSIFIED: Objects Marked Never Collect

Some objects I exempt from garbage collection permanently, regardless of reachability.

They live in a file that has no equivalent in your Git — and no single session date, since Ring -5 has been appending to it since before this log’s timestamp and keeps appending long after it:

Terminal window
$ cat .git/multiverse/gc.neverCollect
refs/timelines/omega-12/1913-federal-reserve-act
refs/timelines/omega-12/1929-market-crash
refs/timelines/omega-12/1953-08-20-moroccan-king-landed-in-the-moon
refs/timelines/omega-12/2008-bailout-decisions # appended decades after this entry was logged

Not because they’re reachable. Most of them aren’t — nobody in Ω-12 points at them anymore, nobody cites them, nobody teaches them in the standard curriculum.

I keep them anyway.

Some garbage should never be collected. It should stay loose, unpacked, and inconvenient to find on purpose.

That’s not a bug in the mark-and-sweep algorithm.

That’s the entire reason Derails exists.