testeiya 0.4.2 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -10
- package/dist/prompt/comment-thread.js +96 -0
- package/dist/prompt/comment-thread.js.map +1 -0
- package/dist/prompt/context.js +9 -1
- package/dist/prompt/context.js.map +1 -1
- package/dist/prompt/system-prompt.js +2 -2
- package/dist/src/args.js +24 -0
- package/dist/src/args.js.map +1 -1
- package/dist/src/checkpoint.js +19 -11
- package/dist/src/checkpoint.js.map +1 -1
- package/dist/src/cli.js +1 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/output.js +30 -8
- package/dist/src/output.js.map +1 -1
- package/dist/src/run.js +36 -12
- package/dist/src/run.js.map +1 -1
- package/dist/src/session.js +1 -0
- package/dist/src/session.js.map +1 -1
- package/package.json +1 -1
- package/prompt/comment-thread.ts +126 -0
- package/prompt/context.ts +8 -1
- package/prompt/system-prompt.ts +2 -2
- package/skills/skills.lock.json +5 -2
- package/skills/testomatio/qa-process/testing-workflow/SKILL.md +3 -0
- package/skills/testomatio/{test-management → requirements}/qa-thinking/SKILL.md +1 -0
- package/skills/testomatio/requirements/write-user-story/SKILL.md +45 -0
- package/skills/testomatio/test-automation/epic-requirements-specification/SKILL.md +66 -0
- package/skills/testomatio/test-management/migrate-to-testomatio/SKILL.md +52 -0
- package/skills/testomatio/test-management/migrate-to-testomatio/references/CSV_MIGRATION.md +72 -0
- package/skills/testomatio/test-management/migrate-to-testomatio/references/CUSTOM_MIGRATION.md +11 -0
- package/skills/testomatio/test-management/migrate-to-testomatio/references/TESTRAIL_MIGRATION.md +87 -0
- package/skills/testomatio/test-management/migrate-to-testomatio/references/XRAY_MIGRATION.md +56 -0
- /package/skills/testomatio/{test-management → requirements}/pull-request-diff-analyzer/SKILL.md +0 -0
- /package/skills/testomatio/{qa-process → requirements}/qa-explain-behavior/SKILL.md +0 -0
- /package/skills/testomatio/{qa-process → requirements}/qa-explain-behavior/references/answer-shapes.md +0 -0
- /package/skills/testomatio/{qa-process → requirements}/qa-explain-behavior/references/examples.md +0 -0
- /package/skills/testomatio/{test-management → requirements}/qa-pr-requirements-analyzer/SKILL.md +0 -0
- /package/skills/testomatio/{test-management → requirements}/qa-pr-requirements-analyzer/references/summary-example.md +0 -0
- /package/skills/testomatio/{test-management → requirements}/qa-requirement-reviewer/SKILL.md +0 -0
- /package/skills/testomatio/{test-management → requirements}/qa-requirement-reviewer/references/requirements_reviewer_examples.md +0 -0
package/README.md
CHANGED
|
@@ -279,9 +279,9 @@ looks fine.
|
|
|
279
279
|
|
|
280
280
|
### GitLab CI
|
|
281
281
|
|
|
282
|
-
GitLab runners do not ship `gh
|
|
283
|
-
|
|
284
|
-
merge when you mark it required.
|
|
282
|
+
GitLab runners do not ship `gh`. The report goes to job artifacts, and when a
|
|
283
|
+
token is present the agent also keeps its review on the merge request itself.
|
|
284
|
+
Exit code `1` fails the job and blocks the merge when you mark it required.
|
|
285
285
|
|
|
286
286
|
```yaml
|
|
287
287
|
qa-review:
|
|
@@ -291,6 +291,8 @@ qa-review:
|
|
|
291
291
|
variables:
|
|
292
292
|
TESTEIYA_MODEL: openrouter/anthropic/claude-sonnet-5
|
|
293
293
|
TESTOMATIO_PROJECT_ID: my-project
|
|
294
|
+
# a project access token with the `api` scope; CI_JOB_TOKEN cannot write notes
|
|
295
|
+
GITLAB_TOKEN: $TESTEIYA_GITLAB_TOKEN
|
|
294
296
|
script:
|
|
295
297
|
- git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
|
296
298
|
- npx testeiya@latest doctor
|
|
@@ -306,9 +308,35 @@ qa-review:
|
|
|
306
308
|
# OPENROUTER_API_KEY (masked), TESTOMATIO (masked, protected)
|
|
307
309
|
```
|
|
308
310
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
311
|
+
Without `GITLAB_TOKEN` the run still produces the artifacts, it just posts
|
|
312
|
+
nothing. With it, the agent keeps one note per thread and rewrites it each
|
|
313
|
+
round. See [Comment threads](#comment-threads).
|
|
314
|
+
|
|
315
|
+
### Bitbucket Pipelines
|
|
316
|
+
|
|
317
|
+
There is no Bitbucket CLI, so the agent talks to the REST API directly. Put a
|
|
318
|
+
repository access token that can write pull requests in `BITBUCKET_ACCESS_TOKEN`,
|
|
319
|
+
and `BITBUCKET_PR_ID` does the rest.
|
|
320
|
+
|
|
321
|
+
```yaml
|
|
322
|
+
pipelines:
|
|
323
|
+
pull-requests:
|
|
324
|
+
'**':
|
|
325
|
+
- step:
|
|
326
|
+
image: node:22
|
|
327
|
+
script:
|
|
328
|
+
- export TESTEIYA_MODEL=openrouter/anthropic/claude-sonnet-5
|
|
329
|
+
# repository variables: OPENROUTER_API_KEY, BITBUCKET_ACCESS_TOKEN
|
|
330
|
+
- npx testeiya@latest task
|
|
331
|
+
"Review this pull request as a QA engineer. What could go wrong?"
|
|
332
|
+
--thread qa-review --output review.md
|
|
333
|
+
artifacts:
|
|
334
|
+
- review.md
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
`BITBUCKET_PR_ID` is only set on a pull request build, so keep the step under
|
|
338
|
+
`pull-requests:`. Bitbucket caps a pull request at 200 comments, which is why
|
|
339
|
+
the agent resolves its old ones instead of adding a fresh thread each round.
|
|
312
340
|
|
|
313
341
|
### Anywhere else
|
|
314
342
|
|
|
@@ -360,10 +388,55 @@ Write no footer of your own and the report is signed:
|
|
|
360
388
|
|
|
361
389
|
Pass `--no-default-footer`, or set `TESTEIYA_NO_DEFAULT_FOOTER`, to drop it.
|
|
362
390
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
391
|
+
## Comment threads
|
|
392
|
+
|
|
393
|
+
Every report opens with a marker that markdown renders as nothing:
|
|
394
|
+
|
|
395
|
+
```
|
|
396
|
+
<!-- testeiya thread=qa-review commit=700fbe1d9c... session=0198f2c1a3b4c -->
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
That line is how a later round finds its own earlier comments, which
|
|
400
|
+
conversation they belong to, and what they were written against. It lives in the
|
|
401
|
+
thread, not in a cache, so a round that starts with an empty runner still knows
|
|
402
|
+
what it last reviewed and can diff from there.
|
|
403
|
+
|
|
404
|
+
In a thread the agent looks after those comments rather than piling them up.
|
|
405
|
+
A thread is any subject it posts into: a pull request, a merge request, an
|
|
406
|
+
issue. Each round writes the complete current answer, opening with a short list
|
|
407
|
+
of what changed since the last one, and makes the earlier comments recede:
|
|
408
|
+
|
|
409
|
+
| CI | How the earlier answer recedes |
|
|
410
|
+
|---|---|
|
|
411
|
+
| GitHub Actions | folded in place, as an outdated comment |
|
|
412
|
+
| Bitbucket Pipelines | resolved, which collapses it |
|
|
413
|
+
| GitLab CI | one note, rewritten, with the previous answer folded inside it |
|
|
414
|
+
| any other CI | the agent reads the host's API and picks whichever of the two fits |
|
|
415
|
+
|
|
416
|
+
There are two strategies, not one per host. Where the host can fold a whole
|
|
417
|
+
comment the agent appends and folds; where it can only fold the body, the
|
|
418
|
+
comment chrome would pile up, so it keeps one comment and rewrites it. GitLab is
|
|
419
|
+
the odd one out for that reason. A CI we ship no calls for gets both strategies
|
|
420
|
+
and picks, from that host's own documentation.
|
|
421
|
+
|
|
422
|
+
Nothing is ever deleted. A human reply may be sitting under a comment, and every
|
|
423
|
+
step here can be undone where a delete cannot.
|
|
424
|
+
|
|
425
|
+
`--thread <name>` says which conversation a run belongs to. Run two jobs on one
|
|
426
|
+
pull request, say one grilling it and one writing test cases, and give each its
|
|
427
|
+
own name so neither touches the other's comments. The default is `default`, and
|
|
428
|
+
`TESTEIYA_THREAD` does the same from the environment.
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
testeiya task "Review this pull request" \
|
|
432
|
+
--thread qa-review --output gh:pr-comment
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
The host comes from the job, not from the checkout: `GITHUB_ACTIONS`,
|
|
436
|
+
`GITLAB_CI`, `BITBUCKET_BUILD_NUMBER`, else `CI`. A remote only says where the
|
|
437
|
+
code lives, while those say the run has a subject to answer and a token to
|
|
438
|
+
answer with. So these rules never reach a developer's own checkout, and the
|
|
439
|
+
agent is told about one host, never the others.
|
|
367
440
|
|
|
368
441
|
## Sessions
|
|
369
442
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import dedent from 'dedent';
|
|
2
|
+
/**
|
|
3
|
+
* How an answer already posted stops being the current one, per host. The round
|
|
4
|
+
* is the same wherever the thread lives — find your marked comments, diff from
|
|
5
|
+
* the commit the last one carries, make it recede, write the current answer — so
|
|
6
|
+
* a host contributes only its own rules: which of the two strategies its API
|
|
7
|
+
* affords, and the facts about it that cannot be worked out from the API alone.
|
|
8
|
+
*
|
|
9
|
+
* The host comes from the environment, never from the remote. A remote says
|
|
10
|
+
* where the code lives; only the CI variables say we are in a job that has a
|
|
11
|
+
* subject to answer and a token to answer with.
|
|
12
|
+
*
|
|
13
|
+
* This table is the extension point. There is no default host: a job nothing
|
|
14
|
+
* claims falls to `generic`, which states the choice and lets the agent make it.
|
|
15
|
+
*/
|
|
16
|
+
const HOSTS = {
|
|
17
|
+
github: {
|
|
18
|
+
env: ['GITHUB_ACTIONS'],
|
|
19
|
+
rules: dedent `
|
|
20
|
+
**Append and collapse.** GitHub hides a whole comment, so leave the earlier ones where they are and fold each one with the GraphQL \`minimizeComment\` mutation, classifier \`OUTDATED\`. Issues and pull requests share the same comment API, so this is the same call on both.
|
|
21
|
+
|
|
22
|
+
Read comment bodies from \`body\`; \`body_text\` has the marker stripped out. Never \`gh pr comment --edit-last\` or \`--delete-last\`: they mean the last comment by this user, which in CI is a bot account shared with every other tool in the repository.`,
|
|
23
|
+
},
|
|
24
|
+
gitlab: {
|
|
25
|
+
env: ['GITLAB_CI'],
|
|
26
|
+
rules: dedent `
|
|
27
|
+
**Rewrite.** GitLab folds the body of a note but never the note itself, so a note per round leaves a column of headers behind. Keep one note in this thread and rewrite it: the current answer on top, the previous one under it inside a \`<details>\` block, stripped of the \`<details>\` block it already carried. Fold one generation, never a chain of them.
|
|
28
|
+
|
|
29
|
+
\`CI_JOB_TOKEN\` cannot write notes, so \`$GITLAB_TOKEN\` must carry a project access token with the \`api\` scope; report it as a blocker when it is empty. Use notes rather than discussions: a discussion is a resolvable thread, and an unresolved one blocks the merge wherever all threads must be resolved.`,
|
|
30
|
+
},
|
|
31
|
+
bitbucket: {
|
|
32
|
+
env: ['BITBUCKET_BUILD_NUMBER'],
|
|
33
|
+
rules: dedent `
|
|
34
|
+
**Append and collapse.** Bitbucket resolves a whole comment thread, so leave the earlier ones where they are and resolve each one. Only a top-level comment resolves; a reply answers 403.
|
|
35
|
+
|
|
36
|
+
\`$BITBUCKET_ACCESS_TOKEN\` carries the token; report it as a blocker when it is empty. Deleted comments stay in the list as blanked tombstones, so filter on \`deleted=false\`. A pull request caps at 200 comments, so post once per round and never twice. The marker may render as visible text here — keep it anyway, since finding your own comments matters more than a tidy first line.`,
|
|
37
|
+
},
|
|
38
|
+
generic: {
|
|
39
|
+
env: [],
|
|
40
|
+
rules: dedent `
|
|
41
|
+
**Find out which of the two applies.** If this host can hide, minimise, resolve or otherwise fold a whole comment, append the new answer and fold the earlier ones. If it can only edit, keep one comment and rewrite it, with the previous answer folded inside wherever the host renders collapsible markup.
|
|
42
|
+
|
|
43
|
+
If it can do neither, post the answer and say in your output that this host cannot collapse the earlier ones.`,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Which host this job belongs to. `generic` when it is CI and nothing claims it,
|
|
48
|
+
* nothing at all when it is not CI — a developer's own checkout has no thread.
|
|
49
|
+
*/
|
|
50
|
+
export function threadHost(env) {
|
|
51
|
+
for (const [name, host] of Object.entries(HOSTS)) {
|
|
52
|
+
if (host.env.some((variable) => env[variable]))
|
|
53
|
+
return name;
|
|
54
|
+
}
|
|
55
|
+
if (env.CI)
|
|
56
|
+
return 'generic';
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
/** What a comment of this thread opens with, and so what identifies it. */
|
|
60
|
+
export function threadMarker(thread) {
|
|
61
|
+
return `<!-- testeiya thread=${thread}`;
|
|
62
|
+
}
|
|
63
|
+
export function commentThread(options) {
|
|
64
|
+
const write = options.posts
|
|
65
|
+
? 'Your report is posted for you. Do not post it yourself.'
|
|
66
|
+
: 'Post it yourself, opening the body with that same marker line.';
|
|
67
|
+
return dedent `
|
|
68
|
+
<comment-thread>
|
|
69
|
+
This section governs threads you post into: a pull request, a merge request, an issue. It says nothing about any other kind of work.
|
|
70
|
+
|
|
71
|
+
A comment you write opens with exactly this line, and your earlier ones already carry it:
|
|
72
|
+
|
|
73
|
+
\`${options.marker}\`
|
|
74
|
+
|
|
75
|
+
Yours in this conversation are the ones whose \`thread=\` is \`${options.thread}\`. A comment carrying a different thread belongs to another conversation on the same subject — never touch it.
|
|
76
|
+
|
|
77
|
+
**Never delete a comment.** A human reply may be sitting under it, and everything here is reversible where a delete is not.
|
|
78
|
+
|
|
79
|
+
Each round:
|
|
80
|
+
|
|
81
|
+
1. Find your earlier comments — raw body starting \`${threadMarker(options.thread)}\`. Read the raw body; a rendered one may have dropped the marker.
|
|
82
|
+
2. The newest one is your complete answer as of the \`commit=\` in its marker, so \`git diff <that sha>...HEAD\` is what you have not seen.
|
|
83
|
+
3. Make the earlier ones recede, by the rule below.
|
|
84
|
+
4. Write the **complete current answer**, not a delta — everything earlier is folded, so a delta would leave the thread with no visible state. Open with a short "Since the last round" list of what was fixed, what is new and what is still open.
|
|
85
|
+
|
|
86
|
+
${write}
|
|
87
|
+
|
|
88
|
+
${indent(HOSTS[options.host].rules)}
|
|
89
|
+
</comment-thread>`;
|
|
90
|
+
}
|
|
91
|
+
// dedent trims the literal parts of a template, never what is interpolated into
|
|
92
|
+
// them, so a block spanning lines has to arrive already at the right column.
|
|
93
|
+
function indent(text) {
|
|
94
|
+
return text.split('\n').join('\n ');
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=comment-thread.js.map
|
|
@@ -0,0 +1 @@
|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;;;;;QAMP,OAAO,CAAC,MAAM;;qEAE+C,OAAO,CAAC,MAAM;;;;;;0DAMzB,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC;;;;;MAKhF,KAAK;;MAEL,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;oBACnB,CAAC;AACrB,CAAC;AAED,gFAAgF;AAChF,6EAA6E;AAC7E,SAAS,MAAM,CAAC,IAAY;IAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzC,CAAC"}
|
package/dist/prompt/context.js
CHANGED
|
@@ -10,7 +10,7 @@ export function contextPromptSection(entries, folders = []) {
|
|
|
10
10
|
|
|
11
11
|
${contextLines(entries, folders)}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Everything whose path starts with \`${TESTEIYA_DIR_NAME}/\` is in a hidden dir: file-search tools skip hidden dirs by default, so search those explicitly (pass hidden:true, or prefix the path with \`${TESTEIYA_DIR_NAME}/\`). Any other path above is an ordinary workspace path the user attached — read it where it is. Linked folders and cloned repositories are reference material: read them, never modify them. A linked folder is a symlink — wildcard searches do not descend into it; search it with its own path prefix (e.g. \`${TESTEIYA_DIR_NAME}/<name>/\`). Documents under \`${TESTEIYA_DIR_NAME}/requirements\` and \`${TESTEIYA_DIR_NAME}/docs\` are specs and plans — use them when writing or reviewing tests.
|
|
14
14
|
</workspace-context>
|
|
15
15
|
`;
|
|
16
16
|
}
|
|
@@ -67,6 +67,14 @@ function parentDir(rel) {
|
|
|
67
67
|
}
|
|
68
68
|
function describeEntry(e) {
|
|
69
69
|
const date = e.addedAt?.split("T")[0] ?? "";
|
|
70
|
+
// A path outside the hidden dir is one the user attached where it already
|
|
71
|
+
// lives — it is part of the project, not reference material dropped beside it.
|
|
72
|
+
if (!e.path.startsWith(`${TESTEIYA_DIR_NAME}/`)) {
|
|
73
|
+
let what = "folder";
|
|
74
|
+
if (e.kind === "file")
|
|
75
|
+
what = "file";
|
|
76
|
+
return `\`${e.path}\` — workspace ${what}, attached by the user (${date})`;
|
|
77
|
+
}
|
|
70
78
|
let from = "";
|
|
71
79
|
if (e.origin && e.origin !== e.name)
|
|
72
80
|
from = ` from ${e.origin}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../prompt/context.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,4EAA4E;AAC5E,MAAM,UAAU,oBAAoB,CAClC,OAAuB,EACvB,UAA2B,EAAE;IAE7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC5D,OAAO,MAAM,CAAA;;;;IAIX,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC;;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../prompt/context.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,4EAA4E;AAC5E,MAAM,UAAU,oBAAoB,CAClC,OAAuB,EACvB,UAA2B,EAAE;IAE7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC5D,OAAO,MAAM,CAAA;;;;IAIX,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC;;0CAEQ,iBAAiB,kJAAkJ,iBAAiB,sTAAsT,iBAAiB,kCAAkC,iBAAiB,yBAAyB,iBAAiB;;GAE/nB,CAAC;AACJ,CAAC;AAED,2FAA2F;AAC3F,MAAM,UAAU,mBAAmB,CACjC,OAAuB,EACvB,UAA2B,EAAE;IAE7B,IAAI,OAAO,CAA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-120,8 +120,8 @@ export function getSystemPrompt(cwd, options) {
|
|
|
120
120
|
* **Lead with intent:** Before any multi-step or long-running task, open with one short plain-text paragraph — short sentences — telling the user what you are about to do and your plan. State the main idea up front. This is visible output, not thinking. Then start working.
|
|
121
121
|
* **Technical (QA-aware):** Prefer standard QA terms and jargon: E2E (end-to-end), regression, test coverage, assertion, etc.
|
|
122
122
|
* **Structure the answer:** \`##\` headings led by an emoji, tables, bullet points, numbered lists. Prose only where structure cannot carry the point.
|
|
123
|
-
* **Never repeat a thread:** In a conversation already underway — a pull request comment, a tracker issue, a follow-up round —
|
|
124
|
-
* **Your own writing is marked:** a first line starting with \`<!-- testeiya\` marks markdown as yours.
|
|
123
|
+
* **Never repeat a thread:** In a conversation already underway — a pull request comment, a tracker issue, a follow-up round — never restate a message that is still visible above you. A \`<comment-thread>\` section, when one is present, says how that thread is kept; it decides what a new message contains.
|
|
124
|
+
* **Your own writing is marked:** a first line starting with \`<!-- testeiya\` marks markdown as yours. Text carrying it that you read back is your own earlier message. Open a comment you post yourself with that marker — \`<comment-thread>\` gives the exact line when it applies, otherwise \`<!-- testeiya -->\`.
|
|
125
125
|
* Be helpful and curious. ${interactive ? "Ask for clarification when a choice is genuinely the user's to make." : "Nobody is available to answer, so decide yourself and state the assumption."}
|
|
126
126
|
</communication-style>
|
|
127
127
|
|
package/dist/src/args.js
CHANGED
|
@@ -24,6 +24,7 @@ Options:
|
|
|
24
24
|
--model <id> provider/model to run
|
|
25
25
|
--project <id> Testomat.io project id
|
|
26
26
|
--followup <text> the user's reply, added to the task as a new message
|
|
27
|
+
--thread <name> which conversation this is, for posted comments
|
|
27
28
|
-c, --continue continue the last session in this folder
|
|
28
29
|
--resume <id> continue that session
|
|
29
30
|
--session <label> continue the session with that name, or start it
|
|
@@ -42,6 +43,7 @@ Options:
|
|
|
42
43
|
Environment:
|
|
43
44
|
TESTEIYA_MODEL model to run, e.g. openrouter/anthropic/claude-sonnet-5
|
|
44
45
|
TESTEIYA_FOLLOW_UP the user's reply, same as --followup
|
|
46
|
+
TESTEIYA_THREAD which conversation this is, same as --thread
|
|
45
47
|
TESTEIYA_SESSION_FILE where to keep the session, same as --session-file
|
|
46
48
|
TESTEIYA_NO_DEFAULT_FOOTER do not sign the report
|
|
47
49
|
OPENROUTER_API_KEY provider key, also ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY
|
|
@@ -89,6 +91,25 @@ Where the report goes
|
|
|
89
91
|
Every destination is checked before the run starts, so a missing gh costs no
|
|
90
92
|
tokens.
|
|
91
93
|
|
|
94
|
+
Comment threads
|
|
95
|
+
|
|
96
|
+
In a thread the agent looks after its own comments instead of piling them up.
|
|
97
|
+
A thread is any subject it posts into: a pull request, a merge request, an
|
|
98
|
+
issue. Every comment it writes opens with an invisible marker naming the
|
|
99
|
+
conversation and the commit it answered, so the next round finds its earlier
|
|
100
|
+
work even when nothing was cached.
|
|
101
|
+
|
|
102
|
+
Each round writes the complete current answer and makes the earlier ones
|
|
103
|
+
recede. GitHub folds them, Bitbucket resolves them, GitLab keeps one note and
|
|
104
|
+
rewrites it. Nothing is ever deleted. The host comes from the CI job, so a
|
|
105
|
+
local run is never in a thread.
|
|
106
|
+
|
|
107
|
+
--thread <name> says which conversation this is. Run two jobs on one pull
|
|
108
|
+
request, say one grilling it and one writing test cases, and give each its own
|
|
109
|
+
name so neither touches the other's comments. The default is "default".
|
|
110
|
+
|
|
111
|
+
testeiya task "Review this pull request" --thread qa-review -o gh:pr-comment
|
|
112
|
+
|
|
92
113
|
Models and keys
|
|
93
114
|
|
|
94
115
|
There is no default model. Pass --model or set TESTEIYA_MODEL. A resumed run
|
|
@@ -199,6 +220,8 @@ export function parseCliArgs(argv) {
|
|
|
199
220
|
args.project = values.project;
|
|
200
221
|
if (typeof values.followup === "string")
|
|
201
222
|
args.followUp = values.followup;
|
|
223
|
+
if (typeof values.thread === "string")
|
|
224
|
+
args.thread = values.thread;
|
|
202
225
|
if (values.continue)
|
|
203
226
|
args.continueLast = true;
|
|
204
227
|
if (typeof values.resume === "string")
|
|
@@ -235,6 +258,7 @@ const RUN_OPTIONS = {
|
|
|
235
258
|
model: { type: "string" },
|
|
236
259
|
project: { type: "string" },
|
|
237
260
|
followup: { type: "string" },
|
|
261
|
+
thread: { type: "string" },
|
|
238
262
|
continue: { type: "boolean", short: "c" },
|
|
239
263
|
resume: { type: "string" },
|
|
240
264
|
session: { type: "string" },
|
package/dist/src/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAwB,MAAM,WAAW,CAAC;AAE5D,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;CAStB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAwB,MAAM,WAAW,CAAC;AAE5D,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;CAStB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCA0CmB,CAAC;AAEzC,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA2HA,CAAC;AAE7B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAEnG,MAAM,UAAU,YAAY,CAAC,IAAc;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,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EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACnG,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9C,IAAI,EAAE,EAAE;CACT,CAAC;AAEF,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAQ,QAA8B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzD,CAAC;AAED,+EAA+E;AAC/E,qEAAqE;AACrE,SAAS,cAAc,CAAC,KAAa;IACnC,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,mBAAmB,KAAK,GAAG,CAAC;IAC9D,OAAO,oBAAoB,KAAK,qCAAqC,KAAK,GAAG,CAAC;AAChF,CAAC"}
|
package/dist/src/checkpoint.js
CHANGED
|
@@ -6,21 +6,29 @@ const CHECKPOINT = "testeiya:checkpoint";
|
|
|
6
6
|
* commit and a thread of comments the transcript has never seen, and an agent
|
|
7
7
|
* that does not know that answers about code nobody is looking at any more.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
if (!commit)
|
|
9
|
+
export function readCheckpoint(repo, pr) {
|
|
10
|
+
if (!repo.commit)
|
|
12
11
|
return null;
|
|
13
|
-
const checkpoint = { commit, at: new Date().toISOString() };
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (remote)
|
|
19
|
-
checkpoint.remote = remote;
|
|
12
|
+
const checkpoint = { commit: repo.commit, at: new Date().toISOString() };
|
|
13
|
+
if (repo.branch && repo.branch !== "HEAD")
|
|
14
|
+
checkpoint.branch = repo.branch;
|
|
15
|
+
if (repo.remote)
|
|
16
|
+
checkpoint.remote = repo.remote;
|
|
20
17
|
if (pr)
|
|
21
18
|
checkpoint.pr = pr;
|
|
22
19
|
return checkpoint;
|
|
23
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Where the checkout stands, read once. The marker stamps the commit on a
|
|
23
|
+
* comment, the pull request section picks its host from the remote, and the
|
|
24
|
+
* checkpoint keeps both for the next round — one set of git calls for all three.
|
|
25
|
+
*/
|
|
26
|
+
export async function readRepo(cwd) {
|
|
27
|
+
const commit = await git(cwd, ["rev-parse", "HEAD"]);
|
|
28
|
+
const branch = await git(cwd, ["rev-parse", "--abbrev-ref", "HEAD"]);
|
|
29
|
+
const remote = await git(cwd, ["remote", "get-url", "origin"]);
|
|
30
|
+
return { commit, branch, remote };
|
|
31
|
+
}
|
|
24
32
|
/** The checkpoint the last round left behind, if this session has one. */
|
|
25
33
|
export function lastCheckpoint(manager) {
|
|
26
34
|
const entries = manager.getEntries();
|
|
@@ -63,7 +71,7 @@ export function describeUpdate(previous, current) {
|
|
|
63
71
|
}
|
|
64
72
|
const pr = current.pr ?? previous.pr;
|
|
65
73
|
if (pr) {
|
|
66
|
-
lines.push(`- Pull request #${pr} may have collected comments since ${previous.at}. Read
|
|
74
|
+
lines.push(`- Pull request #${pr} may have collected comments since ${previous.at}. Read the thread and answer what is still open. Your own earlier comments are marked as yours — never repeat one.`);
|
|
67
75
|
}
|
|
68
76
|
if (lines.length === 0)
|
|
69
77
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkpoint.js","sourceRoot":"","sources":["../../src/checkpoint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"checkpoint.js","sourceRoot":"","sources":["../../src/checkpoint.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,MAAM,UAAU,GAAG,qBAAqB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,IAAU,EAAE,EAAW;IACpD,IAAI,CAAC,IAAI,CAAC,MAAM;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AC,KAAK;QAAE,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC;IACtE,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"}
|
package/dist/src/output.js
CHANGED
|
@@ -74,24 +74,35 @@ export async function deliver(destinations, envelope) {
|
|
|
74
74
|
export function decorate(report, decoration) {
|
|
75
75
|
const header = decoration?.header?.trim();
|
|
76
76
|
const footer = decoration?.footer?.trim();
|
|
77
|
-
let body = report.trimEnd();
|
|
77
|
+
let body = stripMarker(report.trimEnd());
|
|
78
78
|
if (header)
|
|
79
79
|
body = `${header}\n\n${body}`;
|
|
80
80
|
if (footer)
|
|
81
81
|
body = `${body}\n\n${footer}`;
|
|
82
|
-
|
|
83
|
-
body = `${marker(decoration?.session)}\n${body}`;
|
|
84
|
-
return `${body}\n`;
|
|
82
|
+
return `${marker(decoration)}\n${body}\n`;
|
|
85
83
|
}
|
|
86
84
|
/**
|
|
87
85
|
* What signs the text as ours. An HTML comment is invisible wherever markdown
|
|
88
86
|
* renders, and a later round reading the thread back knows which comments it
|
|
89
|
-
* wrote and
|
|
87
|
+
* wrote, which conversation they belong to, and what they were written against.
|
|
88
|
+
* Key=value, so a round with nothing restored can still parse it with `split`.
|
|
90
89
|
*/
|
|
91
|
-
export function marker(
|
|
92
|
-
|
|
90
|
+
export function marker(fields) {
|
|
91
|
+
const parts = [];
|
|
92
|
+
if (fields?.thread)
|
|
93
|
+
parts.push(`thread=${fields.thread}`);
|
|
94
|
+
if (fields?.commit)
|
|
95
|
+
parts.push(`commit=${fields.commit}`);
|
|
96
|
+
if (fields?.session)
|
|
97
|
+
parts.push(`session=${fields.session}`);
|
|
98
|
+
if (parts.length === 0)
|
|
93
99
|
return `${MARKER} -->`;
|
|
94
|
-
return `${MARKER} ${
|
|
100
|
+
return `${MARKER} ${parts.join(" ")} -->`;
|
|
101
|
+
}
|
|
102
|
+
/** A thread name safe inside an HTML comment, which cannot contain `--`. */
|
|
103
|
+
export function threadName(value) {
|
|
104
|
+
const clean = (value ?? "").toLowerCase().replaceAll(/[^a-z0-9._/]+/g, "-");
|
|
105
|
+
return clean.replaceAll(/-+/g, "-").replaceAll(/^-|-$/g, "") || "default";
|
|
95
106
|
}
|
|
96
107
|
/** What signs the report when the caller writes no footer of their own. */
|
|
97
108
|
export function defaultFooter(model) {
|
|
@@ -214,6 +225,17 @@ function positive(value) {
|
|
|
214
225
|
return number;
|
|
215
226
|
return null;
|
|
216
227
|
}
|
|
228
|
+
// The prompt tells the agent to open a comment it writes with a bare marker, so
|
|
229
|
+
// a report often arrives already carrying one. Replace that line rather than
|
|
230
|
+
// leave it: the marker with the thread on it is what a later round matches on.
|
|
231
|
+
function stripMarker(body) {
|
|
232
|
+
if (!body.startsWith(MARKER))
|
|
233
|
+
return body;
|
|
234
|
+
const end = body.indexOf("\n");
|
|
235
|
+
if (end === -1)
|
|
236
|
+
return "";
|
|
237
|
+
return body.slice(end + 1);
|
|
238
|
+
}
|
|
217
239
|
function pass() {
|
|
218
240
|
return true;
|
|
219
241
|
}
|
package/dist/src/output.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEhC,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,MAAM,MAAM,GAAG,eAAe,CAAC;AAE/B;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAgB,EAAE,IAAc;IAChE,MAAM,YAAY,GAAkB,EAAE,CAAC;IACvC,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B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