Skip to content

Meter CI autofix usage (UM-1593) - #1702

Merged
jaywedgeworth22 merged 1 commit into
mainfrom
claude/UM-1593-autofix-metering-pins
Oct 18, 2026
Merged

jaywedgeworth22 merged 1 commit into
mainfrom
claude/UM-1593-autofix-metering-pins

Conversation

@jaywedgeworth22

@jaywedgeworth22 jaywedgeworth22 commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Refs UM-1593

Meter CI autofix usage (UM-1593)

Summary

Wires CI usage metering into the repository's three autofix workflows. Each workflow now passes a USAGE_INGEST_TOKEN secret to its reusable workflow and pins to a newer reusable workflow revision that performs the metering. The autofix.yml caller additionally requests actions: read, which the metering step relies on.

Changes

  • .github/workflows/autofix.yml

    • Adds actions: read to the job's permissions block.
    • Updates the pr-autofix-reusable.yml reference from 2e671004… to b634b511….
    • Passes USAGE_INGEST_TOKEN into the reusable workflow.
  • .github/workflows/claude-code-autofix.yml

    • Updates the codex-autofix-reusable.yml reference from 825f8ee0… to 31659885….
    • Passes USAGE_INGEST_TOKEN into the reusable workflow.
  • .github/workflows/kody-fleet-autofix.yml

    • Updates the kody-autofix-reusable.yml reference from fea7cd12… to 31659885….
    • Passes USAGE_INGEST_TOKEN into the reusable workflow.

Functional impact

Autofix runs (PR autofix, Claude/Codex review autofix, and Kody fleet autofix) can now report their usage to the metering backend using the shared ingest token, so agent usage from CI autofix activity is captured alongside other usage sources.

Review notes (from automated review)

  • [high] .github/workflows/claude-code-autofix.yml does not grant actions: read, while the pinned codex-autofix-reusable.yml@31659885 metering step is expected to require it, by symmetry with the autofix reusable workflow updated in this PR.
  • [medium] A business logic gap was flagged relative to the PR's stated requirements; not attributed to a specific file.

Bump the autofix caller pins to the metering-enabled reusables and forward
USAGE_INGEST_TOKEN in the same change.  Refs UM-1593.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Oct 18, 2026

Copy link
Copy Markdown

UM-1593

@kody-ai

kody-ai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

⚠️ 2 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Never move or delete existing app support.html URLs
  • Prefer Sentry for new observability; do not add new Datadog RUM/APM surfaces
Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@jaywedgeworth22
jaywedgeworth22 enabled auto-merge (squash) October 18, 2026 02:25
@jaywedgeworth22
jaywedgeworth22 merged commit 3c33a62 into main Oct 18, 2026
11 of 12 checks passed
@jaywedgeworth22
jaywedgeworth22 deleted the claude/UM-1593-autofix-metering-pins branch October 18, 2026 02:28
@kody-ai

kody-ai Bot commented Oct 18, 2026

Copy link
Copy Markdown

kody code-review Business Logic medium

Business Rules Validation

Task: 5773430482 — Provision Canonical iOS Records to Unblock Widget Fix Delivery
Task Link: https://github.com/Simple-With-Us/Usage-Monitor/issues/1634
Status: Issues Found
Confidence: high

Findings

MUST_FIX: PR scope does not match the task scope

Requirement: "The owner approved these active bundle IDs on October 9: Usage Monitor app: com.simplewithus.usage.client.ios, Widget extension: com.simplewithus.usage.client.ios.widget, Local Monitor app: com.simplewithus.usage.local.ios. All use the existing App Group group.com.simplewithus.usage. The Client app also needs Push Notifications."
Missing in code: No evidence in this PR diff of any change related to iOS bundle identifiers, App Groups, Push Notifications configuration, Apple Developer Portal App IDs, App Store Connect records, or scripts/ios-fleet/apps.json.
Evidence (Code): The PR diff only touches .github/workflows/autofix.yml, .github/workflows/claude-code-autofix.yml, and .github/workflows/kody-fleet-autofix.yml to bump reusable workflow refs and forward USAGE_INGEST_TOKEN. None of these workflows or files relate to iOS bundle provisioning.
Suggested action: Update the PR with the actual implementation required by the task (canonical bundle identifiers, App Group wiring, Push Notifications capability, App Store Connect record updates, and scripts/ios-fleet/apps.json updates), or link the correct task if this PR is intended for an unrelated workflow change.

MUST_FIX: No evidence of canonical Usage Monitor app bundle ID in this PR diff

