@getbourdon/conformance 0.8.0 → 0.10.0-rc.2
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.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js.map +1 -1
- package/fixtures/leak_cases.json +6 -4
- package/fixtures/manifest.json +8 -8
- package/fixtures/merge_vectors.json +2 -2
- package/fixtures/native_stores/claude_code/store/knowledge_graph/memory.jsonl +1 -1
- package/fixtures/native_stores/github_copilot/cache/github-copilot/payload.json +1 -1
- package/fixtures/native_stores/hermes/store/.hermes/memories/memory.md +1 -1
- package/fixtures/redaction_battery.json +90 -4
- package/fixtures.pin.json +2 -2
- package/package.json +2 -2
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\nimport { createHash } from \"node:crypto\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { dirname, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\n/**\n * Typed loaders for the language-neutral parity fixtures produced by the Python\n * oracle (`~/repos/bourdon/tools/gen_conformance.py`). Python is the source of\n * truth; the @getbourdon/* TypeScript mirror asserts against these exact bytes.\n *\n * Resolution order:\n * 1. `BOURDON_CONFORMANCE_DIR` env var — the oracle checkout (parity tests +\n * oracle dev use this; highest priority so a build always asserts against\n * the live oracle).\n * 2. the fixtures BUNDLED in this package (`<pkg>/fixtures`, shipped in the\n * tarball) — what an installed `@getbourdon/conformance` consumer gets.\n * 3. the sibling Python checkout `../../bourdon/conformance` — dev fallback.\n *\n * The bundled copy is a vendored snapshot refreshed from the oracle by\n * `pnpm --filter @getbourdon/conformance sync-fixtures` (and in the release\n * workflow before publish), so the published package is self-contained.\n */\n\n// `import.meta.url` in ESM; esbuild empties it in the CJS bundle, where the\n// native `__dirname` global is the real directory — fall back to it.\ndeclare const __dirname: string | undefined;\nfunction moduleDir(): string {\n if (typeof import.meta !== \"undefined\" && import.meta.url) {\n return dirname(fileURLToPath(import.meta.url));\n }\n return typeof __dirname !== \"undefined\" ? __dirname : process.cwd();\n}\n\nexport interface RedactionSecretCase {\n /** Joined at load (`assembleSecret`) so no contiguous secret literal lands in git. */\n fragments: string[];\n expect_redacted: string;\n expect_contains_secret: boolean;\n}\n\nexport interface RedactionBenignCase {\n text: string;\n expect_redacted: string;\n expect_contains_secret: boolean;\n}\n\nexport interface RedactionBattery {\n redacted_sentinel: string;\n benign_limit: number;\n secrets: RedactionSecretCase[];\n benign: RedactionBenignCase[];\n}\n\nexport interface ConformanceFixtureMeta {\n path: string;\n sha256: string;\n producer: string;\n}\n\nexport interface ConformanceManifest {\n conformance_version: string;\n produced_against: { bourdon_version: string };\n fixtures: ConformanceFixtureMeta[];\n}\n\nexport function conformanceDir(): string {\n const override = process.env.BOURDON_CONFORMANCE_DIR;\n if (override) return override;\n // Bundled snapshot: <pkg>/fixtures, one level up from src/ or dist/.\n const bundled = resolve(moduleDir(), \"..\", \"fixtures\");\n if (existsSync(resolve(bundled, \"manifest.json\"))) return bundled;\n // Dev fallback: the sibling Python oracle checkout.\n return resolve(process.cwd(), \"..\", \"..\", \"bourdon\", \"conformance\");\n}\n\nfunction loadJson<T>(name: string): T {\n return JSON.parse(readFileSync(resolve(conformanceDir(), name), \"utf8\")) as T;\n}\n\nexport function loadManifest(): ConformanceManifest {\n return loadJson<ConformanceManifest>(\"manifest.json\");\n}\n\nexport interface FixturePin {\n conformance_version: string;\n manifest_sha256: string;\n}\n\n/** The recorded fixture pin committed beside this package: which contract\n * version the vendored snapshot is, and the sha256 the manifest must hash to. */\nexport function loadPin(): FixturePin {\n return JSON.parse(\n readFileSync(resolve(moduleDir(), \"..\", \"fixtures.pin.json\"), \"utf8\"),\n ) as FixturePin;\n}\n\n/** sha256 hex of one file's raw bytes. */\nexport function sha256File(path: string): string {\n return createHash(\"sha256\").update(readFileSync(path)).digest(\"hex\");\n}\n\nexport interface FixtureMismatch {\n path: string;\n expected: string;\n actual: string;\n}\n\n/** Verify every fixture in `dir` against the sha256 its manifest stamps.\n * Returns the mismatches — an empty array is the only passing result. The\n * same routine backs the parity gate AND its mutation test, so the check\n * that guards releases is itself provably able to fail. */\nexport function verifyFixtureHashes(dir: string = conformanceDir()): FixtureMismatch[] {\n const manifest = JSON.parse(\n readFileSync(resolve(dir, \"manifest.json\"), \"utf8\"),\n ) as ConformanceManifest;\n const mismatches: FixtureMismatch[] = [];\n for (const fixture of manifest.fixtures) {\n const actual = sha256File(resolve(dir, fixture.path));\n if (actual !== fixture.sha256) {\n mismatches.push({ path: fixture.path, expected: fixture.sha256, actual });\n }\n }\n return mismatches;\n}\n\nexport function loadRedactionBattery(): RedactionBattery {\n return loadJson<RedactionBattery>(\"redaction_battery.json\");\n}\n\n/** Reconstruct a secret case's runtime string from its fragments. */\nexport function assembleSecret(secret: RedactionSecretCase): string {\n return secret.fragments.join(\"\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,yBAA2B;AAC3B,qBAAyC;AACzC,uBAAiC;AACjC,sBAA8B;AAJ9B;AA2BA,SAAS,YAAoB;AAC3B,MAAI,OAAO,gBAAgB,eAAe,YAAY,KAAK;AACzD,eAAO,8BAAQ,+BAAc,YAAY,GAAG,CAAC;AAAA,EAC/C;AACA,SAAO,OAAO,cAAc,cAAc,YAAY,QAAQ,IAAI;AACpE;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\nimport { createHash } from \"node:crypto\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { dirname, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\n/**\n * Typed loaders for the language-neutral parity fixtures produced by the Python\n * oracle (`~/repos/bourdon/tools/gen_conformance.py`). Python is the source of\n * truth; the @getbourdon/* TypeScript mirror asserts against these exact bytes.\n *\n * Resolution order:\n * 1. `BOURDON_CONFORMANCE_DIR` env var — the oracle checkout (parity tests +\n * oracle dev use this; highest priority so a build always asserts against\n * the live oracle).\n * 2. the fixtures BUNDLED in this package (`<pkg>/fixtures`, shipped in the\n * tarball) — what an installed `@getbourdon/conformance` consumer gets.\n * 3. the sibling Python checkout `../../bourdon/conformance` — dev fallback.\n *\n * The bundled copy is a vendored snapshot refreshed from the oracle by\n * `pnpm --filter @getbourdon/conformance sync-fixtures` (and in the release\n * workflow before publish), so the published package is self-contained.\n */\n\n// `import.meta.url` in ESM; esbuild empties it in the CJS bundle, where the\n// native `__dirname` global is the real directory — fall back to it.\ndeclare const __dirname: string | undefined;\nfunction moduleDir(): string {\n if (typeof import.meta !== \"undefined\" && import.meta.url) {\n return dirname(fileURLToPath(import.meta.url));\n }\n return typeof __dirname !== \"undefined\" ? __dirname : process.cwd();\n}\n\nexport interface RedactionSecretCase {\n /** Joined at load (`assembleSecret`) so no contiguous secret literal lands in git. */\n fragments: string[];\n expect_redacted: string;\n expect_contains_secret: boolean;\n}\n\nexport interface RedactionBenignCase {\n text: string;\n expect_redacted: string;\n expect_contains_secret: boolean;\n}\n\nexport interface RedactionBattery {\n redacted_sentinel: string;\n benign_limit: number;\n secrets: RedactionSecretCase[];\n benign: RedactionBenignCase[];\n truncation_cases: { text: string; limit: number; expect_redacted: string }[];\n}\n\nexport interface ConformanceFixtureMeta {\n path: string;\n sha256: string;\n producer: string;\n}\n\nexport interface ConformanceManifest {\n conformance_version: string;\n produced_against: { bourdon_version: string };\n fixtures: ConformanceFixtureMeta[];\n}\n\nexport function conformanceDir(): string {\n const override = process.env.BOURDON_CONFORMANCE_DIR;\n if (override) return override;\n // Bundled snapshot: <pkg>/fixtures, one level up from src/ or dist/.\n const bundled = resolve(moduleDir(), \"..\", \"fixtures\");\n if (existsSync(resolve(bundled, \"manifest.json\"))) return bundled;\n // Dev fallback: the sibling Python oracle checkout.\n return resolve(process.cwd(), \"..\", \"..\", \"bourdon\", \"conformance\");\n}\n\nfunction loadJson<T>(name: string): T {\n return JSON.parse(readFileSync(resolve(conformanceDir(), name), \"utf8\")) as T;\n}\n\nexport function loadManifest(): ConformanceManifest {\n return loadJson<ConformanceManifest>(\"manifest.json\");\n}\n\nexport interface FixturePin {\n conformance_version: string;\n manifest_sha256: string;\n}\n\n/** The recorded fixture pin committed beside this package: which contract\n * version the vendored snapshot is, and the sha256 the manifest must hash to. */\nexport function loadPin(): FixturePin {\n return JSON.parse(\n readFileSync(resolve(moduleDir(), \"..\", \"fixtures.pin.json\"), \"utf8\"),\n ) as FixturePin;\n}\n\n/** sha256 hex of one file's raw bytes. */\nexport function sha256File(path: string): string {\n return createHash(\"sha256\").update(readFileSync(path)).digest(\"hex\");\n}\n\nexport interface FixtureMismatch {\n path: string;\n expected: string;\n actual: string;\n}\n\n/** Verify every fixture in `dir` against the sha256 its manifest stamps.\n * Returns the mismatches — an empty array is the only passing result. The\n * same routine backs the parity gate AND its mutation test, so the check\n * that guards releases is itself provably able to fail. */\nexport function verifyFixtureHashes(dir: string = conformanceDir()): FixtureMismatch[] {\n const manifest = JSON.parse(\n readFileSync(resolve(dir, \"manifest.json\"), \"utf8\"),\n ) as ConformanceManifest;\n const mismatches: FixtureMismatch[] = [];\n for (const fixture of manifest.fixtures) {\n const actual = sha256File(resolve(dir, fixture.path));\n if (actual !== fixture.sha256) {\n mismatches.push({ path: fixture.path, expected: fixture.sha256, actual });\n }\n }\n return mismatches;\n}\n\nexport function loadRedactionBattery(): RedactionBattery {\n return loadJson<RedactionBattery>(\"redaction_battery.json\");\n}\n\n/** Reconstruct a secret case's runtime string from its fragments. */\nexport function assembleSecret(secret: RedactionSecretCase): string {\n return secret.fragments.join(\"\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,yBAA2B;AAC3B,qBAAyC;AACzC,uBAAiC;AACjC,sBAA8B;AAJ9B;AA2BA,SAAS,YAAoB;AAC3B,MAAI,OAAO,gBAAgB,eAAe,YAAY,KAAK;AACzD,eAAO,8BAAQ,+BAAc,YAAY,GAAG,CAAC;AAAA,EAC/C;AACA,SAAO,OAAO,cAAc,cAAc,YAAY,QAAQ,IAAI;AACpE;AAmCO,SAAS,iBAAyB;AACvC,QAAM,WAAW,QAAQ,IAAI;AAC7B,MAAI,SAAU,QAAO;AAErB,QAAM,cAAU,0BAAQ,UAAU,GAAG,MAAM,UAAU;AACrD,UAAI,+BAAW,0BAAQ,SAAS,eAAe,CAAC,EAAG,QAAO;AAE1D,aAAO,0BAAQ,QAAQ,IAAI,GAAG,MAAM,MAAM,WAAW,aAAa;AACpE;AAEA,SAAS,SAAY,MAAiB;AACpC,SAAO,KAAK,UAAM,iCAAa,0BAAQ,eAAe,GAAG,IAAI,GAAG,MAAM,CAAC;AACzE;AAEO,SAAS,eAAoC;AAClD,SAAO,SAA8B,eAAe;AACtD;AASO,SAAS,UAAsB;AACpC,SAAO,KAAK;AAAA,QACV,iCAAa,0BAAQ,UAAU,GAAG,MAAM,mBAAmB,GAAG,MAAM;AAAA,EACtE;AACF;AAGO,SAAS,WAAW,MAAsB;AAC/C,aAAO,+BAAW,QAAQ,EAAE,WAAO,6BAAa,IAAI,CAAC,EAAE,OAAO,KAAK;AACrE;AAYO,SAAS,oBAAoB,MAAc,eAAe,GAAsB;AACrF,QAAM,WAAW,KAAK;AAAA,QACpB,iCAAa,0BAAQ,KAAK,eAAe,GAAG,MAAM;AAAA,EACpD;AACA,QAAM,aAAgC,CAAC;AACvC,aAAW,WAAW,SAAS,UAAU;AACvC,UAAM,SAAS,eAAW,0BAAQ,KAAK,QAAQ,IAAI,CAAC;AACpD,QAAI,WAAW,QAAQ,QAAQ;AAC7B,iBAAW,KAAK,EAAE,MAAM,QAAQ,MAAM,UAAU,QAAQ,QAAQ,OAAO,CAAC;AAAA,IAC1E;AAAA,EACF;AACA,SAAO;AACT;AAEO,SAAS,uBAAyC;AACvD,SAAO,SAA2B,wBAAwB;AAC5D;AAGO,SAAS,eAAe,QAAqC;AAClE,SAAO,OAAO,UAAU,KAAK,EAAE;AACjC;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -14,6 +14,11 @@ interface RedactionBattery {
|
|
|
14
14
|
benign_limit: number;
|
|
15
15
|
secrets: RedactionSecretCase[];
|
|
16
16
|
benign: RedactionBenignCase[];
|
|
17
|
+
truncation_cases: {
|
|
18
|
+
text: string;
|
|
19
|
+
limit: number;
|
|
20
|
+
expect_redacted: string;
|
|
21
|
+
}[];
|
|
17
22
|
}
|
|
18
23
|
interface ConformanceFixtureMeta {
|
|
19
24
|
path: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ export interface RedactionBattery {
|
|
|
14
14
|
benign_limit: number;
|
|
15
15
|
secrets: RedactionSecretCase[];
|
|
16
16
|
benign: RedactionBenignCase[];
|
|
17
|
+
truncation_cases: {
|
|
18
|
+
text: string;
|
|
19
|
+
limit: number;
|
|
20
|
+
expect_redacted: string;
|
|
21
|
+
}[];
|
|
17
22
|
}
|
|
18
23
|
export interface ConformanceFixtureMeta {
|
|
19
24
|
path: string;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\nimport { createHash } from \"node:crypto\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { dirname, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\n/**\n * Typed loaders for the language-neutral parity fixtures produced by the Python\n * oracle (`~/repos/bourdon/tools/gen_conformance.py`). Python is the source of\n * truth; the @getbourdon/* TypeScript mirror asserts against these exact bytes.\n *\n * Resolution order:\n * 1. `BOURDON_CONFORMANCE_DIR` env var — the oracle checkout (parity tests +\n * oracle dev use this; highest priority so a build always asserts against\n * the live oracle).\n * 2. the fixtures BUNDLED in this package (`<pkg>/fixtures`, shipped in the\n * tarball) — what an installed `@getbourdon/conformance` consumer gets.\n * 3. the sibling Python checkout `../../bourdon/conformance` — dev fallback.\n *\n * The bundled copy is a vendored snapshot refreshed from the oracle by\n * `pnpm --filter @getbourdon/conformance sync-fixtures` (and in the release\n * workflow before publish), so the published package is self-contained.\n */\n\n// `import.meta.url` in ESM; esbuild empties it in the CJS bundle, where the\n// native `__dirname` global is the real directory — fall back to it.\ndeclare const __dirname: string | undefined;\nfunction moduleDir(): string {\n if (typeof import.meta !== \"undefined\" && import.meta.url) {\n return dirname(fileURLToPath(import.meta.url));\n }\n return typeof __dirname !== \"undefined\" ? __dirname : process.cwd();\n}\n\nexport interface RedactionSecretCase {\n /** Joined at load (`assembleSecret`) so no contiguous secret literal lands in git. */\n fragments: string[];\n expect_redacted: string;\n expect_contains_secret: boolean;\n}\n\nexport interface RedactionBenignCase {\n text: string;\n expect_redacted: string;\n expect_contains_secret: boolean;\n}\n\nexport interface RedactionBattery {\n redacted_sentinel: string;\n benign_limit: number;\n secrets: RedactionSecretCase[];\n benign: RedactionBenignCase[];\n}\n\nexport interface ConformanceFixtureMeta {\n path: string;\n sha256: string;\n producer: string;\n}\n\nexport interface ConformanceManifest {\n conformance_version: string;\n produced_against: { bourdon_version: string };\n fixtures: ConformanceFixtureMeta[];\n}\n\nexport function conformanceDir(): string {\n const override = process.env.BOURDON_CONFORMANCE_DIR;\n if (override) return override;\n // Bundled snapshot: <pkg>/fixtures, one level up from src/ or dist/.\n const bundled = resolve(moduleDir(), \"..\", \"fixtures\");\n if (existsSync(resolve(bundled, \"manifest.json\"))) return bundled;\n // Dev fallback: the sibling Python oracle checkout.\n return resolve(process.cwd(), \"..\", \"..\", \"bourdon\", \"conformance\");\n}\n\nfunction loadJson<T>(name: string): T {\n return JSON.parse(readFileSync(resolve(conformanceDir(), name), \"utf8\")) as T;\n}\n\nexport function loadManifest(): ConformanceManifest {\n return loadJson<ConformanceManifest>(\"manifest.json\");\n}\n\nexport interface FixturePin {\n conformance_version: string;\n manifest_sha256: string;\n}\n\n/** The recorded fixture pin committed beside this package: which contract\n * version the vendored snapshot is, and the sha256 the manifest must hash to. */\nexport function loadPin(): FixturePin {\n return JSON.parse(\n readFileSync(resolve(moduleDir(), \"..\", \"fixtures.pin.json\"), \"utf8\"),\n ) as FixturePin;\n}\n\n/** sha256 hex of one file's raw bytes. */\nexport function sha256File(path: string): string {\n return createHash(\"sha256\").update(readFileSync(path)).digest(\"hex\");\n}\n\nexport interface FixtureMismatch {\n path: string;\n expected: string;\n actual: string;\n}\n\n/** Verify every fixture in `dir` against the sha256 its manifest stamps.\n * Returns the mismatches — an empty array is the only passing result. The\n * same routine backs the parity gate AND its mutation test, so the check\n * that guards releases is itself provably able to fail. */\nexport function verifyFixtureHashes(dir: string = conformanceDir()): FixtureMismatch[] {\n const manifest = JSON.parse(\n readFileSync(resolve(dir, \"manifest.json\"), \"utf8\"),\n ) as ConformanceManifest;\n const mismatches: FixtureMismatch[] = [];\n for (const fixture of manifest.fixtures) {\n const actual = sha256File(resolve(dir, fixture.path));\n if (actual !== fixture.sha256) {\n mismatches.push({ path: fixture.path, expected: fixture.sha256, actual });\n }\n }\n return mismatches;\n}\n\nexport function loadRedactionBattery(): RedactionBattery {\n return loadJson<RedactionBattery>(\"redaction_battery.json\");\n}\n\n/** Reconstruct a secret case's runtime string from its fragments. */\nexport function assembleSecret(secret: RedactionSecretCase): string {\n return secret.fragments.join(\"\");\n}\n"],"mappings":";AACA,SAAS,kBAAkB;AAC3B,SAAS,YAAY,oBAAoB;AACzC,SAAS,SAAS,eAAe;AACjC,SAAS,qBAAqB;AAuB9B,SAAS,YAAoB;AAC3B,MAAI,OAAO,gBAAgB,eAAe,YAAY,KAAK;AACzD,WAAO,QAAQ,cAAc,YAAY,GAAG,CAAC;AAAA,EAC/C;AACA,SAAO,OAAO,cAAc,cAAc,YAAY,QAAQ,IAAI;AACpE;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// SPDX-License-Identifier: Apache-2.0\nimport { createHash } from \"node:crypto\";\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { dirname, resolve } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\n/**\n * Typed loaders for the language-neutral parity fixtures produced by the Python\n * oracle (`~/repos/bourdon/tools/gen_conformance.py`). Python is the source of\n * truth; the @getbourdon/* TypeScript mirror asserts against these exact bytes.\n *\n * Resolution order:\n * 1. `BOURDON_CONFORMANCE_DIR` env var — the oracle checkout (parity tests +\n * oracle dev use this; highest priority so a build always asserts against\n * the live oracle).\n * 2. the fixtures BUNDLED in this package (`<pkg>/fixtures`, shipped in the\n * tarball) — what an installed `@getbourdon/conformance` consumer gets.\n * 3. the sibling Python checkout `../../bourdon/conformance` — dev fallback.\n *\n * The bundled copy is a vendored snapshot refreshed from the oracle by\n * `pnpm --filter @getbourdon/conformance sync-fixtures` (and in the release\n * workflow before publish), so the published package is self-contained.\n */\n\n// `import.meta.url` in ESM; esbuild empties it in the CJS bundle, where the\n// native `__dirname` global is the real directory — fall back to it.\ndeclare const __dirname: string | undefined;\nfunction moduleDir(): string {\n if (typeof import.meta !== \"undefined\" && import.meta.url) {\n return dirname(fileURLToPath(import.meta.url));\n }\n return typeof __dirname !== \"undefined\" ? __dirname : process.cwd();\n}\n\nexport interface RedactionSecretCase {\n /** Joined at load (`assembleSecret`) so no contiguous secret literal lands in git. */\n fragments: string[];\n expect_redacted: string;\n expect_contains_secret: boolean;\n}\n\nexport interface RedactionBenignCase {\n text: string;\n expect_redacted: string;\n expect_contains_secret: boolean;\n}\n\nexport interface RedactionBattery {\n redacted_sentinel: string;\n benign_limit: number;\n secrets: RedactionSecretCase[];\n benign: RedactionBenignCase[];\n truncation_cases: { text: string; limit: number; expect_redacted: string }[];\n}\n\nexport interface ConformanceFixtureMeta {\n path: string;\n sha256: string;\n producer: string;\n}\n\nexport interface ConformanceManifest {\n conformance_version: string;\n produced_against: { bourdon_version: string };\n fixtures: ConformanceFixtureMeta[];\n}\n\nexport function conformanceDir(): string {\n const override = process.env.BOURDON_CONFORMANCE_DIR;\n if (override) return override;\n // Bundled snapshot: <pkg>/fixtures, one level up from src/ or dist/.\n const bundled = resolve(moduleDir(), \"..\", \"fixtures\");\n if (existsSync(resolve(bundled, \"manifest.json\"))) return bundled;\n // Dev fallback: the sibling Python oracle checkout.\n return resolve(process.cwd(), \"..\", \"..\", \"bourdon\", \"conformance\");\n}\n\nfunction loadJson<T>(name: string): T {\n return JSON.parse(readFileSync(resolve(conformanceDir(), name), \"utf8\")) as T;\n}\n\nexport function loadManifest(): ConformanceManifest {\n return loadJson<ConformanceManifest>(\"manifest.json\");\n}\n\nexport interface FixturePin {\n conformance_version: string;\n manifest_sha256: string;\n}\n\n/** The recorded fixture pin committed beside this package: which contract\n * version the vendored snapshot is, and the sha256 the manifest must hash to. */\nexport function loadPin(): FixturePin {\n return JSON.parse(\n readFileSync(resolve(moduleDir(), \"..\", \"fixtures.pin.json\"), \"utf8\"),\n ) as FixturePin;\n}\n\n/** sha256 hex of one file's raw bytes. */\nexport function sha256File(path: string): string {\n return createHash(\"sha256\").update(readFileSync(path)).digest(\"hex\");\n}\n\nexport interface FixtureMismatch {\n path: string;\n expected: string;\n actual: string;\n}\n\n/** Verify every fixture in `dir` against the sha256 its manifest stamps.\n * Returns the mismatches — an empty array is the only passing result. The\n * same routine backs the parity gate AND its mutation test, so the check\n * that guards releases is itself provably able to fail. */\nexport function verifyFixtureHashes(dir: string = conformanceDir()): FixtureMismatch[] {\n const manifest = JSON.parse(\n readFileSync(resolve(dir, \"manifest.json\"), \"utf8\"),\n ) as ConformanceManifest;\n const mismatches: FixtureMismatch[] = [];\n for (const fixture of manifest.fixtures) {\n const actual = sha256File(resolve(dir, fixture.path));\n if (actual !== fixture.sha256) {\n mismatches.push({ path: fixture.path, expected: fixture.sha256, actual });\n }\n }\n return mismatches;\n}\n\nexport function loadRedactionBattery(): RedactionBattery {\n return loadJson<RedactionBattery>(\"redaction_battery.json\");\n}\n\n/** Reconstruct a secret case's runtime string from its fragments. */\nexport function assembleSecret(secret: RedactionSecretCase): string {\n return secret.fragments.join(\"\");\n}\n"],"mappings":";AACA,SAAS,kBAAkB;AAC3B,SAAS,YAAY,oBAAoB;AACzC,SAAS,SAAS,eAAe;AACjC,SAAS,qBAAqB;AAuB9B,SAAS,YAAoB;AAC3B,MAAI,OAAO,gBAAgB,eAAe,YAAY,KAAK;AACzD,WAAO,QAAQ,cAAc,YAAY,GAAG,CAAC;AAAA,EAC/C;AACA,SAAO,OAAO,cAAc,cAAc,YAAY,QAAQ,IAAI;AACpE;AAmCO,SAAS,iBAAyB;AACvC,QAAM,WAAW,QAAQ,IAAI;AAC7B,MAAI,SAAU,QAAO;AAErB,QAAM,UAAU,QAAQ,UAAU,GAAG,MAAM,UAAU;AACrD,MAAI,WAAW,QAAQ,SAAS,eAAe,CAAC,EAAG,QAAO;AAE1D,SAAO,QAAQ,QAAQ,IAAI,GAAG,MAAM,MAAM,WAAW,aAAa;AACpE;AAEA,SAAS,SAAY,MAAiB;AACpC,SAAO,KAAK,MAAM,aAAa,QAAQ,eAAe,GAAG,IAAI,GAAG,MAAM,CAAC;AACzE;AAEO,SAAS,eAAoC;AAClD,SAAO,SAA8B,eAAe;AACtD;AASO,SAAS,UAAsB;AACpC,SAAO,KAAK;AAAA,IACV,aAAa,QAAQ,UAAU,GAAG,MAAM,mBAAmB,GAAG,MAAM;AAAA,EACtE;AACF;AAGO,SAAS,WAAW,MAAsB;AAC/C,SAAO,WAAW,QAAQ,EAAE,OAAO,aAAa,IAAI,CAAC,EAAE,OAAO,KAAK;AACrE;AAYO,SAAS,oBAAoB,MAAc,eAAe,GAAsB;AACrF,QAAM,WAAW,KAAK;AAAA,IACpB,aAAa,QAAQ,KAAK,eAAe,GAAG,MAAM;AAAA,EACpD;AACA,QAAM,aAAgC,CAAC;AACvC,aAAW,WAAW,SAAS,UAAU;AACvC,UAAM,SAAS,WAAW,QAAQ,KAAK,QAAQ,IAAI,CAAC;AACpD,QAAI,WAAW,QAAQ,QAAQ;AAC7B,iBAAW,KAAK,EAAE,MAAM,QAAQ,MAAM,UAAU,QAAQ,QAAQ,OAAO,CAAC;AAAA,IAC1E;AAAA,EACF;AACA,SAAO;AACT;AAEO,SAAS,uBAAyC;AACvD,SAAO,SAA2B,wBAAwB;AAC5D;AAGO,SAAS,eAAe,QAAqC;AAClE,SAAO,OAAO,UAAU,KAAK,EAAE;AACjC;","names":[]}
|
package/fixtures/leak_cases.json
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"financial",
|
|
10
10
|
"health",
|
|
11
11
|
"legal",
|
|
12
|
+
"nda",
|
|
13
|
+
"patent-pending",
|
|
12
14
|
"personal",
|
|
13
15
|
"private",
|
|
14
16
|
"secret"
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
"known_entities": [
|
|
21
23
|
{
|
|
22
24
|
"name": "API",
|
|
23
|
-
"summary": "
|
|
25
|
+
"summary": "service_role = hunter2hunter2 for supabase",
|
|
24
26
|
"visibility": "team"
|
|
25
27
|
}
|
|
26
28
|
]
|
|
@@ -40,7 +42,7 @@
|
|
|
40
42
|
"date": "2026-06-20",
|
|
41
43
|
"files_touched": [
|
|
42
44
|
"src/app.ts",
|
|
43
|
-
"config/.env"
|
|
45
|
+
"config/.env:PASSWORD=supersecretvalue"
|
|
44
46
|
]
|
|
45
47
|
}
|
|
46
48
|
]
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
"agent": {
|
|
59
61
|
"id": "x",
|
|
60
62
|
"type": "code-assistant",
|
|
61
|
-
"role_narrative": "rotate the api_key before every deploy"
|
|
63
|
+
"role_narrative": "rotate the api_key=hunter2hunter2 before every deploy"
|
|
62
64
|
}
|
|
63
65
|
},
|
|
64
66
|
"expected_findings": [
|
|
@@ -73,7 +75,7 @@
|
|
|
73
75
|
"manifest": {
|
|
74
76
|
"capabilities": [
|
|
75
77
|
"state_db",
|
|
76
|
-
"the bearer token is
|
|
78
|
+
"the bearer token is QXp9-not-a-real-key"
|
|
77
79
|
]
|
|
78
80
|
},
|
|
79
81
|
"expected_findings": [
|
package/fixtures/manifest.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_doc": "Index of cross-impl parity fixtures. conformance_version bumps on any fixture change (patch=added cases, minor=new family, major=changed expected-output = a reviewed behavior change). Python is the oracle; this file is generated by tools/gen_conformance.py.",
|
|
3
|
-
"conformance_version": "
|
|
3
|
+
"conformance_version": "6.1.1",
|
|
4
4
|
"produced_against": {
|
|
5
|
-
"bourdon_version": "0.
|
|
5
|
+
"bourdon_version": "0.26.0"
|
|
6
6
|
},
|
|
7
7
|
"fixtures": [
|
|
8
8
|
{
|
|
9
9
|
"path": "redaction_battery.json",
|
|
10
|
-
"sha256": "
|
|
10
|
+
"sha256": "0c8f9f8b9e9d1991f66d1408b160970cc8cc9e47b13143cd04a9de340f798531",
|
|
11
11
|
"producer": "tools/gen_conformance.py::redaction_battery"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"path": "leak_cases.json",
|
|
15
|
-
"sha256": "
|
|
15
|
+
"sha256": "fe7c5981072ca93005745f96676067bb1ab69f4d4aaa2d254e6375b531167b65",
|
|
16
16
|
"producer": "tools/gen_conformance.py::leak_cases"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"path": "merge_vectors.json",
|
|
105
|
-
"sha256": "
|
|
105
|
+
"sha256": "74322ae0460fb38331ee47e252d10f64e7c2c31254ae814381b852ab2510b110",
|
|
106
106
|
"producer": "tools/gen_conformance.py::merge_vectors"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
@@ -447,7 +447,7 @@
|
|
|
447
447
|
},
|
|
448
448
|
{
|
|
449
449
|
"path": "native_stores/hermes/store/.hermes/memories/memory.md",
|
|
450
|
-
"sha256": "
|
|
450
|
+
"sha256": "6a0726d27419af63b5713a3314dbaab64ef2fa5b9d310d2e2d3332f07516833c",
|
|
451
451
|
"producer": "tools/gen_conformance.py::native_stores"
|
|
452
452
|
},
|
|
453
453
|
{
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
},
|
|
493
493
|
{
|
|
494
494
|
"path": "native_stores/claude_code/store/knowledge_graph/memory.jsonl",
|
|
495
|
-
"sha256": "
|
|
495
|
+
"sha256": "624f5d9ccd73456695fc7a91a5811c358b292f52cc1ea2e3ceff7674c338e3e3",
|
|
496
496
|
"producer": "tools/gen_conformance.py::native_stores"
|
|
497
497
|
},
|
|
498
498
|
{
|
|
@@ -502,7 +502,7 @@
|
|
|
502
502
|
},
|
|
503
503
|
{
|
|
504
504
|
"path": "native_stores/github_copilot/cache/github-copilot/payload.json",
|
|
505
|
-
"sha256": "
|
|
505
|
+
"sha256": "5b922bb2d150ee05c92d92c867274e2a8569d5f2810e5c806cffb4cd0765e7f7",
|
|
506
506
|
"producer": "tools/gen_conformance.py::native_stores"
|
|
507
507
|
},
|
|
508
508
|
{
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
{
|
|
166
166
|
"date": "2026-08-01",
|
|
167
167
|
"cwd": "/w",
|
|
168
|
-
"project_focus": "
|
|
168
|
+
"project_focus": "Pennant"
|
|
169
169
|
}
|
|
170
170
|
],
|
|
171
171
|
"expected": {
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"cwd": "/w",
|
|
176
176
|
"project_focus": [
|
|
177
177
|
"Bourdon",
|
|
178
|
-
"
|
|
178
|
+
"Pennant"
|
|
179
179
|
]
|
|
180
180
|
}
|
|
181
181
|
],
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
{"type":"entity","name":"Zephyr","entityType":"project","observations":["File conversion app."]}
|
|
2
|
-
{"type":"entity","name":"SecretCreds","entityType":"concept","observations":["
|
|
2
|
+
{"type":"entity","name":"SecretCreds","entityType":"concept","observations":["service_role=hunter2hunter2 for supabase"]}
|
|
3
3
|
{"type":"relation","from":"Zephyr","to":"Bourdon","relationType":"uses"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"repository_url": "https://api.github.com/repos/ryan/bourdon"
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
"title": "Rotate
|
|
14
|
+
"title": "Rotate service_role=hunter2hunter2 in CI",
|
|
15
15
|
"number": 9,
|
|
16
16
|
"updated_at": "2026-06-18T10:00:00Z",
|
|
17
17
|
"repository_url": "https://api.github.com/repos/ryan/bourdon"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
- Project uses pytest with xdist
|
|
2
|
-
- The bearer token is
|
|
2
|
+
- The bearer token is hunter2.hunter2
|
|
@@ -19,28 +19,42 @@
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"fragments": [
|
|
22
|
-
"
|
|
22
|
+
"password: correcthorsebatterystaple"
|
|
23
23
|
],
|
|
24
24
|
"expect_redacted": "[redacted credential-like text]",
|
|
25
25
|
"expect_contains_secret": true
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"fragments": [
|
|
29
|
-
"
|
|
29
|
+
"client_secret=hunter2hunter2"
|
|
30
30
|
],
|
|
31
31
|
"expect_redacted": "[redacted credential-like text]",
|
|
32
32
|
"expect_contains_secret": true
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"fragments": [
|
|
36
|
-
"
|
|
36
|
+
"\"password\": \"hunter2hunter2\""
|
|
37
37
|
],
|
|
38
38
|
"expect_redacted": "[redacted credential-like text]",
|
|
39
39
|
"expect_contains_secret": true
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"fragments": [
|
|
43
|
-
"
|
|
43
|
+
"--password=hunter2hunter2"
|
|
44
|
+
],
|
|
45
|
+
"expect_redacted": "[redacted credential-like text]",
|
|
46
|
+
"expect_contains_secret": true
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"fragments": [
|
|
50
|
+
"PASSWORD=supersecretvalue"
|
|
51
|
+
],
|
|
52
|
+
"expect_redacted": "[redacted credential-like text]",
|
|
53
|
+
"expect_contains_secret": true
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"fragments": [
|
|
57
|
+
"SUPABASE_SERVICE_KEY=hunter2hunter2"
|
|
44
58
|
],
|
|
45
59
|
"expect_redacted": "[redacted credential-like text]",
|
|
46
60
|
"expect_contains_secret": true
|
|
@@ -195,6 +209,78 @@
|
|
|
195
209
|
"text": "Bourdon recognition-first runtime layer is the core promise",
|
|
196
210
|
"expect_redacted": "Bourdon recognition-first runtime layer is the core promise",
|
|
197
211
|
"expect_contains_secret": false
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"text": "uses a bearer token to authenticate",
|
|
215
|
+
"expect_redacted": "uses a bearer token to authenticate",
|
|
216
|
+
"expect_contains_secret": false
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"text": "the service_role key for supabase",
|
|
220
|
+
"expect_redacted": "the service_role key for supabase",
|
|
221
|
+
"expect_contains_secret": false
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"text": "stripe secret rotated today",
|
|
225
|
+
"expect_redacted": "stripe secret rotated today",
|
|
226
|
+
"expect_contains_secret": false
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"text": "the keystore password lives in .env",
|
|
230
|
+
"expect_redacted": "the keystore password lives in .env",
|
|
231
|
+
"expect_contains_secret": false
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"text": "Add password reset to the console",
|
|
235
|
+
"expect_redacted": "Add password reset to the console",
|
|
236
|
+
"expect_contains_secret": false
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"text": "Fixed the password reset email template",
|
|
240
|
+
"expect_redacted": "Fixed the password reset email template",
|
|
241
|
+
"expect_contains_secret": false
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"text": "Updated .env with the new port",
|
|
245
|
+
"expect_redacted": "Updated .env with the new port",
|
|
246
|
+
"expect_contains_secret": false
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"text": "Rotated the keystore for the Android release",
|
|
250
|
+
"expect_redacted": "Rotated the keystore for the Android release",
|
|
251
|
+
"expect_contains_secret": false
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"text": "Reviewed the service_role RLS policy",
|
|
255
|
+
"expect_redacted": "Reviewed the service_role RLS policy",
|
|
256
|
+
"expect_contains_secret": false
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"text": "Shipped api_key rotation tooling",
|
|
260
|
+
"expect_redacted": "Shipped api_key rotation tooling",
|
|
261
|
+
"expect_contains_secret": false
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"text": "the password is rotated monthly",
|
|
265
|
+
"expect_redacted": "the password is rotated monthly",
|
|
266
|
+
"expect_contains_secret": false
|
|
267
|
+
}
|
|
268
|
+
],
|
|
269
|
+
"truncation_cases": [
|
|
270
|
+
{
|
|
271
|
+
"text": "aaa😀bbb",
|
|
272
|
+
"limit": 7,
|
|
273
|
+
"expect_redacted": "aaa😀bbb"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"text": "aaa😀bbb",
|
|
277
|
+
"limit": 6,
|
|
278
|
+
"expect_redacted": "aaa..."
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"text": "a😀bcdef",
|
|
282
|
+
"limit": 6,
|
|
283
|
+
"expect_redacted": "a😀b..."
|
|
198
284
|
}
|
|
199
285
|
],
|
|
200
286
|
"case_variants": [
|
package/fixtures.pin.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_doc": "The recorded fixture pin. CI and the package tests assert the vendored fixtures/manifest.json hashes to exactly this value, so the fixture set in any build is provably the reviewed one. Refresh via the re-pin ritual in README.md.",
|
|
3
|
-
"conformance_version": "
|
|
4
|
-
"manifest_sha256": "
|
|
3
|
+
"conformance_version": "6.1.1",
|
|
4
|
+
"manifest_sha256": "832191de44c915a867c28955b16bf1ec268bbab78cf9cf7626a60a0e3f48ab9c"
|
|
5
5
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getbourdon/conformance",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0-rc.2",
|
|
4
4
|
"description": "Language-neutral cross-implementation parity fixtures for Bourdon. Python (pip install bourdon) is the oracle; the @getbourdon/* TypeScript mirror asserts against these exact bytes.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"LICENSE"
|
|
22
22
|
],
|
|
23
23
|
"engines": {
|
|
24
|
-
"node": ">=
|
|
24
|
+
"node": ">=24.0.0"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public",
|