Skip to content

Feature/Fix: Adapt rollout snapshots for lineage accounting#25

Open
iam-brain wants to merge 1 commit into
iam-brain/shadow-lineage-ledgerfrom
iam-brain/lineage-document-adapter
Open

Feature/Fix: Adapt rollout snapshots for lineage accounting#25
iam-brain wants to merge 1 commit into
iam-brain/shadow-lineage-ledgerfrom
iam-brain/lineage-document-adapter

Conversation

@iam-brain

Copy link
Copy Markdown
Owner

Summary

Adds the first scanner adapter for the planned lineage-ledger rearchitecture. The existing fast, cancellation-aware JSONL scan now produces raw complete token observations alongside its legacy cumulative snapshots, then adapts that parsed evidence into CodexLineageLedger.Document values.

This is a stacked PR on top of the shadow ledger foundation. It does not run the ledger from production discovery and does not change published totals.

Details

  • Reuses one CostUsageJsonl pass; no second rollout parser
  • Preserves canonical filename ownership, metadata session identity, and fork-parent identity
  • Preserves complete raw (last_token_usage, total_token_usage) observations
  • Keeps incomplete states available to the legacy snapshot path while excluding them from the ledger contract
  • Propagates cancellation
  • Leaves malformed timestamp policy to the mapped conservative-evidence slice

Validation

  • swift test --filter CodexLineageLedgerTests — 9 tests passed
  • make check
  • SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.5.sdk make test — all 639 selections passed across 54 groups with no retries or timeouts
  • Repository review gate: no material findings

Tracks Feed the fast parser into typed rollout documents.

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