@allurereport/plugin-agent 3.18.0 → 3.19.1
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 +1 -1
- package/dist/guidance.js +2 -2
- package/dist/harness.d.ts +1 -1
- package/dist/harness.js +9 -1
- package/dist/plugin.js +5 -5
- package/dist/query.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ When enabled, the plugin writes:
|
|
|
23
23
|
|
|
24
24
|
- `index.md` with run summary, advisory findings, expected-scope overview, and links to every logical test
|
|
25
25
|
- `manifest/test-events.jsonl` as the append-only live event stream while the run is active
|
|
26
|
-
- one markdown file per logical test under `tests/<environment>/<
|
|
26
|
+
- one markdown file per logical test under `tests/<environment>/<retryHash-or-trId>.md`
|
|
27
27
|
- `manifest/run.json`, `manifest/tests.jsonl`, and `manifest/findings.jsonl` for machine-readable review
|
|
28
28
|
- copied run logs and other artifacts under `artifacts/`
|
|
29
29
|
- `AGENTS.md` with guidance for consuming the directory
|
package/dist/guidance.js
CHANGED
|
@@ -92,7 +92,7 @@ export const ENRICHMENT_ACTIONS_BY_CHECK_NAME = {
|
|
|
92
92
|
"history-id-collision": {
|
|
93
93
|
category: "repair-test-metadata",
|
|
94
94
|
title: "Repair logical test identity",
|
|
95
|
-
guidance: "
|
|
95
|
+
guidance: "Retry hashes are computed automatically. When retryHash is absent, the agent uses the test-result ID for the filename, not the legacy historyId; do not set hashes manually.",
|
|
96
96
|
},
|
|
97
97
|
"expected-step-containing-missing": {
|
|
98
98
|
category: "add-meaningful-steps",
|
|
@@ -332,7 +332,7 @@ export const renderAgentsGuide = () => `# AGENTS Guide
|
|
|
332
332
|
2. Tail \`manifest/test-events.jsonl\` for the newest structured updates while the run is active.
|
|
333
333
|
3. Open \`index.md\` for run-level status, scope summary, and the highest-priority findings.
|
|
334
334
|
4. If a human-readable report is needed, read \`manifest/human-report.json\`; when status is \`generated\`, open the recorded path such as \`awesome/index.html\`.
|
|
335
|
-
5. Open the relevant file under \`tests/<environment>/<
|
|
335
|
+
5. Open the relevant file under \`tests/<environment>/<retryHash-or-trId>.md\` for evidence review.
|
|
336
336
|
6. Follow links into \`.assets/\` for test-scoped artifacts and into \`artifacts/global/\` for command-named process logs such as stdout and stderr.
|
|
337
337
|
|
|
338
338
|
## Directory Contract
|
package/dist/harness.d.ts
CHANGED
package/dist/harness.js
CHANGED
|
@@ -100,6 +100,14 @@ const readJsonl = async (path) => (await readFile(path, "utf-8"))
|
|
|
100
100
|
.split("\n")
|
|
101
101
|
.filter(Boolean)
|
|
102
102
|
.map((line) => JSON.parse(line));
|
|
103
|
+
const normalizeAgentTestManifestLine = (input) => {
|
|
104
|
+
const { history_id: legacyHistoryId, retry_hash: retryHash, ...test } = input;
|
|
105
|
+
const canonicalRetryHash = "retry_hash" in input ? (retryHash ?? null) : (legacyHistoryId ?? null);
|
|
106
|
+
return {
|
|
107
|
+
...test,
|
|
108
|
+
retry_hash: canonicalRetryHash,
|
|
109
|
+
};
|
|
110
|
+
};
|
|
103
111
|
const countByActionCategory = (items) => items.reduce((counts, item) => {
|
|
104
112
|
counts[item.category] += 1;
|
|
105
113
|
return counts;
|
|
@@ -201,7 +209,7 @@ export const loadAgentOutput = async (outputDir) => {
|
|
|
201
209
|
let tests;
|
|
202
210
|
let findings;
|
|
203
211
|
try {
|
|
204
|
-
tests = await readJsonl(join(absoluteOutputDir, "manifest", "tests.jsonl"));
|
|
212
|
+
tests = (await readJsonl(join(absoluteOutputDir, "manifest", "tests.jsonl"))).map(normalizeAgentTestManifestLine);
|
|
205
213
|
findings = await readJsonl(join(absoluteOutputDir, "manifest", "findings.jsonl"));
|
|
206
214
|
}
|
|
207
215
|
catch {
|
package/dist/plugin.js
CHANGED
|
@@ -1253,7 +1253,7 @@ const renderTestFile = (params) => {
|
|
|
1253
1253
|
`- Name: ${escapeInlineMarkdown(tr.name)}`,
|
|
1254
1254
|
`- Full Name: ${escapeInlineMarkdown(tr.fullName ?? tr.name)}`,
|
|
1255
1255
|
`- Environment: ${escapeInlineMarkdown(environmentId)}`,
|
|
1256
|
-
`-
|
|
1256
|
+
`- Retry hash: ${escapeInlineMarkdown(tr.retryHash ?? "n/a")}`,
|
|
1257
1257
|
`- Test Result ID: ${escapeInlineMarkdown(tr.id)}`,
|
|
1258
1258
|
`- Status: ${statusLabel(tr.status)}`,
|
|
1259
1259
|
`- Duration: ${formatDurationValue(tr.duration)}`,
|
|
@@ -2209,10 +2209,10 @@ const buildRunAndTestFindings = (params) => {
|
|
|
2209
2209
|
severity: "warning",
|
|
2210
2210
|
category: "metadata",
|
|
2211
2211
|
checkName: "history-id-collision",
|
|
2212
|
-
message: "Multiple visible tests shared the same
|
|
2212
|
+
message: "Multiple visible tests shared the same retry hash in this environment.",
|
|
2213
2213
|
explanation: "The output had to suffix the markdown file name because the logical test key was not unique within the environment.",
|
|
2214
2214
|
evidencePaths: [entry.relativePath],
|
|
2215
|
-
remediationHint: "Ensure the test metadata produces unique
|
|
2215
|
+
remediationHint: "Ensure the test metadata produces unique retry hashes for distinct logical tests.",
|
|
2216
2216
|
confidence: 0.85,
|
|
2217
2217
|
}));
|
|
2218
2218
|
}
|
|
@@ -2342,7 +2342,7 @@ const listVisibleTestLayouts = async (params) => {
|
|
|
2342
2342
|
const rawEnvironmentId = (await store.environmentIdByTrId(tr.id)) ?? "default";
|
|
2343
2343
|
const environmentId = rawEnvironmentId;
|
|
2344
2344
|
const environmentPath = sanitizePathSegment(rawEnvironmentId, "default");
|
|
2345
|
-
const slugSeed = sanitizePathSegment(tr.
|
|
2345
|
+
const slugSeed = sanitizePathSegment(tr.retryHash ?? tr.id, sanitizePathSegment(tr.id, "test"));
|
|
2346
2346
|
const usedSlugs = slugsByEnvironment.get(environmentPath) ?? new Set();
|
|
2347
2347
|
slugsByEnvironment.set(environmentPath, usedSlugs);
|
|
2348
2348
|
const slugResult = createUniqueSlug(slugSeed, tr.id, usedSlugs);
|
|
@@ -2673,7 +2673,7 @@ const writeBootstrapFiles = async (runtime) => {
|
|
|
2673
2673
|
};
|
|
2674
2674
|
const toTestsManifestLine = (entry) => ({
|
|
2675
2675
|
environment_id: entry.environmentId,
|
|
2676
|
-
|
|
2676
|
+
retry_hash: entry.tr.retryHash ?? null,
|
|
2677
2677
|
test_result_id: entry.tr.id,
|
|
2678
2678
|
full_name: entry.tr.fullName ?? entry.tr.name,
|
|
2679
2679
|
package: entry.packageName ?? null,
|
package/dist/query.js
CHANGED
|
@@ -55,7 +55,7 @@ export const normalizeAgentQueryLimit = (value) => {
|
|
|
55
55
|
const matchesLabelFilters = (labels, filters) => filters.every((filter) => labels.some((label) => label.name === filter.name && label.value === filter.value));
|
|
56
56
|
const matchesAgentTestIdentifier = (test, identifier) => test.full_name === identifier ||
|
|
57
57
|
test.test_result_id === identifier ||
|
|
58
|
-
test.
|
|
58
|
+
test.retry_hash === identifier ||
|
|
59
59
|
test.markdown_path === identifier;
|
|
60
60
|
const agentFindingSubjectRef = (finding) => {
|
|
61
61
|
if (finding.subject_ref) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@allurereport/plugin-agent",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.1",
|
|
4
4
|
"description": "Allure Agent Plugin – AI-friendly markdown report generator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"lint:fix": "yarn run -T oxlint --import-plugin --fix src test features stories"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@allurereport/core-api": "3.
|
|
35
|
-
"@allurereport/plugin-api": "3.
|
|
34
|
+
"@allurereport/core-api": "3.19.1",
|
|
35
|
+
"@allurereport/plugin-api": "3.19.1",
|
|
36
36
|
"yaml": "^2.8.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@allurereport/reader-api": "3.
|
|
39
|
+
"@allurereport/reader-api": "3.19.1",
|
|
40
40
|
"@types/node": "^20",
|
|
41
41
|
"@vitest/runner": "^2",
|
|
42
42
|
"allure-js-commons": "^3",
|