# Who Actually Built This: The Contributor Dossier

> The repo's CHANGELOG attribution tells a richer story than the README credits. Core author @jalehman (Josh Lehman, Martian Engineering) owns the majority of commits, but notable patches came from @100yenadmin (compaction bounds, image externalization, session deduplication), @0xopaque (bootstrap replay hardening), @jetd1 (live-input preservation, stat-fail placeholder seeding), @castaples (Bedrock empty-content fix), and @holgergruenhagen (Discord description truncation). The project also ships a TUI component written in Go (go.mod path github.com/Martian-Engineering/lossless-claw/tui) that is referenced in specs but not present in this repo.

- Repository: Martian-Engineering/lossless-claw
- GitHub: https://github.com/Martian-Engineering/lossless-claw
- Human wiki: https://grok-wiki.com/public/wiki/martian-engineering-lossless-claw-a94e8135853e
- Complete Markdown: https://grok-wiki.com/public/wiki/martian-engineering-lossless-claw-a94e8135853e/llms-full.txt

## Source Files

- `CHANGELOG.md`
- `specs/historical-session-backfill.md`
- `specs/lossless-claw-rename-spec.md`
- `RELEASING.md`

---

<details>
<summary>Relevant source files</summary>
The following files were used as context for generating this wiki page:

- [CHANGELOG.md](CHANGELOG.md)
- [RELEASING.md](RELEASING.md)
- [specs/historical-session-backfill.md](specs/historical-session-backfill.md)
- [specs/lossless-claw-rename-spec.md](specs/lossless-claw-rename-spec.md)
- [tui/go.mod](tui/go.mod)
- [tui/main.go](tui/main.go)
- [tui/README.md](tui/README.md)
</details>

# Who Actually Built This: The Contributor Dossier

The CHANGELOG is a better biography of this project than the README. It names real people, real PRs, and real production bugs — and it reveals a tight inner circle, a handful of well-timed outside patches, and at least one identity mystery worth noting. What follows is the story the commit log actually tells.

One meta-quirk to know upfront: the project's Changesets workflow means changelog entries are attributed to *whoever opened the PR that includes the changeset file* — not necessarily who wrote the code. The maintainer [explicitly called this out in v0.9.4](#changelog-quirks), retroactively crediting `@jalehman` for a PR that had shipped without his name attached. The contributor table below reflects attributed PRs, not necessarily lines of code.

---

## @jalehman (Josh Lehman, Martian Engineering) — The Architect

**69 attributed PRs** across all versions, making him the dominant force in the CHANGELOG by a factor of 2.5x over the next contributor.

Josh owns the deep plumbing: the cache-aware compaction scheduler, the bootstrap reconcile loop, the `afterTurn` pipeline, the session-file rotation system, the `lcm_*` tool registrations, and the TUI's repair/rewrite/backfill/transplant subsystems. He also owns the embarrassing bugs — the stale `clearStableOrphanStrippingOrdinal` call in v0.11.2 was his, left over from an earlier refactor of the cache-state-dependent assembly path. His fix message is deadpan: "Remove a stale stable-orphan invalidation call."

A sampling of his defining contributions:

