Skip to content

learn: retrospective learnings - #1018

Open
peco-engineer-bot[bot] wants to merge 2 commits into
mainfrom
ai/learning-pr
Open

peco-engineer-bot[bot] wants to merge 2 commits into
mainfrom
ai/learning-pr

Conversation

@peco-engineer-bot

@peco-engineer-bot peco-engineer-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Rolling retrospective learnings

This PR accumulates one dated section of learnings per day (from merged PRs and engineer-bot author runs) until it is merged; merging it starts a fresh one. The bot never writes the canonical log directly.

Latest update 2026-11-11: 2 new learning(s) since 2026-11-10T17:25:56Z.

Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
@peco-engineer-bot peco-engineer-bot Bot added the engineer-bot-learning Auto-generated retrospective learning PR label Nov 10, 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

This PR only adds to the knowledge log, and it looks good apart from one wording issue. Both new entries match the code: _renders_as_in_list excludes bytes/bytearray, and _markers_following_in swaps escaped strings for '' and checks the nonce. One nit, not posted inline: the new entries indent the **Rule:** continuation line by 4 spaces, while every earlier entry uses 2.


### 2026-11-10: learnings since 2026-11-09T17:26:03Z
- **Context:** PR #1013 (#629) made inline params render a sequence directly after `IN` as `(1,2,3)` instead of `ARRAY(1,2,3)`. The reviewer noticed that `_renders_as_array` treats any non-`str` `Sequence` as list-able, and that includes `bytes`/`bytearray`. Before the change, `x IN %s` with bytes rendered as `IN ARRAY(97,98,99)`, which Spark rejected with a loud `PARSE_SYNTAX_ERROR`. After it, the query became valid SQL and quietly matched the wrong rows. The fix left bytes out of the IN-list path.
**Rule:** When you widen which input types take a new rendering or conversion path, list the types that used to fail loudly (bytes, str, sets, empty containers) and check that none of them now produce valid but wrong output. Exclude those types on purpose and pin each one with a unit test, because a loud error that turns into a silent wrong result is a regression.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Low — The Rule lists sets next to bytes as types that "used to fail loudly", then says "Exclude those types on purpose". In the same PR (#1013), sets were deliberately moved onto the new path: _renders_as_in_list accepts AbstractSet, and render_inline sorts the items. Read literally, the rule tells a future author to exclude any type that used to fail loudly. That conflicts with the code this entry describes. Suggest rewording so the instruction is to check each previously-failing type and exclude it only when the new output would be wrong (as with bytes/bytearray), not to exclude all of them by reflex.

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 Nit

Looks good. This is a docs-only append to the learning log, and I found only one formatting nit. I checked the factual claims against the repo: the kernel extra is ^1.4.0 in pyproject.toml:73, and kernel-e2e.yml builds from the KERNEL_REV SHA. Both match what the entries say.

Other findings

  • ⚪ Nit — The **Rule:** continuation lines in the 2026-11-10 section are indented 4 spaces. Every other entry in the log, including the 2026-11-11 section, uses 2. It renders the same, but it's worth normalizing to 2 for consistency.

This branch was previously deployed

1 inactive deployment
azure-prod — 1d8e3bd9 Deployed Nov 11, 2026 by peco-engineer-bot[bot] via followup #1515
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engineer-bot-learning Auto-generated retrospective learning PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants