if-greater-equal
if-greater-equal - check if left value is greater than or equal to right value
SYNOPSIS
Section titled “SYNOPSIS”state-name: tool: if-greater-equal arguments: left: <number1> right: <number2> goto: true: <ge-state> false: <lt-state>DESCRIPTION
Section titled “DESCRIPTION”The if-greater-equal tool performs a numeric comparison and returns "true" if the left value is greater than or equal to the right value, or "false" otherwise.
Both values are parsed as decimal numbers. The tool returns exit code 1 if either value cannot be parsed as a valid number.
ARGUMENTS
Section titled “ARGUMENTS”| Argument | Required | Default | Description |
|---|---|---|---|
left | Yes | - | The number to compare (left side) |
right | Yes | - | The number to compare against (right side) |
EXIT CODES
Section titled “EXIT CODES”| Code | Meaning |
|---|---|
0 | Success (outputs “true” or “false”) |
1 | Missing argument or invalid number |
OUTPUT
Section titled “OUTPUT”The tool outputs "true" if left >= right, or "false" otherwise.
EXAMPLES
Section titled “EXAMPLES”Minimum Requirement
Section titled “Minimum Requirement”check-minimum: tool: if-greater-equal arguments: left: "{{ test_coverage }}" right: "80" goto: true: coverage-acceptable false: coverage-too-lowVersion Check
Section titled “Version Check”check-version: tool: bash arguments: command: node --version | grep -oP 'v\K[0-9]+' output: var(node_major) next: version-ok
version-ok: tool: if-greater-equal arguments: left: "{{ node_major }}" right: "18" goto: true: node-compatible false: node-outdatedQuorum Check
Section titled “Quorum Check”check-quorum: tool: if-greater-equal arguments: left: "{{ votes }}" right: "{{ quorum_needed }}" goto: true: quorum-reached false: need-more-votesMinimum Age
Section titled “Minimum Age”check-age: tool: if-greater-equal arguments: left: "{{ user_age }}" right: "18" goto: true: age-verified false: underageCOMMON PATTERNS
Section titled “COMMON PATTERNS”Threshold Met
Section titled “Threshold Met”check-threshold: tool: if-greater-equal arguments: left: "{{ score }}" right: "{{ passing_score }}" goto: true: passed false: failedResource Sufficiency
Section titled “Resource Sufficiency”check-memory: tool: bash arguments: command: free -g | awk '/^Mem:/ {print $7}' output: var(free_gb) next: has-memory
has-memory: tool: if-greater-equal arguments: left: "{{ free_gb }}" right: "4" goto: true: memory-sufficient false: memory-lowConfidence Level
Section titled “Confidence Level”check-confidence: tool: if-greater-equal arguments: left: "{{ confidence_score }}" right: "0.95" goto: true: high-confidence false: needs-reviewSEE ALSO
Section titled “SEE ALSO”- if-less-equal - Less than or equal
- if-greater - Strictly greater than
- if-less - Strictly less than