Skip to content

refactor: share bounded import accounting and attribution helpers - #51

Merged
kwisatzh merged 1 commit into
mainfrom
refactor/shared-import-primitives
Oct 14, 2026
Merged

kwisatzh merged 1 commit into
mainfrom
refactor/shared-import-primitives

Conversation

@kwisatzh

Copy link
Copy Markdown
Contributor

Summary

Extract shared internal helpers for exact decimal cost, keyed attribution and
bounded JSON decoding. Existing spend and inspect behavior is unchanged.

Eight byte-for-byte text/JSON goldens cover inspect, two-period spend, cache
comparison and session-budget review. Five legacy identity vectors freeze hash
bytes, including canonicalization edge cases. Goldens were generated and checked
against unchanged v0.8.0, then checked against the extraction.

Checks

  • Go 1.26.9 full race suite and vet pass.
  • Golden checks pass in an anonymous v0.8.0 clone and with this patch.
  • Inspect fuzz: 10,000 executions; spend-reader fuzz: 1,000 executions.
  • Linux arm64: all seven offline binary cases match with networking disabled.

First of two draft PRs. The separate Claude Code importer will target this branch;
this refactor introduces no new command or input format.

@kwisatzh
kwisatzh marked this pull request as ready for review October 14, 2026 00:12
@kwisatzh
kwisatzh merged commit a7dcb19 into main Oct 14, 2026
18 checks passed
@kwisatzh
kwisatzh deleted the refactor/shared-import-primitives branch October 14, 2026 00:13
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