Repository navigation
feat(jtk): add comments update to edit an existing comment - #499
Conversation
monit-reviewer
left a comment
There was a problem hiding this comment.
Automated PR Review
Reviewed commit: 4f4f46f74570
Profile: open-cli-collective-review - Posting as: monit-reviewer
Summary
| Reviewer | Findings |
|---|---|
| go:implementation-tests | 0 |
| policies:conventions | 1 |
policies:conventions (1 finding)
Major - tools/jtk/internal/cmd/comments/comments.go:224
This immediately overwrites the existing comment body without confirmation or an undo path. GUARDRAILS.md §5.1 explicitly requires confirmation when recovery depends on remembering lost state, including comment contents; keeping the ID does not make this reversible. Add a long-only --force flag and confirmation before the PUT, using ConfirmOrFail so --non-interactive without --force fails without writing. Update the examples and test cancellation, forced updates, and non-interactive rejection.
Reviewer Coverage
go:implementation-tests— complete (broad); inspected 4 assigned files (9 inspected across reviewers):tools/jtk/api/comments.go,tools/jtk/api/comments_test.go,tools/jtk/internal/cmd/comments/comments.go,tools/jtk/internal/cmd/comments/comments_test.go; skipped: none; constraints: Static review only; inspected implementation and tests but did not execute builds, tests, or live Jira verification.policies:conventions— complete (broad); inspected 7 assigned files (9 inspected across reviewers):skills/Jira/Workflows/ManageComments.md,tools/jtk/CHANGELOG.md,tools/jtk/README.md,tools/jtk/integration-tests.md,tools/jtk/internal/cmd/OUTPUT_SPEC.md,tools/jtk/internal/cmd/comments/comments.go,tools/jtk/internal/cmd/comments/comments_test.go; skipped: none; constraints: Reviewed the pinned diff and repository-local command contracts; no tests were executed. Shared command-surface documentation could not be inspected: sibling-path access was denied by the review tool.
Inspected files (9)
skills/Jira/Workflows/ManageComments.mdtools/jtk/CHANGELOG.mdtools/jtk/README.mdtools/jtk/api/comments.gotools/jtk/api/comments_test.gotools/jtk/integration-tests.mdtools/jtk/internal/cmd/OUTPUT_SPEC.mdtools/jtk/internal/cmd/comments/comments.gotools/jtk/internal/cmd/comments/comments_test.go
0 PR discussion threads considered. 0 summarized; 0 resolved.
Completed in 1m 04s | $0.06 | openai-codex/gpt-6.1-sol | cr 0.10.319
| Field | Value |
|---|---|
| Model | openai-codex/gpt-6.1-sol |
| Reviewers | go:implementation-tests, policies:conventions |
| Engine | pi_rpc · openai-codex/gpt-6.1-sol |
| Reviewed by | cr · monit-reviewer |
| Duration | 1m 04s wall · 1m 22s compute |
| Cost | $0.06 |
| Tokens | 24.9k in / 776 out |
Per-workstream usage
orchestrator-selection— openai-codex/gpt-6.1-sol- In: 6.3k
- Out: 310
- Cache read: 0
- Cache create: 0
- Cost: $0.02
- Duration: 14s
go:implementation-tests— openai-codex/gpt-6.1-sol- In: 2.9k
- Out: 113
- Cache read: 20.4k
- Cache create: 0
- Cost: $0.01
- Duration: 28s
policies:conventions— openai-codex/gpt-6.1-sol- In: 11.3k
- Out: 265
- Cache read: 23.9k
- Cache create: 0
- Cost: $0.03
- Duration: 35s
orchestrator-rollup— openai-codex/gpt-6.1-sol- In: 4.4k
- Out: 88
- Cache read: 0
- Cache create: 0
- Cost: $0.01
- Duration: 4s
monit-reviewer
left a comment
There was a problem hiding this comment.
Automated PR Review
Reviewed commit: 5ded6aea3413
Profile: open-cli-collective-review - Posting as: monit-reviewer
Summary
| Reviewer | Findings |
|---|---|
| go:implementation-tests | 0 |
| policies:conventions | 0 |
Reviewer Coverage
go:implementation-tests— complete (constrained); inspected 5 assigned files (10 inspected across reviewers):tools/jtk/api/comments.go,tools/jtk/api/comments_test.go,tools/jtk/internal/cmd/comments/comments.go,tools/jtk/internal/cmd/comments/comments_test.go,tools/jtk/internal/present/comment.go; skipped: none; constraints: Review limited to the five assigned Go files and their visible surrounding context. Tests were inspected, not executed; only read-only repository tools were available.policies:conventions— complete (constrained); inspected 7 assigned files (10 inspected across reviewers):skills/Jira/Workflows/ManageComments.md,tools/jtk/CHANGELOG.md,tools/jtk/README.md,tools/jtk/integration-tests.md,tools/jtk/internal/cmd/OUTPUT_SPEC.md,tools/jtk/internal/cmd/comments/comments.go,tools/jtk/internal/cmd/comments/comments_test.go; skipped: none; constraints: Reviewed against visible repo-local conventions; linked cli-common standards and external harness principles were not available in the review context. Static review only; tests and live Jira behavior were not independently executed.
Inspected files (10)
skills/Jira/Workflows/ManageComments.mdtools/jtk/CHANGELOG.mdtools/jtk/README.mdtools/jtk/api/comments.gotools/jtk/api/comments_test.gotools/jtk/integration-tests.mdtools/jtk/internal/cmd/OUTPUT_SPEC.mdtools/jtk/internal/cmd/comments/comments.gotools/jtk/internal/cmd/comments/comments_test.gotools/jtk/internal/present/comment.go
1 PR discussion threads considered. 1 summarized; 1 resolved.
Completed in 58s | $0.03 | openai-codex/gpt-6.1-sol | cr 0.10.319
| Field | Value |
|---|---|
| Model | openai-codex/gpt-6.1-sol |
| Reviewers | go:implementation-tests, policies:conventions |
| Engine | pi_rpc · openai-codex/gpt-6.1-sol |
| Reviewed by | cr · monit-reviewer |
| Duration | 58s wall · 45s compute |
| Cost | $0.03 |
| Tokens | 10.5k in / 404 out |
Per-workstream usage
go:implementation-tests— openai-codex/gpt-6.1-sol- In: 5.3k
- Out: 174
- Cache read: 10.9k
- Cache create: 0
- Cost: $0.01
- Duration: 15s
policies:conventions— openai-codex/gpt-6.1-sol- In: 1.0k
- Out: 167
- Cache read: 22.5k
- Cache create: 0
- Cost: $0.01
- Duration: 25s
orchestrator-rollup— openai-codex/gpt-6.1-sol- In: 4.2k
- Out: 63
- Cache read: 0
- Cache create: 0
- Cost: $0.01
- Duration: 4s
Closes #498.
jtk commentshadlist,add, anddeletebut no way to change an existing comment. Fixing a typo or a stale link meant delete-and-re-add, which changes the comment ID and moves it to the bottom of the thread. This addsjtk comments update <issue-key> <comment-id> --body, usingupdateper the verb table ininternal/cmd/GUARDRAILS.md.api.Client.UpdateCommentsendsPUT /rest/api/3/issue/{key}/comment/{id}with an ADF body and returns the updated comment. Empty issue key or comment ID returns the existing sentinel errors before any request.--bodygoes through the same path ascomments add: markdown conversion, escape-sequence interpretation, and raw ADF passthrough (jtk: pass raw ADF through for rich-text fields (completes #191) #484) viatext.InterpretEscapesUnlessRawADF.--force.--non-interactivewithout--forcefails before any request.comments adddetail block, and--idemits the comment ID.Testing: API tests cover the method, path, request body, and both sentinel errors. Command tests cover the arg and required-flag contract, prompt decline, confirm, and non-interactive rejection (asserting no write), the detail output,
--id, and raw ADF passthrough with an escaped\nand aninlineCard.go build,go vet, andgo test -racepass on the touched packages, andgo test ./...for jtk passes. I checked against a live Jira Cloud site by adding a comment, updating it with a raw ADF body, reading it back, and deleting it. The comment kept its ID,updatedadvanced, and the code mark survived. Localgolangci-lintv2.12.2 fails to type-check the Go 1.27 standard library on this machine, which is unrelated to this diff, so CI is the lint gate.