fix(invariants): enforce runtime relationships
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { SecretRedactor } from '../src/secret-redactor.ts'
|
||||
import { telemetryRedactionViolation } from '../src/redaction-contract.ts'
|
||||
|
||||
describe('telemetryRedactionViolation', () => {
|
||||
it('accepts the shipped redactor and rejects one that preserves credentials', () => {
|
||||
expect(telemetryRedactionViolation(
|
||||
new SecretRedactor(),
|
||||
'[REDACTED]',
|
||||
'@deepseek-ai/dsh-telemetry',
|
||||
)).toBeUndefined()
|
||||
expect(telemetryRedactionViolation(
|
||||
{ redactText: value => value },
|
||||
'[REDACTED]',
|
||||
'@deepseek-ai/dsh-telemetry',
|
||||
)).toBe('telemetry redaction must remove credential values, preserve package metadata, and remain idempotent')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user