Skip to content

Rendering pipeline Stage 1: ownership ledger core + first ten tests#424

Merged
Juliusolsson05 merged 1 commit into
integration/rendering-pipelinefrom
feat/rendering-pipeline-stage1
Jul 6, 2026
Merged

Rendering pipeline Stage 1: ownership ledger core + first ten tests#424
Juliusolsson05 merged 1 commit into
integration/rendering-pipelinefrom
feat/rendering-pipeline-stage1

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

First implementation slice of the canonical rewrite plan. Zero app wiring — nothing imports src/renderer/src/rendering/ yet; this is the spec-first build (Stage 1).

What's in

Verification

  • vitest run --project unit src/renderer/src/rendering10/10
  • tsc -b node + tsc --noEmit web on main checkout — 0 errors

Test files are per the plan's explicit exemption (rendering/ IS its tests).

Next slices (same stage)

Candidate collectors from runtime state, committed projection (incl. synthetic-user-filtered #338), ghost predicate port (10-case matrix), and the first bundle-derived fixture directories.

🤖 Generated with Claude Code

…aring tests

First implementation slice of docs/rendering/rendering-rewrite-plan-
2026-07.md (Stage 1: spec-first build, zero app wiring — nothing
imports this yet).

model/types.ts — the ledger contract from plan §3: block-level
RenderCandidate (D2) with plural identity fields (no single id spans
providers; toolUseId reserved first-class for the subagent surface,
rule 14), the fixture-gated RenderReason enum (rule 15), the
ownership_decision debug schema (D5), and the UnknownBehavior
structured-finding contract with #115 redaction rules.

model/order.ts — the D4 ordering law: true chronological merge with
phase ranks, the trust-hierarchy timestamp comparison (null sorts
after timestamped, never as 'now'), and the five-way tiebreak. This is
the #239 buried-prompt fix at the model layer.

model/ownership.ts — committed-ownership suppression with the
suppress-vs-reorder discriminator (D3): whole-turn suppression is a
provider POLICY bit (claude true, codex/opencode false — an id-
presence heuristic would wrongly whole-turn-suppress opencode, whose
committed rows carry message ids; drift report item 12), exact/
normalized text keys (never prefix/fuzzy), itemId keys (#194), and
tool-use vs tool-result ownership kept separate (dump invariant 10).

model/ledger.ts — the composed pass with the D11 identity-stability
contract: unchanged input references return the previous ledger BY
REFERENCE (load-bearing for every Feed memo; the render-churn class).

__tests__/ledger.test.ts — ten tests, each naming the incident it
guards: #239 ordering, #170 resp_*/rollout text split, claude-vs-codex
whole-turn asymmetry (#165/#191), tool-use/result separation, #344
decisions-for-every-candidate, D11 reference equality. All green
(vitest unit project); tsc node+web 0 errors on main checkout.

Test files here are per the plan's explicit exemption from the no-new-
tests convention: src/renderer/src/rendering/ IS its tests (plan §4).

Next slices: committed projection + candidate collectors (from
runtime state), ghost predicate port, fixture corpus directories from
the real bundles (buried-prompt-239, opencode-interleave-87f0eeef,
ghost-matrix).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Juliusolsson05 Juliusolsson05 changed the base branch from main to integration/rendering-pipeline July 6, 2026 20:20
@Juliusolsson05 Juliusolsson05 merged commit de1d20e into integration/rendering-pipeline Jul 6, 2026
@Juliusolsson05 Juliusolsson05 deleted the feat/rendering-pipeline-stage1 branch July 6, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant