feat: add Crosscheck telemetry and exact-head reuse - #324
Merged
Conversation
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.
Intent
Deliver and land a seamless, non-disruptive Azure Crosscheck upgrade for Firstmate using regular GLM 5.2 only: add accurate core per-run telemetry and economics reporting; schema-constrained verdicts, prompt-by-file execution, caching affinity, and exact-head reuse; preserve fail-closed identity, evidence, exact-head, and Azure isolation guarantees; do not add Fast serving, spend caps, dashboards, a benchmark corpus, speculative batching, or Codex fallback-pricing work. Include the narrow live-acceptance fix that binds Pi verdict identity to the trusted host while retaining the independently verified exact-environment receipt. Validate with no-mistakes and green CI, then roll into Azure without interrupting active work and prove the live route end to end.
What Changed
economicscommand.Risk Assessment
Testing
The successful baseline was supplemented with focused end-to-end telemetry/economics/exact-head reuse validation and the executable Azure Crosscheck contract suite; local behavior, strict verdict handling, trusted-host Pi identity, and fail-closed isolation passed, but actual Azure rollout and live-route proof were outside this test phase and remain unverified.
Evidence: Azure Crosscheck executable contract evidence
Evidence: Telemetry, economics, and exact-head reuse evidence
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed ✅
tests/fm-crosscheck-azure.test.sh:88- This newly added assertion only reads the guest implementation and searches for a command string, violating the test-quality rule; it can pass for dead or unreachable text. Remove it or invoke the guest/public launcher and assert that the Pi reviewer runtime is actually executed with the expected observable result.🔧 Fix: Replace source-only Pi runtime assertion with behavioral coverage
✅ Re-checked - no issues remain.
if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fiBaseline already completed successfully by the outer executor:if [ "${FM_AZURE_VALIDATION_CELL:-0}" = 1 ]; then exec "$FM_AZURE_VALIDATION_SHARD_BRIDGE" behavior --count "${FM_AZURE_VALIDATION_SHARD_COUNT:-8}"; else exec bin/fm-no-mistakes-test-command.sh; fiFM_TEST_CASE=test_telemetry_economics_and_exact_head_reuse bash -x tests/fm-crosscheck.test.shtests/fm-crosscheck-azure.test.shManual inspection of the Azure evidence transcript for prompt-by-file execution, strict schema binding, regular GLM provider routing, trusted-host Pi identity, exact-head isolation, telemetry, and fail-closed rejection casesgit status --shortto confirm testing left the worktree unchanged✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Size Justification
The protocol implementation, adversarial tests, and operator docs are one coupled fail-closed change; splitting them would allow the host request, guest runtime, schema, reuse digest, and evidence contracts to drift across intermediate merges.