gpt-engineer-app[bot] commited on
Commit Β·
4e8f3b8
1
Parent(s): fe1174d
Changes
Browse files
src/server/branch-debug.functions.ts
CHANGED
|
@@ -18,10 +18,19 @@ export type Suspect = {
|
|
| 18 |
afterSnippet: string | null;
|
| 19 |
};
|
| 20 |
|
|
|
|
|
|
|
|
|
|
| 21 |
export type DebugResult = {
|
| 22 |
suspects: Suspect[];
|
| 23 |
summary: string;
|
| 24 |
sanitizationStats: { identifiersTokenized: number; commentsStripped: number; secretsBlocked: number };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
};
|
| 26 |
|
| 27 |
// βββββββββββββββββββββββββ IP Shield: sanitizer βββββββββββββββββββββββββ
|
|
|
|
| 18 |
afterSnippet: string | null;
|
| 19 |
};
|
| 20 |
|
| 21 |
+
export type AuditEntry = { token: string; real: string; occurrences: number };
|
| 22 |
+
export type AuditSample = { original: string; sanitized: string };
|
| 23 |
+
|
| 24 |
export type DebugResult = {
|
| 25 |
suspects: Suspect[];
|
| 26 |
summary: string;
|
| 27 |
sanitizationStats: { identifiersTokenized: number; commentsStripped: number; secretsBlocked: number };
|
| 28 |
+
audit: {
|
| 29 |
+
tokenMap: AuditEntry[]; // real -> token, sorted by occurrence
|
| 30 |
+
redactedComments: string[]; // up to 20 stripped comment lines (already comment-only, safe to show)
|
| 31 |
+
secretMatches: { pattern: string; replaced: string }[]; // never the real secret
|
| 32 |
+
sample: AuditSample; // first ~30 lines: original vs sanitized side-by-side
|
| 33 |
+
};
|
| 34 |
};
|
| 35 |
|
| 36 |
// βββββββββββββββββββββββββ IP Shield: sanitizer βββββββββββββββββββββββββ
|