Skip to content

ci(bots): rolling learning PR — bump engine + fix retrospective to daily-cron - #197

Merged
eric-wang-1990 merged 3 commits into
mainfrom
bot/bump-engine-rolling-pr
Aug 14, 2026
Merged

eric-wang-1990 merged 3 commits into
mainfrom
bot/bump-engine-rolling-pr

Conversation

@eric-wang-1990

@eric-wang-1990 eric-wang-1990 commented Jul 26, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two related changes to adopt the rolling-learning-PR engine change (databricks-bot-engine#146) and fix a pre-existing mismatch that meant this repo's retrospective never actually ran:

1. Bump the engine pin 92b3857 → d05dcb1

Adopts the rolling model: the daily retrospective now maintains one rolling learning PR on a stable branch (ai/learning-pr) — appending a dated section per day until a human merges it — instead of opening a new date-keyed PR per day that collided in the learning-log footer. One-line change to bot-prelude's engine-ref default (single source of truth for all bots here).

2. Convert the learning flow to the daily-cron model (the real fix)

This repo adopted the cron-batch engine (92b3857) but its learning flow was still the old per-merge shape — so they were mismatched and the retrospective has never produced a learning PR (no ai/learning-pr* branch has ever existed here). This PR aligns them:

  • engineer-bot-learning.yml: trigger on: pull_request [closed] + extract-learning label → on: schedule (daily) + workflow_dispatch (since / window-hours recovery inputs). Removes the per-merge "gather PR diff/comments" step (the cron engine enumerates merged PRs + author-run logs itself via the GitHub API over an adaptive cursor). Adds actions: read (Track B lists author runs — a missing scope hard-fails the run) and a cron concurrency group.
  • .bot/config.yaml:
    • Drop retrospective.context_files (pr_diff.txt/review_comments.txt) — an author-phase-only key the cron engine ignores.
    • Drop the system_prompt: prompts/retrospective_system.md override — it described the retired single-PR worth_logging/headline contract and would append stale, schema-contradicting guidance to the engine's batch-aware base. Use the engine base verbatim.
    • Add author.knowledge_log = retrospective.log_path to close the loop (the author phase now reads the learnings the retrospective writes).
    • Add author_workflow: engineer-bot.yml for Track B.
  • Remove .bot/prompts/retrospective_system.md (the stale override).

Validation

  • .bot/config.yaml loads via the engine's load_bot; the retrospective: block parses; loop confirmed closed (retrospective.log_path == author.knowledge_log); bot_login_prefix present (needed for the DCO-signed learning commit).
  • engineer-bot-learning.yml YAML parses; mirrors driver-test's working engineer-bot-learning-cron.yml (adapted to this repo's PAT-free bot-prelude install).

Provisioning note

The engineer-bot GitHub App installation must carry actions: read for Track B (author-run mining); without it list_author_runs raises and the run fails. Everything else (DATABRICKS_HOST/DATABRICKS_TOKEN in azure-prod, the App secrets) is already in place from the existing bots.

This pull request and its description were written by Isaac.

Adopts databricks-bot-engine#146: the daily retrospective now maintains
ONE rolling learning PR on a stable branch instead of a new date-keyed PR
per day, eliminating cross-day collisions in the learning-log footer.

No .bot/config.yaml change needed — the stable branch is derived from the
existing branch_prefix (ai/learning-pr-).

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No issues identified by the review bot.

Kernel adopted the cron-batch engine but its learning flow was still the
OLD per-merge shape (on: pull_request closed + extract-learning label +
workflow-gathered pr_diff.txt/review_comments.txt). That mismatched the
engine — which enumerates merged PRs + author runs itself over an adaptive
window — so the retrospective never produced a learning PR.

- engineer-bot-learning.yml: trigger → schedule (daily) + workflow_dispatch
  (since / window-hours); drop the merged-PR context-gather step; add
  actions:read (Track B) + a cron concurrency group.
- .bot/config.yaml: drop retrospective.context_files (author-phase key only)
  and the stale system_prompt override (retired worth_logging/headline
  contract — use the engine's batch-aware base); add author.knowledge_log to
  close the loop (author reads what the retrospective writes); add
  author_workflow for Track B.
- Remove .bot/prompts/retrospective_system.md (the stale override).

Paired with the engine bump to d05dcb1, the retrospective now maintains ONE
rolling learning PR on the stable branch ai/learning-pr.

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
@eric-wang-1990 eric-wang-1990 changed the title ci(bots): bump engine pin to d05dcb1 (rolling learning PR) ci(bots): rolling learning PR — bump engine + fix retrospective to daily-cron Jul 27, 2026

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No issues identified by the review bot.

Resolve conflicts in .bot/config.yaml, bot-prelude/action.yml, and engineer-bot-learning.yml by taking main's side: main's engine pin (654a31d, 2026-08-04) is newer than the PR's d05dcb1 (2026-07-26), and main carries the daily-cron refinements (MODEL_ENDPOINT fix, deduped env). Restored .bot/prompts/retrospective_system.md to keep main's system_prompt reference valid. Net result: branch content matches main.

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
@eric-wang-1990
eric-wang-1990 added this pull request to the merge queue Aug 14, 2026
Merged via the queue into main with commit 70b1248 Aug 14, 2026
15 checks passed

This branch was previously deployed

1 inactive deployment
azure-prod — 2d30ba73 Deployed Aug 14, 2026 by eric-wang-1990 via review #170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants