Skip to content

Commit a7535e9

Browse files
committed
upgrade logger error
1 parent 95a3277 commit a7535e9

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

apps/sim/lib/execution/durable-secret-provenance-enforcement.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,16 @@ describe('durable secret provenance enforcement', () => {
6969
)
7070
})
7171

72-
it('warns with the surface, cause, and affected count so a surface can be measured', () => {
72+
it('reports at error with the surface, cause, and affected count so it survives every LOG_LEVEL default', () => {
7373
reportUnrecordedDurableProvenance({
7474
surface: 'table-row',
7575
cause: 'row-sidecar-not-exact',
7676
affectedCount: 8,
7777
workspaceId: 'workspace-1',
7878
})
7979

80-
expect(mockLogger.warn).toHaveBeenCalledWith(
80+
expect(mockLogger.warn).not.toHaveBeenCalled()
81+
expect(mockLogger.error).toHaveBeenCalledWith(
8182
'Proceeding on unrecorded durable secret provenance',
8283
{
8384
surface: 'table-row',

apps/sim/lib/execution/durable-secret-provenance-enforcement.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,14 @@ export interface UnrecordedDurableProvenanceReport {
8484
/**
8585
* Records that a read proceeded on provenance nobody wrote down.
8686
*
87-
* Warn, not error: on an unenforced surface this is the expected state for legacy data, and it sits
88-
* on a per-block read path. The count is what tells you whether a surface is ready to close — it
89-
* should fall to zero once its writers stop losing provenance.
87+
* Error, not warn, for the same reason the originating-fault reasons use it: error is the only
88+
* level that survives every default the logger falls back to — production, test, and a self-hosted
89+
* chart that sets no `LOG_LEVEL`. A surface stays open on the strength of this line being visible
90+
* and trending to zero, so a level that a deployment can silently filter would leave the posture
91+
* unmeasured. It is deliberately noisy on an affected workspace; that is the signal.
9092
*/
9193
export function reportUnrecordedDurableProvenance(report: UnrecordedDurableProvenanceReport): void {
92-
logger.warn('Proceeding on unrecorded durable secret provenance', {
94+
logger.error('Proceeding on unrecorded durable secret provenance', {
9395
surface: report.surface,
9496
cause: report.cause,
9597
enforced: false,

0 commit comments

Comments
 (0)