@xera-ai/cli 0.9.8 → 0.11.0
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/dist/index.js
CHANGED
|
@@ -139,6 +139,48 @@ async function runChecks(cwd) {
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
+
if (cfg.coverage.staleAfterDays > 90) {
|
|
143
|
+
checks.push({
|
|
144
|
+
name: "coverage.staleAfterDays sanity",
|
|
145
|
+
ok: false,
|
|
146
|
+
message: `${cfg.coverage.staleAfterDays}d is a very large window \u2014 coverage will be slow to react to drift`
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
const snapPath = join(cwd, ".xera/graph/snapshot.json");
|
|
150
|
+
if (existsSync(snapPath) && cfg.coverage.criticalAreas.length > 0) {
|
|
151
|
+
try {
|
|
152
|
+
const snap = JSON.parse(readFileSync(snapPath, "utf8"));
|
|
153
|
+
const known = new Set(Object.keys(snap.areas ?? {}));
|
|
154
|
+
for (const slug of cfg.coverage.criticalAreas) {
|
|
155
|
+
if (!known.has(slug)) {
|
|
156
|
+
checks.push({
|
|
157
|
+
name: `criticalArea "${slug}" exists`,
|
|
158
|
+
ok: false,
|
|
159
|
+
message: "marked critical but no ticket modifies this area; check spelling"
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
} catch {}
|
|
164
|
+
}
|
|
165
|
+
if (existsSync(snapPath)) {
|
|
166
|
+
try {
|
|
167
|
+
const snap = JSON.parse(readFileSync(snapPath, "utf8"));
|
|
168
|
+
const acByTicket = {};
|
|
169
|
+
for (const node of Object.values(snap.acNodes ?? {})) {
|
|
170
|
+
acByTicket[node.ticketId] = (acByTicket[node.ticketId] ?? 0) + 1;
|
|
171
|
+
}
|
|
172
|
+
for (const ticket of Object.values(snap.tickets ?? {})) {
|
|
173
|
+
const acCount = ticket.ac?.length ?? 0;
|
|
174
|
+
if (acCount > 0 && (acByTicket[ticket.id] ?? 0) === 0) {
|
|
175
|
+
checks.push({
|
|
176
|
+
name: `${ticket.id}: ACNodes materialized`,
|
|
177
|
+
ok: false,
|
|
178
|
+
message: "ticket has acceptance criteria but no ACNode in snapshot \u2014 rebuild via xera:graph-backfill"
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
} catch {}
|
|
183
|
+
}
|
|
142
184
|
} catch (e) {
|
|
143
185
|
checks.push({
|
|
144
186
|
name: "xera.config.ts found and valid",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xera-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xera": "./bin/xera"
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"typecheck": "tsc --noEmit"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@xera-ai/core": "^0.
|
|
19
|
-
"@xera-ai/skills": "^0.
|
|
18
|
+
"@xera-ai/core": "^0.11.0",
|
|
19
|
+
"@xera-ai/skills": "^0.11.0",
|
|
20
20
|
"@clack/prompts": "1.4.0",
|
|
21
21
|
"cac": "7.0.0",
|
|
22
22
|
"picocolors": "1.1.1"
|
|
@@ -22,4 +22,11 @@ export default defineConfig({
|
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
|
+
// Coverage gap report (v0.8.0+). Run `/xera-coverage` to see UNCOVERED /
|
|
26
|
+
// STALE areas and AC gaps. See docs/CONFIGURATION.md for `criticalAreas`.
|
|
27
|
+
coverage: {
|
|
28
|
+
staleAfterDays: 30,
|
|
29
|
+
criticalAreas: [],
|
|
30
|
+
autoSnapshotOnCoverage: true,
|
|
31
|
+
},
|
|
25
32
|
});
|
|
@@ -34,4 +34,11 @@ export default defineConfig({
|
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
|
+
// Coverage gap report (v0.8.0+). Run `/xera-coverage` to see UNCOVERED /
|
|
38
|
+
// STALE areas and AC gaps. See docs/CONFIGURATION.md for `criticalAreas`.
|
|
39
|
+
coverage: {
|
|
40
|
+
staleAfterDays: 30,
|
|
41
|
+
criticalAreas: [],
|
|
42
|
+
autoSnapshotOnCoverage: true,
|
|
43
|
+
},
|
|
37
44
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Auto-publish xera graph viewer on every PR.
|
|
2
|
-
# Generated by `xera init` (v0.6.3
|
|
2
|
+
# Generated by `xera init` (v0.6.3+, Coverage tab added in v0.8.1).
|
|
3
3
|
name: xera graph viewer
|
|
4
4
|
on:
|
|
5
5
|
pull_request:
|
|
@@ -18,8 +18,11 @@ jobs:
|
|
|
18
18
|
- name: Build graph snapshot
|
|
19
19
|
run: bun run xera:graph-snapshot
|
|
20
20
|
continue-on-error: true
|
|
21
|
-
- name:
|
|
22
|
-
run: bun run xera:
|
|
21
|
+
- name: Build coverage report (v0.8.0+)
|
|
22
|
+
run: bun run xera:coverage-prepare --no-emit-event
|
|
23
|
+
continue-on-error: true
|
|
24
|
+
- name: Render viewer with Coverage tab
|
|
25
|
+
run: bun run xera:graph-render --include-coverage --out graph.html
|
|
23
26
|
continue-on-error: true
|
|
24
27
|
- name: Upload artifact
|
|
25
28
|
uses: actions/upload-artifact@v4
|
|
@@ -31,4 +31,12 @@ export default defineConfig({
|
|
|
31
31
|
{{/if}}
|
|
32
32
|
},
|
|
33
33
|
adapters: ['web'],
|
|
34
|
+
// Coverage gap report (v0.8.0+). Run `/xera-coverage` to see UNCOVERED /
|
|
35
|
+
// STALE areas and AC gaps. Marking areas as critical doubles their risk
|
|
36
|
+
// weight so business-critical paths surface even on low ticket activity.
|
|
37
|
+
coverage: {
|
|
38
|
+
staleAfterDays: 30,
|
|
39
|
+
criticalAreas: [],
|
|
40
|
+
autoSnapshotOnCoverage: true,
|
|
41
|
+
},
|
|
34
42
|
});
|