Repository navigation
feat(learning): migrate retrospective to daily rolling-PR model + bump engine - #245
Merged
Merged
Conversation
… bump engine The engine's retrospective flow moved from a per-PR, on-merge, label-gated model to a daily cron + adaptive-cursor window sweep. This repo was still on the legacy shape end to end. Migrate it, and bump the engine pin so the new invocation matches the engine it runs against. - bot-prelude: bump engine-ref 92b3857 -> 654a31d0 (engine main; 61 commits). The locked SDK/CLI (0.2.102 / 2.1.61) are unchanged at that SHA, so this is a SHA-only bump — no install-bot-engine edit needed. - engineer-bot-learning.yml: replace `pull_request: [closed]` (gated on merged + `extract-learning`) with `schedule` (07:17 UTC, off-peak/off-:00) + `workflow_dispatch` (string `since` / `window-hours` recovery inputs). Drop the now-obsolete "Gather merged-PR context" step — the modern retrospective gathers each PR's diff/comments itself over the window (gather_pr_context). Invoke with `--window-hours` (and `--since` when non-empty). Add `actions: read` (Track B lists author runs + downloads their logs via the App token; without it the run 403s and fails). Fixed concurrency group (no PR number on a scheduled run). - .bot/config.yaml: close the loop — add `author.knowledge_log` matching `retrospective.log_path` (.claude/knowledge/learning-log.md), so the author phase reads back what the retrospective learns. Remove the dead `retrospective.context_files` key (the windowed sweep ignores it) and refresh the block comments to describe the multi-PR window model. The schedule registers only once this lands on the default branch; the flow can be validated before the first cron via a manual workflow_dispatch with a recent `since`. Co-authored-by: Isaac Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
eric-wang-1990
temporarily deployed
to
azure-prod
August 13, 2026 00:53 — with
GitHub Actions
Inactive
eric-wang-1990
enabled auto-merge
August 13, 2026 01:01
…t form The learning workflow set MODEL_ENDPOINT to `.../serving-endpoints/anthropic/invocations`. That is NOT translated the way the old comment claimed: sdk_agent.translate_endpoint has an early-return for URLs already containing `/serving-endpoints/anthropic`, which keeps the trailing `/invocations` — so the CLI appends `/v1/messages` and calls `.../serving-endpoints/anthropic/invocations/v1/messages`, which the gateway rejects with `400 Unsupported native API path`. Proof: databricks-sql-python's learning cron (same endpoint form) has failed every scheduled run with exactly this 400. The reviewer-bot flagged it on the sibling PRs (Low), and it is the real cause. Use the concrete `.../serving-endpoints/databricks-claude-opus-4-8/invocations` form that reviewer-bot.yml / engineer-bot.yml already use successfully: translate_endpoint strips `<model>/invocations` to the `.../serving-endpoints/ anthropic` base the CLI needs. Comment corrected to explain the trap. Co-authored-by: Isaac Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
eric-wang-1990
temporarily deployed
to
azure-prod
August 13, 2026 05:39 — with
GitHub Actions
Inactive
eric-wang-1990
temporarily deployed
to
azure-prod
August 13, 2026 05:39 — with
GitHub Actions
Inactive
eric-wang-1990
disabled auto-merge
August 13, 2026 05:46
vikrantpuppala
approved these changes
Aug 13, 2026
This branch was previously deployed
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.
What
Migrate the engineer-bot learning (retrospective) flow from the legacy per-PR model to the engine's current daily cron + adaptive-cursor model, and bump the engine pin so the invocation matches the engine it runs against. Three coupled changes:
.github/actions/bot-prelude/action.ymlengine-refdefault92b3857→654a31d0(enginemain, 61 commits). SHA-only — the locked SDK/CLI (0.2.102/2.1.61) are unchanged at that SHA..github/workflows/engineer-bot-learning.yml.bot/config.yamlWhy these are coupled
The modern
retrospective.py(at the bump target) is invoked as a windowed multi-PR sweep (--window-hours/--since, adaptive cursor) that gathers each merged PR's diff and comments itself. This repo's workflow was still the old shape:pull_request: [closed]gated onmerged+ anextract-learninglabel, with a manual step that hand-gathered a single PR's context intopr_diff.txt/review_comments.txt. Bumping the engine without migrating the trigger would leave a modern engine driven by a legacy trigger; migrating the trigger without the bump would call flags the pinned engine doesn't have. So they land together.Workflow changes
pull_request: [closed]→schedule(17 7 * * *, off-peak/off-:00) +workflow_dispatchwith stringsince/window-hoursrecovery inputs (string, not number — a number-typed dispatch input fails the whole run at startup when the workflow also triggers on schedule).gather_pr_context).retrospective --repo-dir "$GITHUB_WORKSPACE" --window-hours "$WINDOW_HOURS", appending--sinceonly when non-empty.actions: read— Track B lists engineer-bot author runs + downloads their logs via the App token; without this scope the step 403s and fails the whole run.concurrency.group(no PR number on a scheduled run).Config changes
author.knowledge_log: .claude/knowledge/learning-log.md, matchingretrospective.log_path. The retrospective writes that path; the author phase only reads it back when the two agree — so fixes benefit from what's been learned. It was previously half-open (learnings written, never read back).retrospective.context_fileskey (the windowed sweep ignores it) and refresh the block comments.Validation
author.knowledge_log==retrospective.log_path(verified); no lingeringgithub.event.pull_request.*in active logic; trigger/inputs shape matches the engine's ownengineer-bot-learning-cron.yml.scheduleregisters only once this lands on the default branch. Before the first cron, the flow can be exercised via a manual workflow_dispatch with a recentsince— it should open/update the rollingai/learning-pr-*PR.This pull request and its description were written by Isaac.