Skip to content

ci(bots): add daily retrospective (rolling learning PR) + bump engine - #882

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

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

Conversation

@eric-wang-1990

@eric-wang-1990 eric-wang-1990 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Enables the daily retrospective (learning-extraction) flow on this repo — it was onboarded for the reviewer + engineer bots but never the retrospective — 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 engineering 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 then reads those learnings to steer future fixes.

Changes

  • .github/workflows/engineer-bot-learning.yml (new): daily schedule + workflow_dispatch (since/window-hours recovery inputs). PAT-free via the existing bot-prelude composite (same engine pin, single source of truth). Grants actions: read — Track B lists engineer-bot author runs; a missing scope hard-fails the run.
  • .bot/config.yaml: adds the retrospective: block (engine-owned batch-aware prompt, no override) and author.knowledge_log = retrospective.log_path to close the loop (author reads what the retrospective writes).
  • .claude/knowledge/learning-log.md (new): seed log the rolling PR appends to.
  • bot-prelude: bump engine-ref default 5368de7d05dcb1 (also adopts the rolling-PR engine + any intervening fixes for the reviewer/engineer bots).

Also in this PR: fix the required Python Integration Tests gate (app-pinning)

Flagged and folded in during review of this PR (the gate was hanging on every PR — see below). Kept here at the maintainer's request rather than split out, since it's a live merge-blocker for the whole repo. These changes touch merge-blocking required-check gating, so calling them out explicitly:

  • .github/workflows/trigger-integration-tests.yml — the required Python Integration Tests check is pinned in the main ruleset to the driver-integration-test app (integration id 2731531). The placeholder was posted via github.token, which lands as github-actions — a different check context that never satisfies the app-pinned gate — so the required check sat "Expected — Waiting for status to be reported" and PRs stayed BLOCKED (reproduced on this PR: a github-actions:success check was present yet the PR was blocked; it cleared only once driver-integration-test posted). Fix:
    • Internal PRs: skip-integration-tests-pr now mints the driver-test App token and posts the placeholder as that app (runs from the PR branch, no label, self-guarded to head repo == base repo).
    • Merge queue: mint the App token unconditionally and post the auto-pass / dispatch-failure checks as the app too (the github.token versions couldn't satisfy the pinned gate either).
  • .github/workflows/skip-checks-reporter.yml (new): fork PRs can't mint secrets inline, so their placeholder is posted by a workflow_run companion (base-repo context, App token), self-guarded to forks so it doesn't double-post with the inline internal-PR job. Mirrors databricks-sql-go How to use query parameters with latest sqlalchemy dialect? #426 / databricks-sql-nodejs Slow query performance (2-5 seconds per query) on shared compute #459.

Out-of-band prerequisite (not in this PR): the Python Integration Tests required context must be pinned to the driver-test app id in the main ruleset (it already is — that's what this fix targets). If the ruleset still lists the legacy Python Proxy Tests / * contexts, swap them for Python Integration Tests. This is an admin ruleset change I can't make from a PR.

Validation

  • .bot/config.yaml loads via 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; action refs match this repo's other bot workflows.
  • CI gating: both workflow YAMLs parse; verified live on this PR that the inline internal-PR poster posts Python Integration Tests=success as driver-integration-test, clearing the previously-hung gate.

Provisioning note

The engineer-bot GitHub App installation must carry actions: read for Track B (author-run mining). DATABRICKS_HOST/DATABRICKS_TOKEN (azure-prod) and the App secrets 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 (was not enabled on this repo) on
the current engine d05dcb1, which maintains ONE rolling learning PR on a
stable branch (ai/learning-pr).

- engineer-bot-learning.yml: daily cron + workflow_dispatch; PAT-free via the
  existing bot-prelude; actions:read for Track B (author-run mining).
- .bot/config.yaml: add retrospective: block (engine-owned batch prompt, no
  override) and author.knowledge_log to close the loop (author reads what the
  retrospective writes).
- Seed .claude/knowledge/learning-log.md.
- Bump bot-prelude engine-ref default 5368de7 → d05dcb1.

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
Copilot AI review requested due to automatic review settings July 27, 2026 00:31

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@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 Medium

Mostly a CI/config PR (new daily retrospective workflow + engine SHA bump + config block) and reads cleanly against the existing bot workflows. One medium issue: the new workflow passes an undefined uv input to the setup-jfrog composite, which is silently ignored and only produces a warning.

Comment thread .github/workflows/engineer-bot-learning.yml Outdated
@eric-wang-1990 eric-wang-1990 added the engineer-bot Maintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR). label Jul 27, 2026
Addresses:
  - #3653811351 at .github/workflows/engineer-bot-learning.yml:78

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.

Verdict: 1 Medium

CI/config-only PR enabling the daily retrospective flow. One medium concern: the new workflow's standalone setup-jfrog step is redundant with install-bot-engine's own JFrog handling, its justifying comment misstates that reuse, and it exports a token-bearing PIP_INDEX_URL into $GITHUB_ENV — the exact credential leak install-bot-engine is designed to avoid. Nit: the since input description reads "ISO lower bound to bound (shorten)" (duplicated "bound").

Comment thread .github/workflows/engineer-bot-learning.yml Outdated
Addresses:
  - #3654123624 at .github/workflows/engineer-bot-learning.yml:75

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.

eric-wang-1990 added a commit that referenced this pull request Jul 27, 2026
…pp-pinned gate)

