File tree Expand file tree Collapse file tree
src/gateway/server-methods Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,9 +5,12 @@ import {
55} from "../../logging/diagnostic-stability.js" ;
66import type { GatewayRequestHandlers } from "./types.js" ;
77
8+ /** Gateway handler for payload-free stability diagnostics. */
89export const diagnosticsHandlers : GatewayRequestHandlers = {
910 "diagnostics.stability" : async ( { params, respond } ) => {
1011 try {
12+ // Normalization owns parameter bounds so malformed diagnostic requests
13+ // return a client error instead of leaking logging internals.
1114 const query = normalizeDiagnosticStabilityQuery ( params ) ;
1215 respond ( true , getDiagnosticStabilitySnapshot ( query ) , undefined ) ;
1316 } catch ( err ) {
Original file line number Diff line number Diff line change 77import { readConfiguredLogTail } from "../../logging/log-tail.js" ;
88import type { GatewayRequestHandlers } from "./types.js" ;
99
10+ /** Gateway handler for bounded reads from the configured gateway log. */
1011export const logsHandlers : GatewayRequestHandlers = {
1112 "logs.tail" : async ( { params, respond } ) => {
1213 if ( ! validateLogsTailParams ( params ) ) {
@@ -23,6 +24,8 @@ export const logsHandlers: GatewayRequestHandlers = {
2324
2425 const p = params as { cursor ?: number ; limit ?: number ; maxBytes ?: number } ;
2526 try {
27+ // The log-tail reader enforces cursor/byte limits and source selection;
28+ // the handler only maps protocol params and failure shape.
2629 const result = await readConfiguredLogTail ( {
2730 cursor : p . cursor ,
2831 limit : p . limit ,
You can’t perform that action at this time.
0 commit comments