1021 B
1021 B
Gate Check Usage
Files
gate_config.json: threshold configurationgate_check.sh: gate decision script
Thresholds
Current defaults in gate_config.json:
maxTokens = 30000maxRetries = 2maxMinutes = 40
Command
./gate_check.sh <tokens> <retries> <minutes> <escalationFlag>
Parameters:
tokens(non-negative integer)retries(non-negative integer)minutes(non-negative integer)escalationFlag(true/false,1/0,yes/no,y/n)
Decision Rules
- If
escalationFlagis true-like (true/1/yes/y), outputPAUSE_AND_ESCALATE. - Else if any threshold is exceeded (
tokens > maxTokensORretries > maxRetriesORminutes > maxMinutes), outputBLOCK. - Otherwise output
PASS.
Return Codes
0=PASS2=BLOCK3=PAUSE_AND_ESCALATE1= input/config error
Examples
./gate_check.sh 12000 1 20 false # PASS
./gate_check.sh 45000 1 20 false # BLOCK
./gate_check.sh 12000 1 20 true # PAUSE_AND_ESCALATE