feat(tess): add safe runtime observability (#726)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/publish Pipeline was successful

This commit was merged in pull request #726.
This commit is contained in:
2026-07-13 01:29:18 +00:00
parent 7b9f40d3b7
commit 86a50138a9
12 changed files with 391 additions and 24 deletions

View File

@@ -0,0 +1,12 @@
import { describe, expect, it } from 'vitest';
import { HealthController } from './health.controller.js';
describe('HealthController', (): void => {
it('exposes liveness and readiness without configuration details', (): void => {
const controller = new HealthController();
expect(controller.check()).toEqual({ status: 'ok' });
expect(controller.ready()).toEqual({ status: 'ready' });
expect(JSON.stringify(controller.ready())).not.toContain('credential');
});
});

View File

@@ -6,4 +6,10 @@ export class HealthController {
check(): { status: string } {
return { status: 'ok' };
}
/** Readiness intentionally exposes no configuration, provider, or credential details. */
@Get('ready')
ready(): { status: string } {
return { status: 'ready' };
}
}