@wirecat/cli-core 0.368.0 → 0.369.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/CHANGELOG.md +8 -0
- package/dist/services/project-gathering.js +14 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ shape of this file.
|
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
+
## 0.369.0 — 20.10.2026
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Project gathering reads a large document once, not once per matching lane.** A record too large to share a
|
|
15
|
+
page is read alone; when another lane had already returned it, it was still read in full again before being
|
|
16
|
+
dropped, so a 95 KB document matched by five lanes charged about 476 KB. It is now skipped without reading.
|
|
17
|
+
|
|
10
18
|
## 0.368.0 — 20.10.2026
|
|
11
19
|
|
|
12
20
|
### Fixed
|
|
@@ -75,21 +75,25 @@ export const gatherProjectEvidence = async (ports, request) => {
|
|
|
75
75
|
const oversized = new Map();
|
|
76
76
|
let stopped = null;
|
|
77
77
|
const open = (u) => !terminal.has(u.state) && u.state !== "read-limited";
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
/** Records another lane finding a reference this run already returned; true when it had. */
|
|
79
|
+
const again = (ref, lane) => {
|
|
80
|
+
const known = byRef.get(ref);
|
|
80
81
|
if (known) {
|
|
81
82
|
if (!known.lanes.includes(lane.id))
|
|
82
83
|
known.lanes.push(lane.id);
|
|
83
84
|
if (!lane.kinds.every((k) => k === "person"))
|
|
84
85
|
known.context = "project";
|
|
85
|
-
return;
|
|
86
|
+
return true;
|
|
86
87
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
if (!seen.has(seenKey(ref)))
|
|
89
|
+
return false;
|
|
90
|
+
matchedAgain.set(ref, (matchedAgain.get(ref) ?? new Set()).add(lane.id));
|
|
91
|
+
return true;
|
|
92
|
+
};
|
|
93
|
+
const take = (item, lane, kind, source) => {
|
|
94
|
+
if (again(item.ref, lane))
|
|
90
95
|
return;
|
|
91
|
-
|
|
92
|
-
seen.add(key);
|
|
96
|
+
seen.add(seenKey(item.ref));
|
|
93
97
|
const short = excerpt(item.text, lane.query, 300, { literal: true });
|
|
94
98
|
const fingerprint = contextEvidenceFingerprint(item);
|
|
95
99
|
const entry = {
|
|
@@ -166,7 +170,8 @@ export const gatherProjectEvidence = async (ports, request) => {
|
|
|
166
170
|
};
|
|
167
171
|
try {
|
|
168
172
|
let page = await readPage(Math.min(plan.budgets.maxPageBytes, plan.budgets.maxReadBytes - usage.readBytes), 20);
|
|
169
|
-
|
|
173
|
+
// A large record another lane already returned is not read again; its page already moves past it.
|
|
174
|
+
const big = page.oversized && !again(page.oversized.ref, unit.lane) ? page.oversized : undefined;
|
|
170
175
|
if (big && big.bytes <= CONTEXT_MAX_READ_BYTES) {
|
|
171
176
|
if (big.bytes > plan.budgets.maxReadBytes - usage.readBytes || usage.reads >= plan.budgets.maxReads) {
|
|
172
177
|
state.state = "read-limited";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/cli-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.369.0",
|
|
4
4
|
"description": "The messenger-neutral half of a messaging CLI: domain model, message locators, rendering, name resolution, the SQLite seam, the command skeleton and shared read commands, the send guard, run records and the message store",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Viacheslav Ptsarev",
|