feat(learning): add daily engineer-bot retrospective flow + bump engine to 654a31d0 - #442
Conversation
Turn on the engineer-bot learning loop for this repo, mirroring databricks-sql-python (the reference). Three parts: - engineer-bot-learning.yml (new): daily schedule (17:23 UTC) + workflow_dispatch (string since / window-hours recovery inputs). Own job sharing ./.github/actions/ bot-prelude for Python + pinned engine install, PAT-free. No setup-jfrog step: install-bot-engine self-mints its pip credential via OIDC and never reads PIP_INDEX_URL from env, so a setup-jfrog step would be redundant (the engine install is the only fetch; the learning flow runs no go build) and would leak a token-bearing PIP_INDEX_URL to the job env. actions:read added for Track B (lists engineer-bot author runs + downloads their logs via the App token). - .bot/config.yaml: add the retrospective block (log_path, branch_prefix, pr_label, plus the repo's existing prompts/retrospective_system.md as additive guidance) and close the loop with author.knowledge_log matching retrospective.log_path (.claude/knowledge/learning-log.md), so the author phase reads back what the retrospective learns. - bot-prelude: bump engine-ref d05dcb11 to 654a31d0 (engine main) so the pinned engine has the daily-cron retrospective + per-bot models. SDK/CLI (0.2.102 / 2.1.61) unchanged at that SHA, so this is a SHA-only bump. The schedule registers only once this lands on the default branch; validate 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>
There was a problem hiding this comment.
Pull request overview
Enables the engineer-bot “daily learning / retrospective” loop for this repository by adding a scheduled + manually-dispatchable GitHub Actions workflow, wiring the retrospective configuration into .bot/config.yaml, and bumping the shared bot engine pin used by the bot prelude action.
Changes:
- Add a new scheduled (
cron) +workflow_dispatchworkflow to run the engine’s retrospective extractor and open/update a rolling learning PR. - Extend
.bot/config.yamlwithretrospective:configuration and connect it to the author phase viaauthor.knowledge_log. - Bump the pinned bot engine commit SHA in
./.github/actions/bot-prelude.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/engineer-bot-learning.yml |
Introduces the daily learning workflow and execution wiring for the retrospective module. |
.bot/config.yaml |
Adds retrospective configuration and connects the learning log back into the author flow. |
.github/actions/bot-prelude/action.yml |
Updates the default engine commit SHA used by all bot workflows. |
Suppressed comments (1)
.bot/config.yaml:120
retrospective.system_promptpoints toprompts/retrospective_system.md, but this repository does not have aprompts/directory (nor aretrospective_system.mdanywhere). As written, the retrospective run is likely to fail when it tries to load the prompt, and the nearby comment claiming the file is “present in this repo” is currently incorrect.
# Omitting this block makes the retrospective a no-op. The system prompt is the
# engine's built-in base; prompts/retrospective_system.md (present in this repo) is
# appended as additive guidance.
retrospective:
system_prompt: prompts/retrospective_system.md
log_path: .claude/knowledge/learning-log.md # MUST match author.knowledge_log above
branch_prefix: ai/learning-pr-
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Verdict: 1 High · 1 Medium
CI/config onboarding PR. The workflow wiring is solid and faithfully mirrors the sibling bots (token minting via bot-prelude, persist-credentials:false + authenticated push remote, no setup-jfrog, single-sourced engine pin, actions: read for Track B, sane concurrency). The two real concerns are config keys pointing at files the PR says already exist but that are absent from the checkout: retrospective.system_prompt (F1, high) and the shared log_path/knowledge_log (F2, medium).
…is repo) The retrospective block pointed system_prompt at prompts/retrospective_system.md, which does not exist in this repo (only databricks-sql-kernel ships one; the sql-python reference correctly omits the key). The engine treats a set-but-missing system_prompt as a HARD ERROR, so the daily cron would fail every run. Drop the key so the flow uses the engine's built-in base prompt (engineer_prompts.RETRO_SYSTEM_PROMPT) — matching databricks-sql-python and the odbc learning PR. Also corrects the config comment, which wrongly claimed the file was "present in this repo." Caught by peco-review-bot on the sibling PRs. Co-authored-by: Isaac Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
There was a problem hiding this comment.
Verdict: 1 Low
Clean, well-documented onboarding PR that mirrors the established sibling bot workflows (reviewer/engineer). Token wiring, shell safety, trigger surface, and config placement all check out. One low-severity note: the retrospective's model is left implicit (generic anthropic endpoint + no retrospective.model in config), unlike the other bots which pin an explicit model — worth confirming the engine default is intended.
`bin/golangci-lint` set `GOBIN=$(pwd)/bin`, but $(pwd) is a Make expression, not shell — Make expands the undefined `pwd` variable to EMPTY, so GOBIN was blank and `go install` fell back to the default bin dir (GOPATH/bin, which resolves to /bin on the protected runner) → `open /bin/golangci-lint: permission denied`, failing `make tools`. This only surfaced now because `make tools` runs on the protected runner solely via the engineer-bot build prelude, and engineer-bot was triggered on this repo for the first time (the `engineer-bot` label was just applied). The bug itself predates this PR (Makefile line unchanged since 2026-07-10). Use $(CURDIR) — Make's built-in absolute cwd — so golangci-lint installs into ./bin as intended. Verified via `make -n`: GOBIN now expands to the repo path. Co-authored-by: Isaac Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
Addresses: - #3771947885 at .bot/config.yaml:99 - #3771952784 at .bot/config.yaml:122 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
…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>
What
Turn on the engineer-bot daily learning (retrospective) loop for this repo, mirroring
databricks-sql-python(the reference implementation). Three changes:.github/workflows/engineer-bot-learning.yml(new)schedule(17:23 UTC) +workflow_dispatch. Own job on./.github/actions/bot-prelude(Python + pinned engine install, PAT-free)..bot/config.yamlretrospective:block + close the loop withauthor.knowledge_log..github/actions/bot-prelude/action.ymlengine-refd05dcb11→654a31d0.Why
The other bots (reviewer, engineer, followups) were onboarded earlier; the retrospective was deliberately deferred. This adds it. Over an adaptive look-back window the engine gathers merged PRs + engineer-bot author-run logs itself and, if it finds durable learnings, opens one rolling PR (
ai/learning-pr) appending a dated section to.claude/knowledge/learning-log.md— human-gated, never committing the canonical log directly.Notes on the wiring
setup-jfrogstep — this repo'sinstall-bot-engineself-mints its pip credential via OIDC and never readsPIP_INDEX_URLfrom env, so a setup-jfrog step would be redundant (the engine install is the only fetch — the learning flow runs nogo build) and would leak a token-bearingPIP_INDEX_URLto the job env. Mirrors the read-only reviewer-bot.yml.actions: readadded for Track B (lists engineer-bot author runs + downloads their logs via the App token). The engineer-bot App installation must also carryactions:read, or the run 403s.author.knowledge_log==retrospective.log_path(.claude/knowledge/learning-log.md) — the retrospective writes it, the author reads it back. — the retrospective writes it, the author reads it back.system_promptis omitted (this repo ships noprompts/retrospective_system.md, so the engine's base prompt is used); the learning log is created on first write.0.2.102/2.1.61) are unchanged at654a31d0. Brings the daily-cron retrospective + per-bot models.Validation
The
scheduleregisters only once this lands on the default branch. Before the first cron, validate via a manual workflow_dispatch with a recentsince— it should open/update theai/learning-pr-*PR.This pull request and its description were written by Isaac.