Skip to content

Conversation

@flyingrobots
Copy link
Owner

🎼 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

  • Retuned every workflow to our house orchestra, replacing neuroglyph baton references with the correct flyingrobots/draft-punks score.
  • Tightened YAML notation (no stray spaces, consistent double quotes) so Actions parses like a well-behaved basso continuo.
  • Re-engraved the README table and seeding script usage example to match the new catalog numbers.

Coda & Testing

  • No automated suites required; documentation and workflow notation only.
  • Verified formatting by letting BunBun hum through 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

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*
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 28, 2025

Summary by CodeRabbit

  • Documentation

    • Updated README and Instructions to reference the new organization and refreshed examples.
    • Added archival code-review feedback documents for PR1 to improve traceability.
  • Chores

    • Standardized quoting/formatting across multiple GitHub Actions workflows.
    • Updated workflow references to the new organization without changing behavior.
  • Refactor

    • Improved reliability and error messaging in the code-review status checking tool to handle network/API errors more robustly.

Summary by CodeRabbit

  • Documentation

    • Updated references to GitHub Actions from neuroglyph/draft-punks to flyingrobots/draft-punks in docs and README.
    • Improved README formatting, including the Code Review Feedback table.
    • Added archival code-review documents for traceability.
    • Refreshed a usage example in tooling comments to reflect current repository and PR details.
  • Chores

    • Standardized quoting and spacing in CI workflows; no behavioral changes.

Walkthrough

Reformatted GitHub Actions YAMLs (quoting/spacing), replaced workflow action references in docs/README to flyingrobots/draft-punks/..., added three archival code-review markdowns, updated a tooling usage example comment, and replaced a requests-based HTTP call with a urllib-based implementation including detailed error handling in tools/review/check_coderabbit_threads.py. No other runtime logic changes.

Changes

Cohort / File(s) Summary
GitHub Actions formatting
\.github/workflows/apply-feedback.yml, \.github/workflows/auto-seed-review.yml, \.github/workflows/coderabbit-status.yml, \.github/workflows/seed-review.yml
Normalized quoting/spacing in workflow YAMLs (e.g., '3.x'"3.x", [ main ][main]); no behavior changes.
Docs: action source updates
Instructions.md, README.md
Replaced neuroglyph/draft-punks/... references with flyingrobots/draft-punks/...; README table/header formatting adjusted and example links updated.
Archival review docs
docs/code-reviews/PR1/8dfbfab49b290a969ed7bb6248f3880137ef177d.md, docs/code-reviews/PR1/27b99435126e3d7a58706a4f6e0d20a5c02b1608.md, docs/code-reviews/PR1/85ac499f573fd79192a02aae02d2b0d97fcbc8c8.md
Added archival Markdown records documenting CodeRabbit review feedback, metadata, checklists, and references.
Tooling comment update
tools/review/seed_feedback_from_github.py
Updated example usage comment (owner/repo/PR) only.
Network call refactor & error handling
tools/review/check_coderabbit_threads.py
Replaced requests.post flow with urllib.request-based POST; added try/except for HTTPError/URLError, decodes response body, parses JSON, and raises descriptive RuntimeError on failures. Control flow and intent preserved but network/error handling changed.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

QUOTES aligned, workflows trimmed,
Docs retargeted, archives pinned.
A network call got tightened tight —
Read errors, raise, and do it right. 🚀

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning YOU BLEED-HEART POET, THIS TITLE IS A CRYPTIC METAPHOR THAT MUDDLES THE REAL CHANGES AND FORCES REVIEWERS TO GUESS THAT YOU’RE SWITCHING NEUROGLYPH REFERENCES TO FLYINGROBOTS AND STANDARDIZING YOUR YAML FORMATTING! Rename this drivel to something clear and explicit such as “Replace neuroglyph references with flyingrobots/draft-punks and standardize YAML formatting” so the goddamn changes are obvious at a glance.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed FINE, YOU HAVE A FLOWERY STYLE, BUT AT LEAST YOUR DESCRIPTION SPELLS OUT THE SWITCH FROM NEUROGLYPH TO FLYINGROBOTS, THE TIDYING OF YAML NOTATION, AND THE README AND SCRIPT UPDATES, SO IT MATCHS THE ACTUAL CHANGES!
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/format

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
�[1mCause:�[0m Failed to load configuration /ruff.toml
�[1mCause:�[0m Failed to parse /ruff.toml
�[1mCause:�[0m TOML parse error at line 26, column 3
|
26 | "RSE100", # Use of assert detected
| ^^^^^^^^
Unknown rule selector: RSE100


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 5547a98 and 3e4796e.

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

flyingrobots and others added 2 commits September 28, 2025 18:36
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: James Ross <james@flyingrobots.dev>
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3e4796e and 0369361.

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

Comment on lines +68 to +76
```
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>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

Comment on lines +106 to +114
```
</details>
<!-- fingerprinting:phantom:triton:sabertoothed -->
<!-- This is an auto-generated comment by CodeRabbit -->
```

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

Suggested change
```
</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.

Comment on lines +118 to +126

### 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...
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

Comment on lines +246 to +247
_Meta_: https://github.com/flyingrobots/draft-punks/pull/1#issuecomment-3344395219

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

Suggested change
_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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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.0 can 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/**.md works, but **/*.md is 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 to pull_request and 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

📥 Commits

Reviewing files that changed from the base of the PR and between 0369361 and 10c2e69.

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

Comment on lines +20 to +31
```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>
```
Copy link
Contributor

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

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

Comment on lines +267 to +271
> [!note]- **Accepted**
> | Confidence | Remarks |
> |------------|---------|
> | 0 | This seems like a bug... |
>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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
>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
>
>
🧰 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.

Comment on lines 20 to 21
CODERABBIT_LOGIN = "coderabbitai"

Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

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.

Comment on lines 20 to +31
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")

Copy link
Contributor

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.

Suggested change
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.

Comment on lines +43 to 46
data = json.loads(body.decode("utf-8"))
if "errors" in data:
raise RuntimeError(f"GitHub GraphQL error: {data['errors']}")
return data["data"]
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
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.

@flyingrobots flyingrobots merged commit f4553ed into main Sep 29, 2025
1 check passed
@flyingrobots flyingrobots deleted the chore/format branch September 29, 2025 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants