Skip to content

feat(learning): add daily engineer-bot retrospective flow + bump engine to 654a31d0 - #442

Merged
eric-wang-1990 merged 5 commits into
mainfrom
ai/add-learning-retrospective
Aug 13, 2026
Merged

feat(learning): add daily engineer-bot retrospective flow + bump engine to 654a31d0#442
eric-wang-1990 merged 5 commits into
mainfrom
ai/add-learning-retrospective

Conversation

@eric-wang-1990

@eric-wang-1990 eric-wang-1990 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What

Turn on the engineer-bot daily learning (retrospective) loop for this repo, mirroring databricks-sql-python (the reference implementation). Three changes:

File Change
.github/workflows/engineer-bot-learning.yml (new) Daily schedule (17:23 UTC) + workflow_dispatch. Own job on ./.github/actions/bot-prelude (Python + pinned engine install, PAT-free).
.bot/config.yaml Add the retrospective: block + close the loop with author.knowledge_log.
.github/actions/bot-prelude/action.yml Bump engine-ref d05dcb11654a31d0.

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

  • No setup-jfrog step — this repo's 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. Mirrors the read-only reviewer-bot.yml.
  • actions: read added for Track B (lists engineer-bot author runs + downloads their logs via the App token). The engineer-bot App installation must also carry actions:read, or the run 403s.
  • Close the loop: 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_prompt is omitted (this repo ships no prompts/retrospective_system.md, so the engine's base prompt is used); the learning log is created on first write.
  • Pin bump is SHA-only — SDK/CLI (0.2.102 / 2.1.61) are unchanged at 654a31d0. Brings the daily-cron retrospective + per-bot models.

Validation

The schedule registers only once this lands on the default branch. Before the first cron, validate via a manual workflow_dispatch with a recent since — it should open/update the ai/learning-pr-* PR.

This pull request and its description were written by Isaac.

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>
Copilot AI lite review requested due to automatic review settings August 13, 2026 02:24

Copilot AI 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.

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_dispatch workflow to run the engine’s retrospective extractor and open/update a rolling learning PR.
  • Extend .bot/config.yaml with retrospective: configuration and connect it to the author phase via author.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_prompt points to prompts/retrospective_system.md, but this repository does not have a prompts/ directory (nor a retrospective_system.md anywhere). 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.

Comment thread .github/workflows/engineer-bot-learning.yml
Comment thread .bot/config.yaml

@peco-review-bot peco-review-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.

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).

Comment thread .bot/config.yaml Outdated
Comment thread .bot/config.yaml
…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>
@eric-wang-1990 eric-wang-1990 added the engineer-bot Maintainer-only: triggers the autonomous engineer-bot (bug-fix author on issues; follow-up on PRs) label Aug 13, 2026

@peco-review-bot peco-review-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.

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.

Comment thread .github/workflows/engineer-bot-learning.yml Outdated
`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>
@eric-wang-1990 eric-wang-1990 added engineer-bot Maintainer-only: triggers the autonomous engineer-bot (bug-fix author on issues; follow-up on PRs) and removed engineer-bot Maintainer-only: triggers the autonomous engineer-bot (bug-fix author on issues; follow-up on PRs) labels Aug 13, 2026

@peco-review-bot peco-review-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.

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>

@peco-review-bot peco-review-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.

…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>

@peco-review-bot peco-review-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.

@eric-wang-1990
eric-wang-1990 added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit da3befa Aug 13, 2026
17 checks passed
@eric-wang-1990
eric-wang-1990 deleted the ai/add-learning-retrospective branch August 13, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engineer-bot Maintainer-only: triggers the autonomous engineer-bot (bug-fix author on issues; follow-up on PRs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants