Repository navigation
Let a Bot report a DS Bot bug as a GitHub issue after the user approves a card - #1942
Conversation
Bind the prepared draft to the card so only a matching confirmation can send it to GitHub. Reuse the existing connector and offer a prefilled link when it cannot publish.
Record the approval and connector boundaries without adding a new interface.
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Open the repository’s configured bug template instead of its disabled blank issue form, keeping the approved fields in the capped fallback URL.
Normalize public drafts’ Unix and Windows home prefixes without changing the existing Feedback diagnostics.
Search between field completions so removing an encoded ellipsis cannot hide a longer valid link.
Keep both Unix variants covered without treating example paths as personal data in the tracked-tree leak scan.
Treat whitespace and quotes as username boundaries so a rename error cannot consume its destination path.
Allow spaced profile names while stopping at quotes, newlines and invalid Windows filename characters.
|
Tested
Not tested: GitHub's rendered form behind sign-in, connector-backed publication, and real-model skill selection. |
# Conflicts: # ds-bot/index.js
Fei2411
left a comment
There was a problem hiding this comment.
Code Reaper review — Verdict: pass (head 2a524f2d, comments only)
I checked the approval path end to end in code. Only a view-reply whose action is publish_ds_bot_issue, with confirmed: true, on the card bound in show_view, can trigger the write. It needs title, the deep-equal view and the one-time report_issue id. The view is deleted before any await, and save({ required: true }) runs before the POST, so a replay or a second click returns bot/stale. Typed replies, cancel and dismiss never reach settleIssueReport. The connector write respects sign-in, per-Bot offFor, connector read-only and host read-only.
2a524f2d only merges dev (which now has #1941) into a2f5cc3a. The PR's own files are unchanged, and the MODULES line keeps both issueReport and manualSkills. Local checks on a2f5cc3a: npm test 3531/3536 passed. The one failure, connectors-gateway "an upstream stream error cannot crash the engine", is in a file this PR doesn't touch and passes 2/2 when run alone (timing flake). On 2a524f2d I re-ran view-reply, connectors, manual-skills, prompt and privacy tests plus build-client --check. build-client --check and npm run lint are clean. The PR body has the Agent: Devin (Cognition) line and a Changelog entry. The design note is in docs/plans/.
None of these block the merge:
- The token can go to a host it wasn't issued for.
publishDsBotIssuealways POSTs tohttps://api.github.com. The GitHub connector signs in againstrt.config.github.api(and.endpoints/.url), which can point somewhere else. When those overrides are set, the Bearer token goes to github.com. Suggest returningundefined(the prefilled-link fallback) unlessoptions.apiis the defaulthttps://api.github.comand there is noendpointsoverride. - Bare home paths keep the username.
UNIX_HOME/WINDOWS_HOMEneed a separator after the username, so another user's/Users/alice.,(/home/bob)orC:\Users\Jane Doeat the end of a sentence stays as written (I ran the regexes from the PR). The current user's own home is still caught bycleanText. The user reviews the draft before it goes out, so this is low risk. Matching(?=[\\/]|$|[\s.,;:)\]'"])` after the name would close it. - A GitHub 5xx counts as "could not publish".
!response.okreturnsundefined, so the Bot says "Could not publish… submit on GitHub". A 502/503/504 may still have created the issue. Treatingstatus >= 500like a thrown error (the "check existing issues first" wording) would avoid duplicate manual filings. - Nit: provider naming.
report-ds-bot-issueis now served by theds-bot-goalprovider ingoal-skills.js, and the file's header comment was removed. Renaming it (e.g.bundled-skills.js), or at least restoring a header comment, keeps the module honest. #1941 added a third bundled-skill provider (manual-skills.js), so one shared provider is worth considering later.
Overlaps with other open PRs
- #1941 (ds-bot-manual skill) is already merged into
dev, and this head includes it. Small follow-up, here or right after: the manual'sreferences/troubleshooting.md("When reporting a bug, include…") should send Bots to thereport-ds-bot-issueskill, so the two bundled skills give the same advice. - #1919, #1915, #1654, #992: each will hit the same one-line
MODULESconflict inds-bot/index.js. It is trivial and shows up whichever lands second. - #1939, #1924, #1838, #1818 touch
channel.js/parts.js/tools.jsbut merge cleanly and don't touch the view-reply/show_view paths.
Keep credentials scoped to the default connector, warn on uncertain writes, and redact bare home directories.
Document the bundled reporting skill and its approval step.
Fei2411
left a comment
There was a problem hiding this comment.
Code Reaper re-review: pass (head 7ad93d67, comments only)
Every item from my review at 2a524f2d is fixed:
- Token stays on github.com.
publishDsBotIssuenow returnsundefinedbeforeloadSecrets()whenever the GitHub connection setsapito anything other thanhttps://api.github.com, or setsendpointsorurl. The prefilled form link is used in those cases. The newgh.testcases cover both overrides. - Home paths at the end of a sentence. I checked the new regexes against these inputs:
cwd is /Users/alice.→cwd is ~.,(/home/bob)→(~),C:\Users\Jane Doe→~,C:\Users\Jane Doe.→~.,/home/bob, then→~, then,path=/home/bob→path=~,C:/Users/bob/foo→~/foo. A 50k-character input ran with no measurable backtracking cost. - 5xx is reported as uncertain. A 5xx response now throws, so
settleIssueReporttells the user to check existing issues before submitting manually. goal-skills.jsheader comment is back.- The manual's
troubleshooting.mdnow points Bots toreport-ds-bot-issue.
Checks on this head: CI shows 7 passed and 0 failed. Locally, the view-reply, connectors, manual-skills, prompt and privacy tests pass 60/60, and build-client --check passes. npm run lint shows only the three existing warnings in unrelated files.
Non-blocking, for a later PR: a Windows home path with no trailing separator, followed by more words, redacts the rest of the sentence. For example, C:\Users\Jane Doe and more text → ~. This hides too much rather than too little, so no username leaks, but the report loses that text. Separately, /Users/ali ce/x → ~ ce/x. macOS short names can't contain spaces, so this is theoretical.
Overlaps: #1941 is already in dev. Compared with dev today, merging this PR adds one new conflict: #1919 will hit the trivial MODULES line in ds-bot/index.js. The other open PRs touching channel.js, parts.js, tools.js or index.js (#1938, #1935, #1934, #1915, #1855, #1838, #1817, #1654) have the same conflicts with or without this PR. #1939, #1924 and #1818 merge cleanly.
Issue
No issue; requested by the maintainer (many users hit problems but never report them).
What changed / 改了什么
report-ds-bot-issue(registered next to goal-grill ingoal-skills.js): when a user hits a DS Bot bug or asks to report one, the Bot checks for duplicates when possible, drafts a report following.github/ISSUE_TEMPLATE/bug.yml, and routes security reports to GitHub's private advisory form.issue-report.js: the host builds the draft (DS Bot/DSH versions, OS), strips known secrets and home paths (shared redaction fromdiagnostics.js), and binds the exact draft to the Bot's existingshow_viewconfirm card.channel.js/tools.js/parts.js: only the matching affirmativeview-replyon that card, durably claimed once, authorizes one GitHub write. Typed replies, dismissal, cancel, replacement and replays cannot.connectors/index.js: the write uses the Bot's existing GitHub connector credential, only forFei2411/DS-Bot, and respects sign-in, per-Bot access and read-only mode. Without a usable connection it returns a length-capped prefilledissues/newlink for manual submission. The Bot gets back the issue URL.docs/plans/self-report-issue.md. No client UI changes.Changelog
Bots can draft a DS Bot bug report and, after you approve it on a card, open it as a GitHub issue for you.
How I checked it / 怎么验证的
npm test(inds-bot/): 3529 pass, 0 failnode scripts/build-client.mjs --checknpm run lintNew tests in
view-reply.test.jsandconnectors.test.jscover approval, cancellation, replay, redaction, connector restrictions and the fallback link. Not done: a live GitHub write.Checklist / 检查
src/client/not changed.Co-authored-by.Agent: Devin (Cognition)
Implemented in session Add self-reporting issue skill to DS-Bot
Review with Devin · Open in Devin Desktop