refactor: strip Phase/Plan/R-number references from source comments
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// R44 — verify the full chain (controller → use case → repo) wraps with
|
||||
// Verify the full chain (controller → use case → repo) wraps with
|
||||
// withSpan + withCapture and never double-captures the same error.
|
||||
//
|
||||
// Each layer's withCapture catch checks the __sentryReported flag (set by
|
||||
@@ -16,7 +16,7 @@ import { MockArticlesRepository } from "../src/infrastructure/repositories/artic
|
||||
import { getArticleBySlugUseCase } from "../src/application/use-cases/get-article-by-slug.use-case";
|
||||
import { getArticleBySlugController } from "../src/interface-adapters/controllers/get-article-by-slug.controller";
|
||||
|
||||
describe("R44 — no double-capture across span/capture-wrapped layers", () => {
|
||||
describe("no double-capture across span/capture-wrapped layers", () => {
|
||||
it("an error originated in the repo is captured exactly once with repo tags", async () => {
|
||||
const tracer = new RecordingTracer();
|
||||
const logger = new RecordingLogger();
|
||||
@@ -30,7 +30,11 @@ describe("R44 — no double-capture across span/capture-wrapped layers", () => {
|
||||
// Mirror what the real repo does: capture with repo tags, mark the
|
||||
// flag (RecordingLogger.captureException does this for us now).
|
||||
logger.captureException(err, {
|
||||
tags: { feature: "blog", repo: "articles", method: "getArticleBySlug" },
|
||||
tags: {
|
||||
feature: "blog",
|
||||
repo: "articles",
|
||||
method: "getArticleBySlug",
|
||||
},
|
||||
});
|
||||
throw err;
|
||||
};
|
||||
@@ -58,9 +62,11 @@ describe("R44 — no double-capture across span/capture-wrapped layers", () => {
|
||||
),
|
||||
);
|
||||
|
||||
await expect(wrappedCtrl({ slug: "anything" })).rejects.toThrow("boom from repo");
|
||||
await expect(wrappedCtrl({ slug: "anything" })).rejects.toThrow(
|
||||
"boom from repo",
|
||||
);
|
||||
|
||||
// R44: exactly one capture. Outer wrappers saw the flag and skipped.
|
||||
// Exactly one capture. Outer wrappers saw the flag and skipped.
|
||||
expect(logger.captures).toHaveLength(1);
|
||||
const only = logger.captures[0];
|
||||
expect(only?.kind).toBe("exception");
|
||||
|
||||
Reference in New Issue
Block a user