Skip to content

refactor(coderd/x/chatd): address worker review comments - #26510

Closed
hugodutka wants to merge 1 commit into
mainfrom
fix-chatd-worker-review
Closed

hugodutka wants to merge 1 commit into
mainfrom
fix-chatd-worker-review

Conversation

@hugodutka

@hugodutka hugodutka commented Jun 18, 2026 •

Copy link
Copy Markdown
Collaborator

Addresses the deferred coderd/x/chatd/worker.go review comments from PR #26109 by making the parent context distinct in chatWorker.Start and replacing the WaitIdle polling magic number with a documented constant.

Review comments addressed:

Generated by Coder Agents and reviewed by Hugo.

@hugodutka

Copy link
Copy Markdown
Collaborator Author

/coder-agents-review

@coder-agents-review

coder-agents-review Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-06-18 14:12 UTC by @hugodutka
Spend: $8.63 / $100.00

Review history
  • R1 (2026-06-18): 11 reviewers, 1 P3, COMMENT. Review

deep-review v0.8.0 | Round 1 | a5a4c49..794a99c

Last posted: Round 1, 1 findings (1 P3), COMMENT. Review

Finding inventory

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 P3 Open worker.go:0 PR/commit subject describes process provenance instead of code behavior R1 Leorio Yes
CRF-2 P2 Dropped by orchestrator (Leorio assessed same comment as solid; two specialists disagree; comment is accurate and serves warning function for 18 test call sites) worker.go:18 waitIdlePollInterval comment restates what code already shows R1 Gon No

Round log

Round 1

Panel (11 reviewers). 1 P3 (process), 1 dropped. Reviewed against a5a4c49..794a99c.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clean, well-scoped follow-up. The parentCtx rename makes the context hierarchy immediately obvious to the next reader, and the constant extraction with its doc comment is the right level of documentation for a polling interval that 18 test call sites depend on. No behavioral change, no scope drift, CI green.

Severity summary: 0 P0, 0 P1, 0 P2, 1 P3, 0 Nit.

The panel was split on whether the waitIdlePollInterval doc comment is too verbose (Gon) or exactly right (Leorio). Leorio verified the claim against 18 call sites and praised the warning function; Gon demonstrated the name and value already communicate most of it. Both arguments have merit. The comment is accurate and serves a real purpose, so no action needed.

🤖 This review was automatically generated with Coder Agents.

Comment thread coderd/x/chatd/worker.go
"github.com/coder/coder/v2/coderd/x/chatd/chatstate"
)

// waitIdlePollInterval is intentionally short because WaitIdle is used by

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P3 [CRF-1] The PR title (and squash-merge subject) "address worker review comments" communicates process provenance, not code behavior. A git blame reader landing on the renamed parameter or the new constant learns nothing about why the change was made. Something like rename Start context param, extract WaitIdle poll constant would tell the next reader what actually happened. (Leorio)

"Someone hitting this in git log learns that some review comments from some other PR were addressed. They don't learn that the parent context parameter was renamed for clarity, or that a magic number became a named constant."

🤖

@github-actions github-actions Bot added the stale This issue is like stale bread. label Jun 28, 2026
@github-actions github-actions Bot closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This issue is like stale bread.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant