fix(process): keep ports before a chunk-final period
PTY chunks are normalized independently. A period that ends a chunk may
begin a decimal continued in the next chunk ("port: 80." then "5"), so
leave such a port unnormalized instead of masking the decimal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
db98a51dd1
commit
184ed970b9
@@ -118,6 +118,13 @@ it("normalizes ports that end a sentence but not decimal or host continuations",
|
||||
);
|
||||
});
|
||||
|
||||
it("keeps a port before a chunk-final period, whose continuation is unknown", () => {
|
||||
for (const chunk of ["port: 80.", "http://localhost:8080.", "[::1]:3000."])
|
||||
expect(
|
||||
normalizeProcessText(chunk, scenario({}), "/temporary", rootPid),
|
||||
).toBe(chunk);
|
||||
});
|
||||
|
||||
it("normalizes representative process identities and preserves null, zero, and unrelated numbers", () => {
|
||||
const before = JSON.stringify(samples);
|
||||
const normalized = normalizeProcessSamples(samples, scenario({}), rootPid);
|
||||
|
||||
Reference in New Issue
Block a user