Add JSON tags to ledger totals - #35
Conversation
GitHub doesn't expose repo secrets (CLAUDE_CODE_OAUTH_TOKEN) to PRs from forks, so the review action can't authenticate and the job always fails — a spurious red check on every external contribution (e.g. #35). Gate the job to same-repo PRs (head.repo.full_name == the repo) so fork PRs skip it cleanly instead. External PRs are still reviewable on demand: the maintainer comments "@claude", which runs claude.yml on issue_comment in the base-repo context where the secret is available (and is locked to prashar32).
|
Thanks for this, and welcome! 👋 This is exactly what #30 needed — json tags on One small thing before I merge: per CONTRIBUTING we record user-facing changes in the changelog. There's already a - **`audit export` totals used Go field names** — `LedgerTotals` now carries json
tags, so the `totals` object emits `runId`/`calls`/`promptTokens`/… like the rest
of the API. ([#30](https://github.com/prashar32/riskkernel/issues/30))Once that's in I'll squash it in. (You can ignore the red |
prashar32
left a comment
There was a problem hiding this comment.
Thanks for this, and welcome! 👋 This is exactly what #30 needed — json tags on LedgerTotals so audit export emits runId/calls/promptTokens/… in line with the rest of the API, plus a test that pins the marshaled shape. Cleanly scoped, it builds, and the tests pass.
One small thing before I merge: per CONTRIBUTING we record user-facing changes in the changelog. There's already a ### Fixed section under ## [Unreleased] in CHANGELOG.md — could you add this bullet to it?
- **`audit export` totals used Go field names** — `LedgerTotals` now carries json
tags, so the `totals` object emits `runId`/`calls`/`promptTokens`/… like the rest
of the API. ([#30](https://github.com/prashar32/riskkernel/issues/30))Once that's in I'll squash it in. (You can ignore the red review check — that's my automated reviewer, which can't run on PRs from forks; it isn't a required check.) Thanks again for the contribution!
Roll [Unreleased] into [0.1.2] and bump version markers (CLAUDE.md §13): - CHANGELOG: dated [0.1.2]; add the #30 audit-json-tags entry (credit @yzhkali, whose #35 merged without a changelog line); fresh empty [Unreleased]; links. - docs/VISION.md status → v0.1.2 (released). - internal/version/version.go default → 0.1.3-dev. - sdks/python pyproject + __init__ __version__ → 0.1.2. Contents: #34 (loop/time halt persists status), #30 (audit totals JSON keys), #47 (MCP audits blocked tools), #48 (memory extensionless lookup).
Summary
LedgerTotalsso audit export totals use API-style field namesCloses #30
Tests
go test ./internal/storagego test ./...