Requirement: "Usage Monitor app: com.simplewithus.usage.client.ios" (AC #1)
Missing in code: No evidence in this PR diff of establishing or referencing the com.simplewithus.usage.client.ios bundle ID.
Evidence (Code): The diff does not show changes in any iOS registration, provisioning, or configuration file required by this acceptance criterion.
Suggested action: Add the canonical bundle ID to the relevant Apple Developer Portal App ID, App Store Connect record, and repository configuration (for example, scripts/ios-fleet/apps.json) per the rollout document.

MUST_FIX: No evidence of Widget extension bundle ID in this PR diff

Requirement: "Widget extension: com.simplewithus.usage.client.ios.widget" (AC #2)
Missing in code: No evidence in this PR diff of establishing or referencing the com.simplewithus.usage.client.ios.widget bundle ID, nor its required separate Developer Portal App ID with App Groups enabled.
Evidence (Code): The diff does not show changes in widget provisioning, extension configuration, or App Group entitlement for the widget.
Suggested action: Provision the widget's explicit App ID, enable App Groups on it, and register the widget bundle ID in the repository's iOS configuration.

MUST_FIX: No evidence of Local Monitor app bundle ID in this PR diff

Requirement: "Local Monitor app: com.simplewithus.usage.local.ios" (AC #3)
Missing in code: No evidence in this PR diff of establishing or referencing the com.simplewithus.usage.local.ios bundle ID.
Evidence (Code): The diff does not show changes in any Local Monitor app provisioning configuration.
Suggested action: Provision the Local Monitor App ID and App Store Connect record, and update the repository's iOS configuration accordingly.

SUGGESTION: No evidence of hosted-ship script guard or apps.json pending state in this PR diff

Requirement: "scripts/ios-fleet/apps.json intentionally keeps both ASC records pending, and the hosted ship script refuses to upload until the new host-app records are registered and their Apple IDs are configured. Do not use the legacy records 6799230435 / 6799230729; they belong to retired bundle IDs."
Missing in code: No evidence in this PR diff of changes to scripts/ios-fleet/apps.json or to any hosted-ship script guardrail.
Evidence (Code): The diff is limited to GitHub Actions workflow files and contains no iOS fleet script or JSON changes.
Suggested action: Update scripts/ios-fleet/apps.json to point to the canonical bundle IDs with pending App Store Connect records, and ensure the hosted-ship script refuses upload of legacy records 6799230435 / 6799230729.

Requirements Verified

None. No acceptance criterion from the task is implemented in this PR diff.


Analysis performed by Kodus AI Business Rules Validator


💡 This validation runs automatically only on the first review of a pull request. To run it again, comment @kody -v business-logic.

Comment on lines 24 to +27
(github.event_name == 'pull_request_review' &&
github.event.review.user.type == 'Bot' &&
github.event.pull_request.head.repo.full_name == github.repository)
uses: Simple-With-Us/congress-trading-shared/.github/workflows/codex-autofix-reusable.yml@825f8ee008d6ce104107f2a7267c14d370e6013e
uses: Simple-With-Us/congress-trading-shared/.github/workflows/codex-autofix-reusable.yml@31659885f58f08e129b6dc092f3493d7cdb74a11

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kody code-review Bug high

Permission intersection failure in claude-code-autofix.yml: the workflow grants only contents: write, pull-requests: write at workflow level while codex-autofix-reusable.yml@31659885 declares a metering step (id: usage, exposed via outputs.usage) requiring actions: read. A called workflow cannot raise the caller's permissions, so the metering step's requirement is intersected with no caller grant and fails with HTTP 403 from the Actions API. Add actions: read to a job-level permissions: block on the autofix job, matching what kody-fleet-autofix.yml already applies.

permissions:
  contents: write
  pull-requests: write

concurrency:
  group: pr-autofix-${{ github.repository }}-${{ github.event.pull_request.number || github.event.inputs.pr }}
  cancel-in-progress: false

jobs:
  autofix:
    if: >-
      github.event_name == 'workflow_dispatch' ||
      (github.event_name == 'pull_request_review' &&
       github.event.review.user.type == 'Bot' &&
       github.event.pull_request.head.repo.full_name == github.repository)
    permissions:
      contents: write
      pull-requests: write
      actions: read
    uses: Simple-With-Us/congress-trading-shared/.github/workflows/codex-autofix-reusable.yml@31659885f58f08e129b6dc092f3493d7cdb74a11
Prompt for LLM

File .github/workflows/claude-code-autofix.yml:

Line 24 to 27:

Permission intersection failure in claude-code-autofix.yml: the workflow grants only `contents: write, pull-requests: write` at workflow level while codex-autofix-reusable.yml@31659885 declares a metering step (`id: usage`, exposed via `outputs.usage`) requiring `actions: read`. A called workflow cannot raise the caller's permissions, so the metering step's requirement is intersected with no caller grant and fails with HTTP 403 from the Actions API. Add `actions: read` to a job-level `permissions:` block on the `autofix` job, matching what kody-fleet-autofix.yml already applies.

Suggested Code:

permissions:
  contents: write
  pull-requests: write

concurrency:
  group: pr-autofix-${{ github.repository }}-${{ github.event.pull_request.number || github.event.inputs.pr }}
  cancel-in-progress: false

jobs:
  autofix:
    if: >-
      github.event_name == 'workflow_dispatch' ||
      (github.event_name == 'pull_request_review' &&
       github.event.review.user.type == 'Bot' &&
       github.event.pull_request.head.repo.full_name == github.repository)
    permissions:
      contents: write
      pull-requests: write
      actions: read
    uses: Simple-With-Us/congress-trading-shared/.github/workflows/codex-autofix-reusable.yml@31659885f58f08e129b6dc092f3493d7cdb74a11

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

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.

1 participant