-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from tracehubpm/test-suite
feat(#66) suggestions + chain-of-thought
- Loading branch information
Showing
27 changed files
with
1,145 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@startuml | ||
start | ||
:Bug Report; | ||
:analysis; | ||
:self-validation; | ||
:validated.json; | ||
:top; | ||
:polish; | ||
:suggestions; | ||
:suggestions.json; | ||
stop | ||
@enduml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@startuml | ||
participant Reporter as reporter | ||
participant GitHub as github | ||
participant Action as action | ||
participant LLM as llm | ||
|
||
reporter -> github: GitHub issue | ||
github -> action: GitHub issue | ||
action -> llm: issue, ask for problems | ||
llm --> action: problems | ||
action -> llm: report, problems, validate | ||
llm --> action: validated | ||
alt validated are empty | ||
action --> github: success | ||
action --> reporter: thank you | ||
end | ||
alt validated are not empty | ||
action -> llm: validated, format to JSON | ||
llm --> action: validated.json | ||
alt validated size > 3 | ||
action -> llm: validated.json, cap top 3 problems | ||
llm --> action: top | ||
action -> llm: top, polish JSON | ||
llm --> action: top.json | ||
end | ||
action -> llm: validated.json/top.json, ask for suggestions | ||
llm --> action: suggestions | ||
action -> llm: suggestions, format to JSON | ||
llm --> action: suggestions.json | ||
action --> github: fail | ||
action --> reporter: top, suggestions, spent tokens | ||
end | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2023-2024 Tracehub.git | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included | ||
* in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
/** | ||
* Quality analysis prompt. | ||
*/ | ||
export class AnalysisPrompt implements Scalar<string> { | ||
|
||
constructor(private readonly report: string) { | ||
} | ||
|
||
value(): string { | ||
return ` | ||
Please review the following bug report and generate a summary with quality problems related to this report formulation. | ||
Generate only the quality problems that only this bug report formulation has. | ||
Don't generate any other info. | ||
Bug report: | ||
${this.report} | ||
`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* The MIT License (MIT) | ||
* | ||
* Copyright (c) 2023-2024 Tracehub.git | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included | ||
* in all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
/** | ||
* Prompt to cap bug report problems. | ||
*/ | ||
export class CapPrompt implements Scalar<string> { | ||
|
||
/** | ||
* Ctor. | ||
* @param report Report | ||
* @param problems Problems | ||
*/ | ||
constructor( | ||
private readonly report: string, | ||
private readonly problems: any | ||
) { | ||
} | ||
|
||
value(): string { | ||
return ` | ||
Please limit the list of the quality problems for the following bug report | ||
to just three. Pick the most important problems for this bug report and move them into the new array. | ||
Don't edit or rephrase a problem formulations at all. Only pick the most important problems. | ||
Response example: | ||
[ | ||
"...", | ||
"...", | ||
"..." | ||
]. | ||
Don't generate any other info. | ||
Problems: | ||
${this.problems} | ||
Bug report: | ||
${this.report} | ||
`; | ||
} | ||
} |
Oops, something went wrong.
6a743d0
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.
Puzzle
69-bb4151df
discovered insrc/main.ts
) and submitted as #73. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.