| Version | PR | What it did |
|---|---|---|
| v0.11.2 | [#714](https://github.com/Martian-Engineering/lossless-claw/pull/714) | Removed ghost `clearStableOrphanStrippingOrdinal` call that crashed transcript reconcile |
| v0.11.0 | [#692](https://github.com/Martian-Engineering/lossless-claw/pull/692) | Introduced `/lossless focus <prompt>`, focus brief generation, and the full unfocus/refocus lifecycle |
| v0.10.0 | [#661](https://github.com/Martian-Engineering/lossless-claw/pull/661) | Preserved hot prompt-cache deferral for OpenAI GPT models; raised critical budget pressure ratio to 0.90 |
| v0.9.0 | [#592](https://github.com/Martian-Engineering/lossless-claw/pull/592) | Automated session-JSONL rotation with backup-backed safety guardrails and startup scan limits |
| v0.8.1 | [#380](https://github.com/Martian-Engineering/lossless-claw/pull/380) | Stopped re-running startup backfills that had already completed |
| 0.7.x | [#400](https://github.com/Martian-Engineering/lossless-claw/pull/400) | Stripped JSDoc comments from `dist/index.js` so OpenClaw's install-time safety scanner stopped flagging "Fetch all context items" as an env-harvesting network pattern |

Sources: [CHANGELOG.md](CHANGELOG.md) — `Thanks [@jalehman]` lines throughout

---

## @100yenadmin — The Compaction Specialist

**28 attributed PRs**, all of them surgical corrections to the compaction engine and ingest pipeline. This contributor's fingerprints are on every place where "it worked, but only until a long session" — and they consistently shipped the fix before production burned down.

Their greatest hits:

- **Compaction livelock fix (v0.9.3, [#557](https://github.com/Martian-Engineering/lossless-claw/pull/557))** — Fixed a silent livelock where mutation-sensitive providers (Anthropic, Codex, Copilot) would keep refreshing `lastCacheTouchAt` so the cache TTL never expired, deferred compaction never fired, and the runtime emergency overflow handler was left to do everything. The fix adds a critical-pressure escape at 70% token budget.

- **Compaction-sweep bounds (v0.11.2, [#712](https://github.com/Martian-Engineering/lossless-claw/pull/712))** — Added `maxSweepIterations` (default 12) and `sweepDeadlineMs` (default 120,000 ms) to prevent `compactFullSweep` from hanging an agent turn indefinitely. Both are configurable via `LCM_MAX_SWEEP_ITERATIONS` / `LCM_SWEEP_DEADLINE_MS`.

- **Image externalization generalization (v0.11.0, [#573](https://github.com/Martian-Engineering/lossless-claw/pull/573))** — Extended the native-image-block externalizer from user-role-only to assistant, system, tool, and toolResult messages, closing a gap left by v0.9.3.

- **Deferred compaction as default (v0.8.x, [#408](https://github.com/Martian-Engineering/lossless-claw/pull/408))** — Introduced explicit maintenance debt tracking so foreground turns no longer run threshold compaction inline.

- **`afterTurn` empty-batch skip fix (v0.9.x, [#621](https://github.com/Martian-Engineering/lossless-claw/pull/621))** — Fixed a subtle early-return that meant conversations could grow well past `contextThreshold` when `deduplicateAfterTurnBatch` removed every new message. The fix threads compaction evaluation through even when the ingest batch is empty.

The changelog note on [#574](https://github.com/Martian-Engineering/lossless-claw/pull/574) is the most revealing: `@100yenadmin` retroactively added a changelog entry crediting `@jalehman` for a PR that had been attributed to `@100yenadmin`'s own changeset. That's an unusually honest attribution correction.

Sources: [CHANGELOG.md](CHANGELOG.md) — `Thanks [@100yenadmin]` lines; [RELEASING.md:26-32](RELEASING.md)

---

## @jetd1 — The Transcript Continuity Fixer

**6 attributed PRs**, all targeting the same narrow, painful failure mode: what happens when OpenClaw *changes* the JSONL file out from under LCM mid-session.

- **[#688](https://github.com/Martian-Engineering/lossless-claw/pull/688)** — Preserved unpersisted inter-session live input when assembling context from the durable DB frontier. The problem: if a user typed something before the session was fully persisted, that input vanished on context assembly.

- **[#685](https://github.com/Martian-Engineering/lossless-claw/pull/685)** — Seeded a placeholder `conversation_bootstrap_state` row in the `afterTurn` slow-path stat-fail branch so the *next* turn can recover instead of crashing blind.

- **[#659](https://github.com/Martian-Engineering/lossless-claw/pull/659)** — Handled the case where OpenClaw rewrites a session JSONL in-place and the bootstrap checkpoint now points past the new file end. LCM previously tried to read past EOF silently; the fix treats it as an epoch rollover.

- **[#403](https://github.com/Martian-Engineering/lossless-claw/pull/403)** — Moved bootstrap file I/O off the Node.js event loop entirely. Previously `readFileSegment` and `readLastJsonlEntryBeforeOffset` used synchronous `openSync`/`readSync`/`statSync`, which could block the gateway for minutes on multi-MB JSONL transcripts.

- **[#649](https://github.com/Martian-Engineering/lossless-claw/pull/649)** — Preserved continuity when OpenClaw switches to a new transcript file for the same session key, treating it as a new transcript epoch rather than a broken checkpoint.

Sources: [CHANGELOG.md](CHANGELOG.md) — `Thanks [@jetd1]` lines in v0.10.0, v0.11.0

---

## @0xopaque — One PR, One Real Problem

**1 attributed PR**, but it's a meaningful one.

- **[#640](https://github.com/Martian-Engineering/lossless-claw/pull/640) (v0.10.0)** — Prevented bootstrap from replaying prior transcript rows as fresh LCM messages. The fix adds replay-shaped-tail filtering in bootstrap append/reconcile, rejects same-timestamp prior-content floods at the message-write layer, and wraps ingest batches in transactions. This is exactly the kind of patch that prevents subtle database corruption in production sessions.

Sources: [CHANGELOG.md](CHANGELOG.md) — v0.10.0 section

---

## @castaples — The AWS Bedrock Bridge

**1 attributed PR**, fixing a production incompatibility with Amazon Bedrock.

- **[#606](https://github.com/Martian-Engineering/lossless-claw/pull/606)** — Fixed `messages.0 is empty` Bedrock Converse rejections by extending the empty-content filter from `assistant`-only to `user` and `toolResult` roles. The new `isEmptyMessageContent` helper handles empty arrays, empty strings, null, and undefined for any role. Without this, any user or tool-result message with a briefly-empty content array would reach Bedrock and trigger a hard rejection: *"The content field in the Message object at messages.N is empty."*

Sources: [CHANGELOG.md](CHANGELOG.md) — v0.9.4 / v0.10.0 boundary

---

## @holgergruenhagen — The Discord One-Liner

**2 attributed PRs**, both quality-of-life patches.

- **[#672](https://github.com/Martian-Engineering/lossless-claw/pull/672)** — Shortened the `/lossless` native command description because Discord truncates command descriptions at a character limit during slash-command registration, making the command unusable in Discord integrations.

Sources: [CHANGELOG.md](CHANGELOG.md) — v0.11.1 section

---

## The Wider Long Tail

Beyond the inner circle, the CHANGELOG names a dozen more one-off contributors — each fixing a specific production edge case they personally encountered:

| Handle | Contribution |
|---|---|
| @GodsBoy (4 PRs) | Bootstrap re-read avoidance, compaction cap fixes, prompt-aware eviction fallback, Codex OAuth docs |
| @mvanhorn (3 PRs) | Conversation prune function, LLM startup diagnostics to stderr, `lcm_expand_query` token accounting docs |
| @liu51115 (3 PRs) | CJK timestamp parsing, auth circuit-breaker isolation, defensive `.trim()` crash fix |
| @ryanngit (2 PRs) | Conversation creation race fix, SQLite busy-timeout increase to 30 seconds |
| @semiok (2 PRs) | CJK full-text search fallback via LIKE, 60-second LLM call timeout protection |
| @jeremyheslop | `contracts.tools` declaration in `openclaw.plugin.json` so OpenClaw 2026.5.2 accepts the plugin |
| @andyylin | Context-engine registration alignment after the `openclaw-lcm` → `lossless-claw` rename |
| @tingyiy | Explicit timezone offset preservation for stored timestamps |
| @catgodtwno4 | Auth-error detection fix for nested `data`/`body` envelopes |
| @vincentkoc | Single mention, version unknown |

Sources: [CHANGELOG.md](CHANGELOG.md) — minor-version sections throughout

---

## The Ghost Repo: The Go TUI That Lives Here

The rename spec planted a flag: `tui/go.mod:1` should read `module github.com/Martian-Engineering/lossless-claw/tui`. It does. The TUI is **present in this repo** at `tui/`, not absent — the spec description noting it is "not present in this repo" is out of date.

The TUI is a full Go application using [Bubble Tea](https://github.com/charmbracelet/bubbletea) and ships as the `lcm-tui` binary. It includes interactive screens for agents, sessions, conversations, summaries, files, context, focus briefs, and Codex context comparison. The `backfill.go` file implements the historical session import described in [specs/historical-session-backfill.md](specs/historical-session-backfill.md), which requires calling the same compaction DAG logic from Go that the TypeScript plugin runs at runtime.

```
tui/
├── main.go          ← Bubble Tea screens: agents, sessions, conversation, summaries, files, context, focus_briefs, codex_context_compare
├── backfill.go      ← Historical JSONL import + Go-side compaction loop
├── repair.go        ← Anthropic client + repair workflow
├── rewrite.go       ← Summary rewrite flow
├── transplant.go    ← DAG transplant between conversations
├── dissolve.go      ← Conversation dissolution
├── doctor.go        ← Diagnostic + apply workflow
├── data.go          ← Session parsing + normalization
├── prompts.go       ← Prompt rendering (shared with plugin)
└── go.mod           ← module github.com/Martian-Engineering/lossless-claw/tui
```

Sources: [tui/go.mod:1](tui/go.mod), [tui/main.go:22-29](tui/main.go), [tui/README.md:1-20](tui/README.md), [specs/historical-session-backfill.md:47-103](specs/historical-session-backfill.md)

---

## The Release Attribution Quirk

RELEASING.md makes a structural admission that shapes how to read any contributor count: *"For external PRs, do not expect the contributor to know or run the Changesets workflow. The reviewer or merge maintainer should add the changeset before merge."* This means the CHANGELOG headline attribution reflects who *merged* the changeset file, not always who wrote the code. The explicit retroactive note in v0.9.4 — where `@100yenadmin` credited `@jalehman` for a PR the changelog had silently swallowed — is the clearest example of the seams showing.

The practical upshot: the 69 `@jalehman` entries are a floor, not a ceiling. His actual code surface is likely larger. Similarly, one-time external contributors may have shipped the fix while a maintainer added the changelog entry.

Sources: [RELEASING.md:26-35](RELEASING.md), [CHANGELOG.md](CHANGELOG.md) v0.9.4 entry for PR [#574](https://github.com/Martian-Engineering/lossless-claw/pull/574)
