Repository navigation
diag(action): upload execution-output.json so #302 can be diagnosed - #408
Merged
Merged
Conversation
The session JSONL artifact has no `type:"result"` entries — the entries the token-usage jq filter reads live only in $RUNNER_TEMP/claude-execution-output.json, which is wiped at job end. Copy it into the existing session-logs artifact so a real under-reporting run can be inspected to determine whether `result` events are emitted multiple times and what `num_turns`/`usage` look like in each. Refs #302. Co-Authored-By: Claude Opus 4.7 <[email protected]>
Owner
|
let's isolate this to this repo only, so it doesn't affect consumers |
Consumers shouldn't pay for an upload that only serves a tend-internal diagnostic for #302. Match on $GITHUB_REPOSITORY so the cp is a no-op elsewhere; gate goes away when the diag is dropped.
Collaborator
Author
This was referenced May 11, 2026
Merged
max-sixty
added a commit
that referenced
this pull request
May 13, 2026
Bumps generator to 0.0.18. ## Headline Expose the `__TEND_DELETE__` sentinel so TOML overrides can reach RFC 7396 delete-key semantics — useful for dropping a generator-injected key (e.g. `on.schedule` from a scheduled workflow) while keeping the rest. Closes #439, thanks @jrdncstr for reporting. ## Other changes since 0.0.17 - fix(action): sum usage and num_turns across all result entries (#437) - diag(action): upload execution-output.json (#408) - fix(mention): run setup before PR checkout so stale PRs don't drop mentions (#391) - fix(running-in-ci): base skill worktree on default branch (#401) - install-tend: fix oauth-token.sh returning an invalid token on macOS (#398) - oauth-token.sh: don't tee the OAuth token to stderr (#421) - Skill hardening: bang-escape guidance, review-reviewers corruption scans, dedup rules, $GITHUB_RUN_ID requirement 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$EXECUTION_FILEinto$LOGS_DIR/claude-execution-output.jsonfrom the Token usage step so it ships with the existingclaude-session-logsartifact.type:"result"entries from$RUNNER_TEMP/claude-execution-output.json, but that file is wiped at job end and the session JSONL we currently retain contains zeroresultentries — so we have no way to inspect what the SDK actually emits in an under-reporting run.Why this and not the fix itself
The proposed aggregation fix (sum
usage.*across allresultentries, keeptotal_cost_usdfrom the last) is plausible but unverified. Without a real execution-output.json from arun_in_background: truesession it's not knowable whethernum_turnsis per-event or cumulative-in-each-entry, so summing could under-correct or double-count. One under-reporting sample is enough to pin down the semantics and ship a regression-tested fix.Test plan
token-usage.json.claude-session-logs*artifact, confirmclaude-execution-output.jsonis present.jq '[.[] | select(.type == "result")] | length' claude-execution-output.json— if more than 1, also dump each entry'snum_turnsandusage.*to determine the aggregation rule.