The required 'Python Integration Tests' check is pinned in the main ruleset to
the driver-test app (driver-integration-test, integration_id 2731531). But the
PR-side placeholder was posted via github.token, so it landed as github-actions
— a DIFFERENT check context that does NOT satisfy the app-pinned gate. Result:
the required check sat unfulfilled and PRs stayed BLOCKED even though a green
'Python Integration Tests' appeared in the list (e.g. #882).

Mirror databricks-sql-go #426 / databricks-sql-nodejs #459:

- Add skip-checks-reporter.yml, triggered by workflow_run on 'Trigger
  Integration Tests'. It runs in the base-repo context with secret access even
  for fork-triggered runs, mints the INTEGRATION_TEST_APP token, and posts
  'Python Integration Tests'=success on every PR head — forks included — as the
  driver-test app, so the app-pinned gate is satisfied and every PR auto-enqueues.
- Remove the inline skip-integration-tests-pr github.token stub (superseded;
  it posted under the wrong app and 403'd on forks entirely).
- In merge-queue-python, mint the app token unconditionally and post the
  auto-pass (no-driver-change) and dispatch-failure checks with IT — the
  merge_group path isn't covered by the reporter, and a github.token check there
  likewise can't satisfy the pinned gate (queue would hang). The real result was
  already posted back by driver-test as the app; this aligns the no-op paths.

The labeled-PR preview's inline checks stay on github.token (cosmetic; the
reporter owns the pinned gate on pull_request events), matching go/nodejs.

Co-authored-by: Isaac

@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 Medium

Looks good on the stated scope — the retrospective flow (.bot/config.yaml block, seed log, daily-cron workflow) and the bot-prelude engine bump are internally consistent and the read/write loop is correctly closed (retrospective.log_path == author.knowledge_log). One medium concern: the diff also carries two undocumented, unrelated CI changes to required-check gating (new skip-checks-reporter.yml and a trigger-integration-tests.yml app-token rework) that the description never mentions.

Other findings

  • 🟡 Medium — PR scope does not match its description. The description enumerates exactly four changes (learning workflow, .bot/config.yaml retrospective block, learning-log.md seed, bot-prelude engine bump). But the diff also includes two undocumented, unrelated CI changes:

  • A new .github/workflows/skip-checks-reporter.yml (124 lines) handling the fork-PR placeholder for the required Python Integration Tests check via workflow_run.

  • A substantial rework of .github/workflows/trigger-integration-tests.yml migrating the required-check posting from github.token to the driver-test App token, and splitting internal-vs-fork placeholder posting.

Both touch merge-blocking required-check gating — a high-risk area where a mistake can either wedge the merge queue or silently green a gate. Bundling them under a PR titled/described purely as "add daily retrospective + bump engine" hides them from reviewers who scope their attention to the stated changes. Please either split these into their own PR or update the description to document and justify them (and note that the required-checks ruleset change described in the workflow's own comments — swapping Python Proxy Tests / * for Python Integration Tests, and ensuring the check is pinned to the driver-test app id — is an out-of-band prerequisite for this rework to not block PRs).

eric-wang-1990 and others added 5 commits July 26, 2026 21:26
…pp-pinned gate)

The required 'Python Integration Tests' check is pinned in the main ruleset to
the driver-test app (driver-integration-test, integration_id 2731531). But the
PR-side placeholder was posted via github.token, so it landed as github-actions
— a DIFFERENT check context that does NOT satisfy the app-pinned gate. Result:
the required check sat unfulfilled and PRs stayed BLOCKED even though a green
'Python Integration Tests' appeared in the list (e.g. #882).

Mirror databricks-sql-go #426 / databricks-sql-nodejs #459:

- Add skip-checks-reporter.yml, triggered by workflow_run on 'Trigger
  Integration Tests'. It runs in the base-repo context with secret access even
  for fork-triggered runs, mints the INTEGRATION_TEST_APP token, and posts
  'Python Integration Tests'=success on every PR head — forks included — as the
  driver-test app, so the app-pinned gate is satisfied and every PR auto-enqueues.
- Remove the inline skip-integration-tests-pr github.token stub (superseded;
  it posted under the wrong app and 403'd on forks entirely).
- In merge-queue-python, mint the app token unconditionally and post the
  auto-pass (no-driver-change) and dispatch-failure checks with IT — the
  merge_group path isn't covered by the reporter, and a github.token check there
  likewise can't satisfy the pinned gate (queue would hang). The real result was
  already posted back by driver-test as the app; this aligns the no-op paths.

The labeled-PR preview's inline checks stay on github.token (cosmetic; the
reporter owns the pinned gate on pull_request events), matching go/nodejs.

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
Addresses:
  - #3654256027 at .github/workflows/skip-checks-reporter.yml:39

Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
…status hang)

Follow-up to the previous commit. Removing the inline PR-open poster in favour
of the workflow_run reporter created a bootstrap gap: workflow_run workflows
only run from the DEFAULT-branch copy, so on this PR (and any introducing PR)
the reporter can't fire and NOTHING posts 'Python Integration Tests' on the PR
head — the required check sits 'Expected — Waiting for status to be reported'
forever.

Fix: split the placeholder by PR origin, both posting as the driver-test app
(the identity the ruleset pins the required check to):

- Internal PRs: restore skip-integration-tests-pr in trigger-integration-tests.yml,
  now minting the INTEGRATION_TEST_APP token (not github.token) and self-guarded
  to head repo == base repo. Posts from the PR branch immediately — no label, no
  workflow_run dependency. This is what unblocks internal PRs like this one.
- Fork PRs: skip-checks-reporter.yml (workflow_run) now self-guards to fork runs
  (head repo != base repo), since a fork's pull_request run can't mint secrets
  inline. The two guards are mutually exclusive — no double-post.

Behaviour matches the intent: skipped placeholder on PR open, real run in the
merge queue (and label preview). The merge-queue app-token posts from the prior
commit are unchanged.

Co-authored-by: Isaac
Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
Addresses:
  - #3654339217 at .github/workflows/engineer-bot-learning.yml:34

Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
Soften the overstated 'the mint always succeeds here' comment and document the
mint-failure case explicitly: it is uncloseable in-workflow (only the pinned app
can post to the pinned context; a github.token fallback lands on a different
context and neither satisfies nor fails the gate), but it is fail-CLOSED — the
merge queue's check_response_timeout evicts an entry whose required check never
reports, and the mint failure shows as a red run. No code change; comment only.

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

Copy link
Copy Markdown
Contributor Author

Good catch on scope. The CI gating changes (new skip-checks-reporter.yml + the trigger-integration-tests.yml app-token rework) were folded into this PR deliberately at my request during review — the required Python Integration Tests gate was hanging on every PR (posted via github.tokengithub-actions context, which never satisfies the driver-integration-test–pinned check), so it was a live merge-blocker worth fixing in place rather than stacking behind another PR. I've updated the description to document and justify both, including the out-of-band ruleset note. DCO sign-off failure was my three commits missing the Signed-off-by trailer — re-signed and force-pushed.

@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

Mostly solid CI wiring (retrospective flow + integration-test gate fix). One HIGH concern: in the merge-queue-python job the driver-test-scoped app token is reused to post check-runs on databricks-sql-python (Auto-pass / dispatch-failure steps), which will 403 given the repositories: databricks-driver-test scope — worth verifying against the app's installation before merge.

Comment thread .github/workflows/trigger-integration-tests.yml
Addresses:
  - #3654417922 at .github/workflows/trigger-integration-tests.yml:366

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.

No file changes. The prior head accumulated many check-suites across repeated
force-push rebases, and GitHub's mergeability rollup stopped surfacing the
required 'Kernel E2E' context even though a valid github-actions success
check-run existed on the commit — leaving the PR unable to enter the merge queue
('Kernel E2E — Expected — Waiting for status to be reported'). Pushing a fresh
non-force commit gives a clean check-suite set so skip-kernel-e2e-pr re-posts
Kernel E2E into the current suite and the rollup picks it up.

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.

Verdict: 1 Low

Solid, exceptionally well-documented CI PR. The app-pinning fix for the Python Integration Tests required gate is internally consistent (merge-queue token minted unconditionally and scoped to both repos, all placeholder/auto-pass/fail steps in the merge-queue and internal-PR paths now attributed to the driver-test app), the fork reporter self-guards correctly against double-posting, and the retrospective config-loop invariant (retrospective.log_path == author.knowledge_log) holds. One low defensive note inline. Two operational preconditions worth confirming out-of-band (not code defects): (1) the INTEGRATION_TEST app installation must carry checks: write, since the internal-PR placeholder now relies on the app token instead of the job's github.token — a missing scope would 403 and block every internal PR's gate; (2) the ENGINEER_BOT app must carry actions: read for the retrospective's Track B, as the workflow comments note.

Comment thread .github/workflows/skip-checks-reporter.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted engineer-bot Maintainer-applied gate: triggers engineer-bot (bug-fix on issue / take-over on PR).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants