-
Notifications
You must be signed in to change notification settings - Fork 0
Kapellmeister's Errata: Align Our House Score #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ach! Even ze machine's notation must be clean and without superfluous ornamentation. Zis movement ensures consistent syntactic rigor across all automated workflows, preparing our score for distribution. * **Syntactic Normalization:** Switched single quotes to double quotes (`"3.x"`) and removed excessive whitespace around list elements in YAML. The music must be metrically precise. * **Relocation:** Updated all `uses:` paths and example documentation (in README, Instructions, and scripts) to reflect the final, true location of the *Draft Punks* concerto repository. The score must be fetched from its proper concert hall (`flyingrobots/draft-punks`). * **Thematic Example:** Updated the example PR number to a thematically appropriate '69' in the seeding script's documentation. Discipline must be absolute. The metronome is steady. *— P.R. PhiedBach, Kapellmeister of Commits*
Summary by CodeRabbit
Summary by CodeRabbit
WalkthroughReformatted GitHub Actions YAMLs (quoting/spacing), replaced workflow action references in docs/README to Changes
Sequence Diagram(s)sequenceDiagram
participant Script as check_coderabbit_threads.py
participant GitHub as GitHub GraphQL API
rect rgb(235,245,255)
Note over Script: Build JSON payload & headers (Authorization, Accept, Content-Type)
end
Script->>GitHub: POST /graphql (urllib.request)
alt success (200)
GitHub-->>Script: Response bytes
Script->>Script: decode bytes -> parse JSON
alt graphql errors present
Script->>Script: raise RuntimeError with graphql errors
else
Script-->>Script: return data
end
else HTTPError / URLError
GitHub-->>Script: error response / network error
Script->>Script: read error body (if any), decode
Script->>Script: raise RuntimeError with descriptive message (chained original)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Ruff (0.13.1)tools/review/check_coderabbit_threads.py�[1;31mruff failed�[0m Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (8)
.github/workflows/apply-feedback.yml(1 hunks).github/workflows/auto-seed-review.yml(2 hunks).github/workflows/coderabbit-status.yml(1 hunks).github/workflows/seed-review.yml(1 hunks)Instructions.md(2 hunks)README.md(3 hunks)docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md(1 hunks)tools/review/seed_feedback_from_github.py(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md
101-101: Bare URL used
(MD034, no-bare-urls)
docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md
Outdated
Show resolved
Hide resolved
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: James Ross <james@flyingrobots.dev>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md(1 hunks)docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md
68-68: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
81-81: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
99-99: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
106-106: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
106-106: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
115-115: Bare URL used
(MD034, no-bare-urls)
246-246: Bare URL used
(MD034, no-bare-urls)
| ``` | ||
| In docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md around | ||
| lines 101 to 103 there is a naked/raw URL that violates MD034; replace the raw | ||
| URL with a proper Markdown link (e.g., use [descriptive text](https://...) or | ||
| otherwise format it as an explicit link) so the linter stops flagging the file | ||
| and the doc renders cleanly. | ||
| ``` | ||
|
|
||
| </details> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ADD A LANGUAGE TAG TO THIS CODE FENCE.
Why am I staring at another anonymous fence? markdownlint (MD040/MD031) is already barfing. Slap a language on it and give it breathing room, or this archive stays blocked.
<summary>🤖 Prompt for AI Agents</summary>
-```
-In docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md around
-lines 101 to 103 there is a naked/raw URL that violates MD034; replace the raw
-URL with a proper Markdown link (e.g., use [descriptive text](https://...) or
-otherwise format it as an explicit link) so the linter stops flagging the file
-and the doc renders cleanly.
-```
-
-</details>
+```text
+In docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md around
+lines 101 to 103 there is a naked/raw URL that violates MD034; replace the raw
+URL with a proper Markdown link (e.g., use [descriptive text](https://...) or
+otherwise format it as an explicit link) so the linter stops flagging the file
+and the doc renders cleanly.
+```
+
+</details>🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
68-68: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md around
lines 68 to 76, the code fence is missing a language tag and contains a
naked/raw URL that triggers MD040/MD031 and MD034; update the opening fence to
include an appropriate language (e.g., ```text or ```diff) and replace the raw
URL inside the fenced block with a proper Markdown link using descriptive text
(e.g., [description](https://...)) so the linter no longer flags the file and
the block renders correctly.
| ``` | ||
| </details> | ||
| <!-- fingerprinting:phantom:triton:sabertoothed --> | ||
| <!-- This is an auto-generated comment by CodeRabbit --> | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STOP SHIPPING BARE URLs.
Line 113 is still naked, so MD034 keeps screaming. Wrap the link properly; this is basic hygiene.
-_Meta_: https://github.com/flyingrobots/draft-punks/pull/1#discussion_r2386420430
+_Meta_: <https://github.com/flyingrobots/draft-punks/pull/1#discussion_r2386420430>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` | |
| </details> | |
| <!-- fingerprinting:phantom:triton:sabertoothed --> | |
| <!-- This is an auto-generated comment by CodeRabbit --> | |
| ``` | |
| </details> | |
| <!-- fingerprinting:phantom:triton:sabertoothed --> | |
| <!-- This is an auto-generated comment by CodeRabbit --> | |
| _Meta_: <https://github.com/flyingrobots/draft-punks/pull/1#discussion_r2386420430> |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
106-106: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
106-106: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md around
lines 106 to 114 there is a bare URL on line 113 triggering MD034; replace it
with a proper markdown link or enclose it in angle brackets to avoid a naked URL
(e.g., convert to [descriptive text](https://example.com) or
<https://example.com>), ensuring link text is descriptive if possible.
|
|
||
| ### General comment — coderabbitai[bot] | ||
|
|
||
| ```text | ||
| <!-- This is an auto-generated comment: summarize by coderabbit.ai --> | ||
| <!-- This is an auto-generated comment: review in progress by coderabbit.ai --> | ||
| > [!NOTE] | ||
| > Currently processing new changes in this PR. This may take a few minutes, please wait... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TAG THE SECOND CODE FENCE TOO.
Didn't learn from the first one? This second prompt block also violates MD040/MD031. Fix it the same way so the linter shuts up.
<summary>🤖 Prompt for AI Agents</summary>
-```
-In README.md around lines 133 to 136 the branch and PR links still point to the
-old org "neuroglyph"; update both the branch URL and the PR URL to use the new
-org "flyingrobots" (i.e., change the base domain paths from
-github.com/neuroglyph/... to github.com/flyingrobots/...) so the branch and PR
-links correctly reference the flyingrobots/git-mind repo; keep the displayed
-branch text, SHA and PR number unchanged.
-```
-
-</details>
+```text
+In README.md around lines 133 to 136 the branch and PR links still point to the
+old org "neuroglyph"; update both the branch URL and the PR URL to use the new
+org "flyingrobots" (i.e., change the base domain paths from
+github.com/neuroglyph/... to github.com/flyingrobots/...) so the branch and PR
+links correctly reference the flyingrobots/git-mind repo; keep the displayed
+branch text, SHA and PR number unchanged.
+```
+
+</details>🤖 Prompt for AI Agents
docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md around lines
118 to 126: the second fenced code block is not tagged with a language which
triggers MD040/MD031; update the opening fence to include the language
identifier "text" (i.e., change ``` to ```text) and ensure the closing fence
remains ``` so the block is properly tagged and the linter stops complaining.
| _Meta_: https://github.com/flyingrobots/draft-punks/pull/1#issuecomment-3344395219 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NO RAW LINKS IN THE FOOTER EITHER.
You fixed one _Meta_ link and then left this one raw? Come on. Wrap it or expect the lint job to torch the PR again.
-_Meta_: https://github.com/flyingrobots/draft-punks/pull/1#issuecomment-3344395219
+_Meta_: <https://github.com/flyingrobots/draft-punks/pull/1#issuecomment-3344395219>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| _Meta_: https://github.com/flyingrobots/draft-punks/pull/1#issuecomment-3344395219 | |
| _Meta_: <https://github.com/flyingrobots/draft-punks/pull/1#issuecomment-3344395219> |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
246-246: Bare URL used
(MD034, no-bare-urls)
🤖 Prompt for AI Agents
In docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md around
lines 246 to 247, there is a raw URL in the footer ("_Meta_:
https://github.com/...") which violates the no-raw-links rule; replace or wrap
the raw link using the project's preferred format (e.g., Markdown link text
[Meta] or reference-style link) so the footer contains a wrapped/linkified URL
consistent with the other fixes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
README.md (3)
100-111: Pin to an immutable commit, not a tag.
@v1.0.0can be moved. Supply-chain basics: pin to a commit SHA for the reusable workflow.-uses: flyingrobots/draft-punks/.github/workflows/apply-feedback.yml@v1.0.0 +uses: flyingrobots/draft-punks/.github/workflows/apply-feedback.yml@<COMMIT-SHA>
104-111: Use a clearer glob.
docs/code-reviews/**.mdworks, but**/*.mdis the conventional, less surprising pattern.- push: - paths: ['docs/code-reviews/**.md'] + push: + paths: ["docs/code-reviews/**/*.md"]
87-98: STOP SHIPPING A FOOTGUN: PULL_REQUEST_TARGET + SECRETS: INHERIT IS RECKLESS!
- Restrict job permissions and pin the reusable workflow to a full commit SHA.
- Verify the seed-review workflow never checks out
${{ github.event.pull_request.head.sha }}or runs untrusted inputs—if it does, switch topull_requestand drop secrets.jobs: seed: - uses: flyingrobots/draft-punks/.github/workflows/seed-review.yml@v1.0.0 - secrets: inherit + permissions: + contents: read + pull-requests: read + issues: write + uses: flyingrobots/draft-punks/.github/workflows/seed-review.yml@<COMMIT-SHA> + secrets: inherit + with: + pr_number: ${{ github.event.pull_request.number }} + base_repo: ${{ github.repository }}tools/review/check_coderabbit_threads.py (1)
49-104: You filtered the wrong thing. Last commenter ≠ thread owner. Fix the logic.You only flag threads where CodeRabbit is the last commenter. If a human replied and it’s still unresolved, you miss it. Key off the thread’s first comment author instead.
Apply this refactor (aliases first/last comments; check initiator; keep printing last snippet):
@@ - query = """ + query = """ query($owner: String!, $repo: String!, $number: Int!, $after: String) { repository(owner: $owner, name: $repo) { pullRequest(number: $number) { reviewThreads(first: 100, after: $after) { pageInfo { hasNextPage endCursor } nodes { isResolved - comments(last: 1) { + firstComment: comments(first: 1) { nodes { author { login } url body } } + lastComment: comments(last: 1) { + nodes { + author { login } + url + body + } + } } } } } } """ @@ - for thread in threads["nodes"]: + for thread in threads["nodes"]: if thread["isResolved"]: continue - comments = thread["comments"]["nodes"] - if not comments: + first_nodes = thread["firstComment"]["nodes"] + if not first_nodes: continue - last_comment = comments[-1] - author = last_comment.get("author") - login = author.get("login") if author else None - if login == CODERABBIT_LOGIN: - unresolved.append((last_comment.get("url", ""), last_comment.get("body", ""))) + initiator = first_nodes[0] + init_author = initiator.get("author") + init_login = init_author.get("login") if init_author else None + if (init_login or "").lower() in CODERABBIT_LOGINS: + last_nodes = thread["lastComment"]["nodes"] + last_comment = last_nodes[-1] if last_nodes else initiator + unresolved.append((last_comment.get("url", ""), last_comment.get("body", "")))
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (5)
README.md(3 hunks)docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md(1 hunks)docs/code-reviews/PR1/85ac499f573fd79192a02aae02d2b0d97fcbc8c8.md(1 hunks)docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md(1 hunks)tools/review/check_coderabbit_threads.py(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md
68-68: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
81-81: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
118-118: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
125-125: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
125-125: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
134-134: Bare URL used
(MD034, no-bare-urls)
265-265: Bare URL used
(MD034, no-bare-urls)
268-268: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
273-273: Trailing spaces
Expected: 0 or 2; Actual: 1
(MD009, no-trailing-spaces)
docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md
68-68: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
83-83: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
83-83: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
101-101: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
108-108: Fenced code blocks should be surrounded by blank lines
(MD031, blanks-around-fences)
108-108: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
117-117: Bare URL used
(MD034, no-bare-urls)
🔇 Additional comments (7)
docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md (1)
101-101: Good—bare URL is no longer bare.The
_Meta_link is properly wrapped; the MD034 gripe is gone.```docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md (5)
68-76: Tag the damn fence and give it breathing room.Anonymous fence at this block violates MD040/MD031. Add a language and keep blank lines. This isn’t optional.
Apply:
<summary>🤖 Prompt for AI Agents</summary> -``` +```text In docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md around lines 101 to 103 there is a naked/raw URL that violates MD034; replace the raw URL with a proper Markdown link (e.g., use [descriptive text](https://...) or otherwise format it as an explicit link) so the linter stops flagging the file and the doc renders cleanly.
81-81: Another naked fence? Come on.Line 81: fence without language (MD040). Tag it or the linter torches the build.
Apply:
-``` +```text
134-134: Stop shipping bare URLs. Wrap it.MD034 at Line 134. Wrap in angle brackets (or proper link text).
Apply:
-_Meta_: https://github.com/flyingrobots/draft-punks/pull/1#discussion_r2386420430 +_Meta_: <https://github.com/flyingrobots/draft-punks/pull/1#discussion_r2386420430>
265-266: And you left another raw URL in the footer. Why?MD034 at Line 265. Same fix.
Apply:
-_Meta_: https://github.com/flyingrobots/draft-punks/pull/1#issuecomment-3344395219 +_Meta_: <https://github.com/flyingrobots/draft-punks/pull/1#issuecomment-3344395219>
118-126: Fences must be surrounded by blank lines and have a language.This block trips MD031 and MD040. Fix it the same way as the first one.
Apply:
<details> <summary>🤖 Prompt for AI Agents</summary> -``` +```text In README.md around lines 133 to 136 the branch and PR links still point to the old org "neuroglyph"; update both the branch URL and the PR URL to use the new org "flyingrobots" (i.e., change the base domain paths from github.com/neuroglyph/... to github.com/flyingrobots/...) so the branch and PR links correctly reference the flyingrobots/git-mind repo; keep the displayed branch text, SHA and PR number unchanged.
docs/code-reviews/PR1/85ac499f573fd79192a02aae02d2b0d97fcbc8c8.md (1)
85-85: Wrap raw URLs in angle brackets for MD034 compliance
Enclose every_Meta_:URL in angle brackets—that is, replace all_Meta_: https://…with_Meta_: <https://…>at lines 85, 117, 187, 262, 318, 385, and 518.Likely an incorrect or invalid review comment.
| ```text | ||
| _⚠️ Potential issue_ | _🟡 Minor_ | ||
| **FIX THE RAW URL; THE LINTER IS SCREAMING FOR A REASON.** | ||
| Leaving a naked URL in Line 101 violates MD034 and makes the doc look like it was thrown together during a power outage. Wrap it in proper Markdown so the pipeline stops whining. Based on static analysis. | ||
| Apply this diff so we stop shipping lint errors: | ||
| ```diff | ||
| -_Meta_: https://github.com/flyingrobots/draft-punks/pull/1#issuecomment-3344395219 | ||
| +_Meta_: <https://github.com/flyingrobots/draft-punks/pull/1#issuecomment-3344395219> | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
Consistent fence tagging across the file.
Every fence showing prompts/diffs must declare a language (“text” or “diff”). Audit and fix them consistently to prevent new MD040/MD031 regressions.
Run this to verify locally:
Also applies to: 65-76, 106-114, 118-126
🏁 Script executed:
#!/bin/bash
# Fail on anonymous fences and bare Meta URLs
set -euo pipefail
echo "Anonymous fences:"
rg -nP '^\s*```$' docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md || true
echo "Bare Meta URLs:"
rg -nP '^\s*_Meta_:\s+https?://' docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md || trueLength of output: 358
FIX RAW URLS AND ANONYMOUS FENCES
- Wrap each
_Meta_:URL in<…>(lines 83, 134, 265) to satisfy MD034. - Add language identifiers to every ``` fence (lines 31, 45, 68, 74, 81, 118, 125, 132, 263) to prevent MD040/MD031 failures.
🤖 Prompt for AI Agents
In docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md around
lines 20–31, the reviewer flagged raw URLs and anonymous code fences causing
MD034 and MD040/MD031 linter failures; fix by wrapping each raw `_Meta_:` URL in
angle brackets (e.g., change the naked URL at lines 83, 134, 265 to <...>) and
add explicit language identifiers to every triple-backtick fence listed (lines
31, 45, 68, 74, 81, 118, 125, 132, 263) so the markdown linter stops flagging
MD034/MD040/MD031.
| > [!note]- **Accepted** | ||
| > | Confidence | Remarks | | ||
| > |------------|---------| | ||
| > | 0 | This seems like a bug... | | ||
| > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tables need air. Surround with blank lines.
MD058: the table after the “Accepted” callout isn’t surrounded by blank lines. Add them.
Apply:
->_ [!note]- **Accepted**
+> [!note]- **Accepted**
+
| Confidence | Remarks |
|------------|---------|
| 0 | This seems like a bug... |
+Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
268-268: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
🤖 Prompt for AI Agents
docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md around lines
267-271: the table immediately follows the callout block without blank lines
which triggers MD058; insert a blank line after the callout closing (or after
the callout marker) and another blank line after the table so the table is
separated from surrounding content, ensuring there is an empty line before the
table and one after it.
| > | 0 | This seems like a bug... | | ||
| > | ||
| > ## Lesson Learned | ||
| > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kill the trailing space.
MD009 at Line 273. Delete it.
Apply:
->
+>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| > | |
| > |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
273-273: Trailing spaces
Expected: 0 or 2; Actual: 1
(MD009, no-trailing-spaces)
🤖 Prompt for AI Agents
In docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md around line
273, there is a trailing space causing MD009; remove the extra whitespace at the
end of that line (delete the trailing space character) and save the file, then
re-run the markdown linter to confirm the MD009 warning is cleared.
| CODERABBIT_LOGIN = "coderabbitai" | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your bot login check will miss the actual bot. Handle coderabbitai[bot].
GraphQL returns login: "coderabbitai[bot]" for the bot account. Your exact match on coderabbitai drops valid threads.
-CODERABBIT_LOGIN = "coderabbitai"
+# Accept both human and bot forms; compare case-insensitively.
+CODERABBIT_LOGINS = {"coderabbitai", "coderabbitai[bot]"}
@@
- if login == CODERABBIT_LOGIN:
+ if (login or "").lower() in CODERABBIT_LOGINS:
unresolved.append((last_comment.get("url", ""), last_comment.get("body", "")))Note: this diff assumes the old “last comment” logic; pair it with the initiator fix above. Adjust the membership check there too.
Also applies to: 95-99
🤖 Prompt for AI Agents
In tools/review/check_coderabbit_threads.py around lines 20-21 (and also update
lines 95-99), the code only matches CODERABBIT_LOGIN == "coderabbitai" exactly
and will miss GraphQL returns like "coderabbitai[bot]"; change the check to
accept either form by normalizing the login (lowercase and strip an optional
"[bot]" suffix) or by using startswith("coderabbitai")/a regex that allows an
optional "[bot]" suffix, and apply the same normalization to the
membership/initiator checks at lines 95-99 so both places consistently recognize
the bot account.
| CODERABBIT_LOGIN = "coderabbitai" | ||
|
|
||
|
|
||
| def github_graphql(token: str, query: str, variables: dict) -> dict: | ||
| response = requests.post( | ||
| GRAPHQL_ENDPOINT, | ||
| json={"query": query, "variables": variables}, | ||
| headers={"Authorization": f"Bearer {token}", "Accept": "application/vnd.github+json"}, | ||
| timeout=30, | ||
| ) | ||
| if response.status_code != 200: | ||
| payload = json.dumps({"query": query, "variables": variables}).encode("utf-8") | ||
| headers = { | ||
| "Authorization": f"Bearer {token}", | ||
| "Accept": "application/vnd.github+json", | ||
| "Content-Type": "application/json", | ||
| } | ||
| req = request.Request(GRAPHQL_ENDPOINT, data=payload, headers=headers, method="POST") | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Add a damn User-Agent.
GitHub expects it. Don’t rely on Python’s default UA.
CODERABBIT_LOGIN = "coderabbitai"
+USER_AGENT = "draft-punks-check/1.0 (+https://github.com/flyingrobots/draft-punks)"
@@
headers = {
"Authorization": f"Bearer {token}",
"Accept": "application/vnd.github+json",
"Content-Type": "application/json",
+ "User-Agent": USER_AGENT,
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| CODERABBIT_LOGIN = "coderabbitai" | |
| def github_graphql(token: str, query: str, variables: dict) -> dict: | |
| response = requests.post( | |
| GRAPHQL_ENDPOINT, | |
| json={"query": query, "variables": variables}, | |
| headers={"Authorization": f"Bearer {token}", "Accept": "application/vnd.github+json"}, | |
| timeout=30, | |
| ) | |
| if response.status_code != 200: | |
| payload = json.dumps({"query": query, "variables": variables}).encode("utf-8") | |
| headers = { | |
| "Authorization": f"Bearer {token}", | |
| "Accept": "application/vnd.github+json", | |
| "Content-Type": "application/json", | |
| } | |
| req = request.Request(GRAPHQL_ENDPOINT, data=payload, headers=headers, method="POST") | |
| CODERABBIT_LOGIN = "coderabbitai" | |
| USER_AGENT = "draft-punks-check/1.0 (+https://github.com/flyingrobots/draft-punks)" | |
| def github_graphql(token: str, query: str, variables: dict) -> dict: | |
| payload = json.dumps({"query": query, "variables": variables}).encode("utf-8") | |
| headers = { | |
| "Authorization": f"Bearer {token}", | |
| "Accept": "application/vnd.github+json", | |
| "Content-Type": "application/json", | |
| "User-Agent": USER_AGENT, | |
| } | |
| req = request.Request(GRAPHQL_ENDPOINT, data=payload, headers=headers, method="POST") |
🤖 Prompt for AI Agents
In tools/review/check_coderabbit_threads.py around lines 20 to 31, the
github_graphql function builds headers for the request but omits a User-Agent
header; GitHub requires an explicit User-Agent. Add a "User-Agent" entry to the
headers (e.g. the repo/app name and version or a descriptive string like
"coderabbit-checker/1.0") so the headers include Authorization, Accept,
Content-Type and User-Agent before creating the request.
| data = json.loads(body.decode("utf-8")) | ||
| if "errors" in data: | ||
| raise RuntimeError(f"GitHub GraphQL error: {data['errors']}") | ||
| return data["data"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guard against garbage JSON.
If GitHub bounces with HTML or a proxy page, json.loads explodes. Fail cleanly.
- data = json.loads(body.decode("utf-8"))
+ try:
+ data = json.loads(body.decode("utf-8"))
+ except json.JSONDecodeError as exc:
+ raise RuntimeError("GitHub GraphQL returned non-JSON response") from exc📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| data = json.loads(body.decode("utf-8")) | |
| if "errors" in data: | |
| raise RuntimeError(f"GitHub GraphQL error: {data['errors']}") | |
| return data["data"] | |
| try: | |
| data = json.loads(body.decode("utf-8")) | |
| except json.JSONDecodeError as exc: | |
| raise RuntimeError("GitHub GraphQL returned non-JSON response") from exc | |
| if "errors" in data: | |
| raise RuntimeError(f"GitHub GraphQL error: {data['errors']}") | |
| return data["data"] |
🤖 Prompt for AI Agents
tools/review/check_coderabbit_threads.py around lines 43-46: currently the code
calls json.loads(body.decode("utf-8")) unguarded; wrap the JSON parsing in a
try/except catching json.JSONDecodeError (and optionally UnicodeDecodeError) and
on failure raise a RuntimeError that includes a short preview of the raw
response body (e.g., first 500 chars) so we fail cleanly on HTML/proxy pages;
after successful parse, also defensively check that "data" is present before
returning and raise a clear RuntimeError if it's missing.
🎼 Guten abend, maintainers! Kapellmeister P.R. PhiedBach takes the podium once more. BunBun nods approvingly; the LEDs dim. I present a brief errata to keep our orchestration in perfect tempo.
Scherzo of Adjustments
neuroglyphbaton references with the correctflyingrobots/draft-punksscore.Coda & Testing
gh workflow run --dry-run(figuratively — the script itself remains untouched by execution).May this keep our review rehearsal chamber resonant and free of discordant metadata.
Mit herzlichem Gruß,
P.R. PhiedBach
Kapellmeister of Commits; Keeper of BunBun’s Red Bull Pyramid