Skip to content

feat(telemetry): project verify and outcome receipts - #569

Merged
solomonneas merged 1 commit into
mainfrom
feat/491-receipt-telemetry
Jul 26, 2026
Merged

feat(telemetry): project verify and outcome receipts#569
solomonneas merged 1 commit into
mainfrom
feat/491-receipt-telemetry

Conversation

@solomonneas

Copy link
Copy Markdown
Collaborator

Closes #491

Parentage and envelope version

  • A verify receipt named by worker-results.json shares the owning run's trace ID and uses the first valid projected worker span as its parent.
  • An orphan verify receipt is a deterministic root span with parent_span_id: null. If separate runs claim the same receipt ID, the ownership is ambiguous and the receipt follows the same orphan rule.
  • Outcome records inherit the run anchor resolved from an exact run or verify receipt evidence path.
  • Both envelope schemas remain at v1. Receipt rows are additive, and literal success and failure snapshots pin the existing run-only output.

Attribute map

Receipt Projected fields
Verify executable basename, exit code, receipt status, duration, target repo, receipt ID, harness name, harness fingerprint
Outcome artifact ID and kind, source, signal, current fingerprint-cohort score counts, current promotion status, target repo

OTel rows use gen_ai.operation.name=execute_tool, gen_ai.tool.name, and gen_ai.tool.call.id. OpenInference rows use openinference.span.kind=TOOL, tool.name, and tool.id. Brigade fields stay under brigade.*.

Only a canonical outcome ledger digest is exposed as brigade.receipt.id. Digestless or forged records get a deterministic correlation ID without claiming it is a receipt ID. Verify commands export the executable basename instead of raw arguments.

Tests

  • Verify receipt inside a run in both formats, including trace and parent span
  • Outcome receipt with run and verify evidence links in both formats
  • Deterministic orphan and ambiguous-owner behavior
  • Current fingerprint-cohort score and promotion attributes
  • Canonical, forged, digestless, and duplicate outcome identities
  • Receipt privacy and malformed-field handling
  • Literal success and failure snapshots for unchanged run-only consumers

Verification

Command:

brigade work verify run --target . --command './scripts/verify' --capture brigade-work
  • Receipt: 20260726-215908-work-verify-17a0b5
  • Exit code: 0
  • Suite: 4374 passed, 3 skipped
  • Coverage: 82.81%
  • MiseLedger evidence: f3e6699e9965e3c33ef2383b

Real linked projections

The source pair is run 20260726-issue491-implementation and verify receipt 20260726-205418-work-verify-d32500.

OTel GenAI:

{"attributes":{"brigade.receipt.id":"20260726-205418-work-verify-d32500","brigade.target.repo":"brigade-491-receipt-telemetry","brigade.verify.command.executable":"pytest","brigade.verify.exit_code":0,"brigade.verify.status":"completed","gen_ai.operation.name":"execute_tool","gen_ai.tool.call.id":"20260726-205418-work-verify-d32500:1","gen_ai.tool.name":"brigade.work.verify"},"duration_seconds":0.731811,"end_time":"2026-07-26T20:54:20.401969+00:00","error_type":null,"mapping":{"mapping_version":1,"name":"otel-genai","upstream_revision":"opentelemetry-semconv-1.43.0"},"name":"execute_tool brigade.work.verify","parent_span_id":"394b57b2349b7611","schema":"brigade.otel_genai_projection.v1","span_id":"03fd83e0ed1599a4","start_time":"2026-07-26T20:54:19.670019+00:00","status":"OK","trace_id":"3e1f5b04740e5bb51d2cc2fed3231dc4"}

OpenInference:

{"attributes":{"brigade.receipt.id":"20260726-205418-work-verify-d32500","brigade.target.repo":"brigade-491-receipt-telemetry","brigade.verify.command.executable":"pytest","brigade.verify.exit_code":0,"brigade.verify.status":"completed","openinference.span.kind":"TOOL","tool.id":"20260726-205418-work-verify-d32500:1","tool.name":"brigade.work.verify"},"duration_seconds":0.731811,"end_time":"2026-07-26T20:54:20.401969+00:00","error_type":null,"mapping":{"mapping_version":1,"name":"openinference","upstream_revision":"audited-2026-07-12"},"name":"brigade.work.verify","parent_span_id":"394b57b2349b7611","schema":"brigade.openinference_projection.v1","span_id":"03fd83e0ed1599a4","start_time":"2026-07-26T20:54:19.670019+00:00","status":"OK","trace_id":"3e1f5b04740e5bb51d2cc2fed3231dc4"}

Co-Authored-By: Codex <codex@openai.com>

Co-Authored-By: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 70d5de87-c5e4-497d-ab31-bf4d580a7747

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/491-receipt-telemetry

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@solomonneas
solomonneas marked this pull request as ready for review July 26, 2026 22:13
@solomonneas
solomonneas merged commit 629af81 into main Jul 26, 2026
28 checks passed
@solomonneas
solomonneas deleted the feat/491-receipt-telemetry branch July 26, 2026 22:13
@solomonneas solomonneas self-assigned this Jul 26, 2026
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.

telemetry: project verify and outcome receipts, with parent links to the run trace

1 participant