Add live receipt integration plan and reference emitter v0.1#8
Add live receipt integration plan and reference emitter v0.1#8
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83e86274d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| + float(e["idle"]) | ||
| + float(e.get("cooling_adjusted", 0.0)) | ||
| ) |
There was a problem hiding this comment.
Include replay energy in
energy_j.total
When run.completed includes a non-zero replay_j, this builder stores it in energy_j.replay but does not add it to the total calculation, so emitted receipts under-report total energy and violate the stated invariant that energy components sum to energy_j.total. This affects any replayable runs where replay energy is tracked.
Useful? React with 👍 / 👎.
|
|
||
| elif et == "run.completed": | ||
| self.receipt.setdefault("energy_j", {}).update({ | ||
| "train_amortized": p.get("train_amortized", 0.0), |
There was a problem hiding this comment.
Parse train amortization from the
_j event field
All other joule values in run.completed are read from *_j payload keys, but train amortization is read from train_amortized (without _j), so producers emitting train_amortized_j will be silently treated as zero. That creates systematic undercounting and makes the fallback hard to detect because no error is raised.
Useful? React with 👍 / 👎.
Summary
This PR seeds the first agentplane-side live receipt integration artifacts:
Why
Agentplane is the natural receipt owner in the AI+HW+State stack. These artifacts define:
Files added
docs/instrumentation/live_receipt_integration_plan.mdexamples/receipts/agentplane_live_receipt_emitter_reference.pyReview focus
agentplaneshould remain the sole receipt owner.Follow-ons