Skip to content

[trajectory-grader] Implement event-entropy-rate #56458

Description

@github-actions

Caution

Protected files were modified in this change.
This pull request is in request_review mode and requires explicit human scrutiny before merge.

Protected files: README.md, .github/workflows/shared/graders/README.md, .github/workflows/shared/graders/event-entropy-rate.md

Implements event-entropy-rate (Tier 1, rank 10) from the trajectory graders catalog, 6 of 25 catalog graders implemented.

What it computes

Normalized first-order (bigram, previous-symbol-conditioned) Shannon entropy rate H(X_t | X_{t-1}) of the ordered canonical event symbol sequence, projected purely from the Trajectory IR's events[]. tool_call events are qualified by their ref (finer alphabet granularity); other events use their kind. Normalized by log2(alphabetSize) to stay in [0, 1] and remain comparable across traces with different event alphabets.

Why it's distinct from existing built-in graders

Built-in graders (tool-success-rate, retries, loops, trajectory-efficiency, execution-step-count, execution-duration) measure counts, durations, and success ratios but not information-theoretic diversity/unpredictability of the event process. event-entropy-rate differs from a raw distinct-event-kind count and from the existing recurrence graders (recurrence-rate, recurrence-determinism, recurrence-laminarity, recurrence-trapping-time, all revisit-density/structure-based) by measuring conditional unpredictability: a trace bouncing unpredictably between few event kinds can score higher than one with many kinds arranged in a strict repeating cycle.

Required IR fields

Only events[] — specifically event.index (or array position), event.kind, and optionally event.ref for tool-call qualification. No states, provenance, or objectives required, matching its Tier 1 "event sequence only" runtime requirement.

Catalog update

Flipped event-entropy-rate's status from Not started to Implemented in shared/graders/README.md. See that file for the full catalog and remaining graders.

Generated by 🧮 Daily Trajectory Grader Implementer · copilot · auto · 58.5 AIC · ⌖ 7.6 AIC · ⊞ 10.2K ·

  • expires on Sep 10, 2026, 4:34 PM UTC-08:00

Note

This was originally intended as a pull request, but the git push operation failed.

Original error: The process '/usr/bin/git' failed with exit code 1

Workflow Run: View run details and download bundle artifact

The bundle file is available in the agent artifact in the workflow run linked above.

Create the pull request manually
# Download the artifact from the workflow run
gh run download '33129779219' -n agent -D '/tmp/agent-33129779219'

# Resolve the bundle source ref, fetch it into a temporary ref, then create the local branch
bundle_path='/tmp/agent-33129779219/aw-trajectory-grader-event-entropy-rate.bundle'
temp_ref='refs/bundles/create-pr-trajectory-grader-event-entropy-rate-bfadf4a5d7f44396-6c61d0e7'
target_ref='refs/heads/trajectory-grader-event-entropy-rate-bfadf4a5d7f44396'
bundle_source_ref=$(git bundle list-heads "$bundle_path" | awk '$2 ~ /^refs\/heads\// { print $2 }')
if [ -z "$bundle_source_ref" ]; then
  bundle_source_ref=$(git bundle list-heads "$bundle_path" | awk '$2 == "HEAD" { print $2 }')
fi
if [ "$(printf '%s\n' "$bundle_source_ref" | sed '/^$/d' | wc -l | tr -d ' ')" != "1" ]; then
  echo "Expected exactly one bundle source ref, found: $bundle_source_ref" >&2
  exit 1
fi
git fetch "$bundle_path" "${bundle_source_ref}:${temp_ref}"
git update-ref "$target_ref" "$temp_ref"
git checkout 'trajectory-grader-event-entropy-rate-bfadf4a5d7f44396'
# Ensure the working tree matches the updated branch
git reset --hard
# Remove the temporary bundle ref
git update-ref -d "$temp_ref"

# Push the branch to the target remote
git push 'origin' 'trajectory-grader-event-entropy-rate-bfadf4a5d7f44396'

# Create the pull request
gh pr create --title '[trajectory-grader] Implement event-entropy-rate' --base 'main' --head 'trajectory-grader-event-entropy-rate-bfadf4a5d7f44396' --repo 'github/gh-aw'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions