Skip to content

ci(ci): add daily retrospective (rolling learning PR) + bump engine#598

Merged
eric-wang-1990 merged 2 commits into
mainfrom
bot/add-retrospective-rolling-pr
Jul 27, 2026
Merged

ci(ci): add daily retrospective (rolling learning PR) + bump engine#598
eric-wang-1990 merged 2 commits into
mainfrom
bot/add-retrospective-rolling-pr

Conversation

@eric-wang-1990

Copy link
Copy Markdown
Collaborator

Summary

Enables the daily retrospective (learning-extraction) flow — which .bot/config.yaml already anticipated ("Auto-append on merge is a separate follow-up: needs a retrospective: block + a learning workflow, neither wired yet") — on the current engine d05dcb1, which maintains one rolling learning PR on a stable branch (ai/learning-pr) per databricks-bot-engine#146.

What the retrospective does

On a daily cron, the engine gathers merged PRs (diff + review comments) and recent engineer-bot author-run logs over an adaptive look-back window, and if the model finds durable, reusable learnings, appends a dated section to a single rolling PR (ai/learning-pr) — human-gated, never committing the canonical log directly. The engineer author phase reads those learnings to steer future fixes.

Changes

  • .github/workflows/engineer-bot-learning.yaml (new): daily schedule + workflow_dispatch (since/window-hours recovery inputs). Mirrors this repo's engineer-bot.yaml setup exactly — self-hosted peco-driver runner, python3.11 venv, interim BOT_ENGINE_PAT engine install pinned to ENGINE_REF. Grants actions: read for Track B (author-run mining). No live-connection/E2E step — the retrospective only reads diffs+logs and calls the model, so it needs no warehouse.
  • .bot/config.yaml:
    • Add the retrospective: block. log_path points at the existing .claude/knowledge/learning.md (not a new file); engine-owned batch prompt (no override).
    • Pin author.knowledge_log to the same file — the documented upgrade the existing comment describes ("add author.knowledge_log back if it grows past the cap"): now that the log grows automatically, this delivers it to the author phase newest-first and capped, and closes the loop (log_path == knowledge_log).
  • Bump ENGINE_REF 5fbcee1d05dcb1 across all 4 bot workflows (keeps every bot on one engine version).

Validation

  • .bot/config.yaml loads via load_bot; the retrospective: block parses; loop confirmed closed (log_path == author.knowledge_log); log_path file exists; author_workflow: engineer-bot.yaml filename verified; bot_login_prefix present.
  • engineer-bot-learning.yaml YAML parses; action refs match this repo's other bot workflows.

Provisioning note

The engineer-bot GitHub App installation must carry actions: read for Track B. BOT_ENGINE_PAT, ENGINEER_BOT_APP_ID/PRIVATE_KEY, DATABRICKS_HOST/TOKEN are already in place from the existing bots.

This pull request and its description were written by Isaac.


This PR was created with GitHub MCP.

Adds the daily learning-extraction flow (the config already anticipated it:
'needs a retrospective: block + a learning workflow, neither wired yet') on
engine d05dcb1, which maintains ONE rolling learning PR on a stable branch
(ai/learning-pr).

- engineer-bot-learning.yaml: daily cron + workflow_dispatch, mirroring
  engineer-bot.yaml's setup (self-hosted runner, python3.11 venv, PAT install);
  actions:read for Track B (author-run mining). No live-connection/E2E step —
  the retrospective only reads diffs+logs and calls the model.
- .bot/config.yaml: add retrospective: block (log_path -> the EXISTING
  .claude/knowledge/learning.md; engine-owned batch prompt) and pin
  author.knowledge_log to the same file so the author phase reads it NEWEST-first
  (the config comment's documented upgrade once the log grows).
- Bump ENGINE_REF 5fbcee1 -> d05dcb1 across all 4 bot workflows.

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
The rat pre-commit hook (Apache RAT) requires the standard license header on
every file; the new learning workflow was missing it, failing 'lint & pre-commit'.
Matches the header on every other .github/workflows/* file.

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): add daily retrospective (rolling learning PR) + bump engine ci(ci): add daily retrospective (rolling learning PR) + bump engine Jul 27, 2026
@eric-wang-1990
eric-wang-1990 merged commit 771636a into main Jul 27, 2026
16 of 17 checks passed
@eric-wang-1990
eric-wang-1990 deleted the bot/add-retrospective-rolling-pr branch July 27, 2026 02:55
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.

1 participant