# GAL-2 Time Contract RC2 Client Quickstart

Endpoint:

http://127.0.0.1:9095/contract

Purpose:

The client should not only ask what time it is.

The client should ask whether GAL-2 says the time is safe to consume.

## Minimal client logic

1. Call /contract.
2. Confirm HTTP 200.
3. Confirm schema is gal2-daemon-time-contract-v1.
4. Confirm version is 1.0.0-contract-rc2.
5. Confirm monotonic_sequence increases across calls.
6. Confirm gal2_time does not move backward.
7. If safe_to_consume is true, consume gal2_time only until valid_until.
8. If safe_to_consume is false, do not use gal2_time for critical decisions.

## Safe application behavior

Use gal2_time when:

safe_to_consume is true.

Do not use gal2_time for critical decisions when:

safe_to_consume is false.

## Important fields

safe_to_consume:
The main decision field for applications.

mode:
The state of the Time Contract. Expected states include LIVE, HOLDOVER, DEGRADED, REJOIN, FAIL_CLOSED, and WARMING.

valid_until:
The expiration time of the current contract decision.

monotonic_sequence:
A local sequence number proving that the contract surface is progressing.

source_lineage:
Expected value:
["gal2_api", "gal2_daemon", "contract_v1"]

## Example

Run:

python3 examples/gal2_contract_probe.py

Expected result:

OVERALL_GAL2_CONTRACT_PROBE=PASS

## Positioning

Precision protects the reference. GAL-2 protects the consumer.

Keep your timing stack. Add GAL-2.
