Skip to content

feat(ci): auto-bump recall floors after stable releases - #2162

Merged
carlos-alm merged 1 commit into
mainfrom
chore/recall-floors-automation
Jul 29, 2026
Merged

feat(ci): auto-bump recall floors after stable releases#2162
carlos-alm merged 1 commit into
mainfrom
chore/recall-floors-automation

Conversation

@carlos-alm

Copy link
Copy Markdown
Contributor

Summary

  • Adds a workflow that triggers after a successful stable Publish run, downloads the pre-publish benchmark artifact, and raises any per-language precision/recall floor that improved
  • Floors are a one-way ratchet — never lowered — keeping the resolution benchmark gate honest as engine accuracy improves over time
  • Opens a PR automatically only when at least one floor actually changed

Test plan

  • Merge and verify the workflow appears correctly in Actions after the next stable Publish run
  • Confirm a PR is opened only when scripts/update-recall-floors.mjs detects an improved floor, and is skipped otherwise

Adds a workflow that downloads the pre-publish benchmark artifact after a
successful stable Publish run and raises any per-language precision/recall
floor that improved, opening a PR. Floors are a one-way ratchet — they are
never lowered.

Impact: 1 functions changed, 1 affected
Comment on lines +20 to +22
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event != 'push'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Scheduled runs lack benchmark artifacts

When a successful scheduled Publish run completes, this condition accepts it even though scheduled runs do not produce benchmark-results-json, causing the follow-up workflow to fail at gh run download.

Suggested change
if: >
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event != 'push'
if: >
github.event.workflow_run.conclusion == 'success' &&
(github.event.workflow_run.event == 'release' ||
github.event.workflow_run.event == 'workflow_dispatch')

Fix in Claude Code

Comment on lines +69 to +71
git fetch --tags
VERSION=$(git describe --tags --match "v*" --abbrev=0 2>/dev/null | sed 's/^v//' || echo "unknown")
BRANCH="chore/recall-floors-v${VERSION}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Release identity drifts from artifact

When an older workflow_dispatch retry completes after a newer release tag is reachable from main, the workflow downloads the older run's artifact but derives the newer version with git describe, causing the older metrics to be labeled and force-pushed onto the newer release's branch.

Fix in Claude Code

Comment on lines +51 to +53
const pattern = new RegExp(
`( ${lang}: \\{ precision: )([\\d.]+)(, recall: )([\\d.]+)( \\})`,
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Language keys are unescaped regex

Interpolating lang directly into the regular expression makes fixture names containing regex metacharacters, such as a future c++ key, fail to match their threshold row or match unintended text; the script then silently leaves that language's improved floor unchanged.

Fix in Claude Code

@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds automated recall-floor ratcheting after Publish runs.

  • Introduces a workflow that downloads benchmark results, updates thresholds, and opens a versioned pull request when floors improve.
  • Adds a Node script that rounds improved per-language precision and recall down to two decimal places while never lowering existing floors.

Confidence Score: 2/5

This PR should not merge until scheduled Publish runs are excluded and floor-update branches are bound to the version that produced each benchmark artifact.

The workflow fails after successful scheduled runs and can apply an older run's benchmark data to a newer release branch when releases complete out of order; the updater also does not safely match future language keys containing regex metacharacters.

Files Needing Attention: .github/workflows/update-recall-floors.yml, scripts/update-recall-floors.mjs

Important Files Changed

Filename Overview
.github/workflows/update-recall-floors.yml Adds the release-follow-up workflow, but its event filter admits scheduled runs without artifacts and its tag lookup can mismatch artifacts with release branches.
scripts/update-recall-floors.mjs Adds a one-way threshold updater whose current keys work, but future language keys containing regex metacharacters will not be matched safely.

Sequence Diagram

sequenceDiagram
  participant Publish
  participant Workflow as Update Recall Floors
  participant Script as Floor updater
  participant GitHub
  Publish->>Workflow: workflow_run completed
  Workflow->>GitHub: Download benchmark artifact
  Workflow->>Script: Apply improved metrics
  Script-->>Workflow: Modified threshold table
  Workflow->>GitHub: Push branch and open PR
Loading

Fix All in Claude Code

Reviews (1): Last reviewed commit: "feat(ci): auto-bump recall floors after ..." | Re-trigger Greptile

@github-actions

Copy link
Copy Markdown
Contributor

Codegraph Impact Analysis

1 functions changed1 callers affected across 1 files

  • fmt in scripts/update-recall-floors.mjs:40 (1 transitive callers)

@carlos-alm
carlos-alm merged commit 8f9f9d8 into main Jul 29, 2026
38 checks passed
@carlos-alm
carlos-alm deleted the chore/recall-floors-automation branch July 29, 2026 00:25
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant