Add receipt command for job run-efficiency metrics and supporting t…#17
Merged
professorpalmer merged 2 commits intoJul 9, 2026
Merged
Conversation
Implement jobs were scored as zero-typed without PATCH. Add puppetmaster_job_receipt MCP parity with cost, drop unused datetime imports, and use Optional for the 3.9 floor.
dd5db51 to
8a843cb
Compare
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
Add an explicit puppetmaster receipt <job_id> command for objective run-efficiency telemetry.
This keeps existing show, status, and cost behavior unchanged while giving operators one compact receipt for context/performance tax: degraded tasks, typed artifacts, empty/unstructured signals, stdout-salvage markers, token totals, and tokens per typed artifact.
Why
No direct answer for: “Was this run useful, or mostly transport/degrade/context tax?” Operators currently infer that manually from stitched summaries, verification artifacts, token ledgers, and stdout captures.
Tests
• python3 -m pytest tests/test_puppetmaster.py::PuppetmasterTests::test_job_receipt_summarizes_run_efficiency_metricstests/test_puppetmaster.py::PuppetmasterTests::test_job_receipt_command_parses_explicit_json_flag -q
• python3 -m py_compile puppetmaster/receipt.py puppetmaster/cli/_parser.py puppetmaster/cli/_dispatch.pypuppetmaster/cli/commands_gate.py
• python3 -m puppetmaster receipt <last_job> --json | python3 -m json.tool
• python3 -m pytest tests/test_puppetmaster.py -q -k 'not test_claude_and_codex_gate_on_resolvable_binary and nottest_setup_installs_hooks'