feat: Ration phase 1 — full polyglot build for Airwallex Starter Kit 5
Six services, independently built then integrated:
- services/wal (C): crash-safe write-ahead log, CRC32-checksummed
frames, torn-write recovery via truncate-to-last-valid-frame.
- services/ledger-core (Rust): double-entry ledger over the C WAL via
FFI, reserve-floor enforcement BEFORE any WAL write, idempotent
ApplyEntry, full LedgerCore gRPC service.
- services/gateway (Go): Airwallex Issuing/Global-Accounts client
(mock mode default, live mode ready), the actual rationing math
(reserve floor, 60% bridge cap, 24h velocity cap, partial-over-decline).
- services/agent (Go): deterministic hard-rule policy envelope computed
BEFORE any LLM call; Claude only decides within that pre-approved
envelope; every decision audit-logged even when the LLM call fails.
- services/tui (Go, Bubble Tea) + services/cli (Go, cobra): the only
UI — no web frontend, per explicit direction.
Integration found and fixed three real bugs, not just compile errors:
- proto regen collision shadowing checked-in pkg/pb packages
- ledger-core/gateway address-variable mismatch (stack would never
actually connect on default config)
- the big one: MarkDepositReceived never credited the ledger, so every
tenant's balance was permanently stuck at 0 and bridge-funding could
only ever decline — the core agentic-rationing feature could never
produce a real grant. Fixed at the ledger level with idempotent
mark-and-credit in one WAL frame, covered by 3 new tests.
End-to-end verified live, reproducibly: seed -> simulate a late deposit
-> agent grants a partial bridge with a computed rationale -> second
grant correctly declines once the 24h velocity cap engages. Verified
independently by the orchestrator too: 'make build' and 'make test'
both clean (Rust: 29 tests; Go: all packages; C: WAL test suite).
Airwallex sandbox credentials still pending organizer approval —
tracked as an owner blocker in docs/AIRWALLEX-SETUP.md, not a code gap.
2026-10-19 03:04:13 +03:00
|
|
|
module github.com/caelum0x/ration/pkg
|
|
|
|
|
|
|
|
|
|
go 1.24
|
|
|
|
|
|
|
|
|
|
require (
|
2026-10-19 12:25:41 +03:00
|
|
|
github.com/google/uuid v1.6.0
|
|
|
|
|
github.com/prometheus/client_golang v1.20.5
|
|
|
|
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0
|
|
|
|
|
go.opentelemetry.io/otel v1.33.0
|
|
|
|
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0
|
|
|
|
|
go.opentelemetry.io/otel/sdk v1.33.0
|
|
|
|
|
go.opentelemetry.io/otel/trace v1.33.0
|
feat: Ration phase 1 — full polyglot build for Airwallex Starter Kit 5
Six services, independently built then integrated:
- services/wal (C): crash-safe write-ahead log, CRC32-checksummed
frames, torn-write recovery via truncate-to-last-valid-frame.
- services/ledger-core (Rust): double-entry ledger over the C WAL via
FFI, reserve-floor enforcement BEFORE any WAL write, idempotent
ApplyEntry, full LedgerCore gRPC service.
- services/gateway (Go): Airwallex Issuing/Global-Accounts client
(mock mode default, live mode ready), the actual rationing math
(reserve floor, 60% bridge cap, 24h velocity cap, partial-over-decline).
- services/agent (Go): deterministic hard-rule policy envelope computed
BEFORE any LLM call; Claude only decides within that pre-approved
envelope; every decision audit-logged even when the LLM call fails.
- services/tui (Go, Bubble Tea) + services/cli (Go, cobra): the only
UI — no web frontend, per explicit direction.
Integration found and fixed three real bugs, not just compile errors:
- proto regen collision shadowing checked-in pkg/pb packages
- ledger-core/gateway address-variable mismatch (stack would never
actually connect on default config)
- the big one: MarkDepositReceived never credited the ledger, so every
tenant's balance was permanently stuck at 0 and bridge-funding could
only ever decline — the core agentic-rationing feature could never
produce a real grant. Fixed at the ledger level with idempotent
mark-and-credit in one WAL frame, covered by 3 new tests.
End-to-end verified live, reproducibly: seed -> simulate a late deposit
-> agent grants a partial bridge with a computed rationale -> second
grant correctly declines once the 24h velocity cap engages. Verified
independently by the orchestrator too: 'make build' and 'make test'
both clean (Rust: 29 tests; Go: all packages; C: WAL test suite).
Airwallex sandbox credentials still pending organizer approval —
tracked as an owner blocker in docs/AIRWALLEX-SETUP.md, not a code gap.
2026-10-19 03:04:13 +03:00
|
|
|
google.golang.org/grpc v1.69.4
|
|
|
|
|
google.golang.org/protobuf v1.36.12
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
require (
|
2026-10-19 12:25:41 +03:00
|
|
|
github.com/beorn7/perks v1.0.1 // indirect
|
|
|
|
|
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
|
|
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
|
|
|
github.com/go-logr/logr v1.4.2 // indirect
|
|
|
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
|
|
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect
|
|
|
|
|
github.com/klauspost/compress v1.17.9 // indirect
|
|
|
|
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
|
|
|
|
github.com/prometheus/client_model v0.6.1 // indirect
|
|
|
|
|
github.com/prometheus/common v0.55.0 // indirect
|
|
|
|
|
github.com/prometheus/procfs v0.15.1 // indirect
|
|
|
|
|
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
|
|
|
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect
|
|
|
|
|
go.opentelemetry.io/otel/metric v1.33.0 // indirect
|
|
|
|
|
go.opentelemetry.io/proto/otlp v1.4.0 // indirect
|
feat: Ration phase 1 — full polyglot build for Airwallex Starter Kit 5
Six services, independently built then integrated:
- services/wal (C): crash-safe write-ahead log, CRC32-checksummed
frames, torn-write recovery via truncate-to-last-valid-frame.
- services/ledger-core (Rust): double-entry ledger over the C WAL via
FFI, reserve-floor enforcement BEFORE any WAL write, idempotent
ApplyEntry, full LedgerCore gRPC service.
- services/gateway (Go): Airwallex Issuing/Global-Accounts client
(mock mode default, live mode ready), the actual rationing math
(reserve floor, 60% bridge cap, 24h velocity cap, partial-over-decline).
- services/agent (Go): deterministic hard-rule policy envelope computed
BEFORE any LLM call; Claude only decides within that pre-approved
envelope; every decision audit-logged even when the LLM call fails.
- services/tui (Go, Bubble Tea) + services/cli (Go, cobra): the only
UI — no web frontend, per explicit direction.
Integration found and fixed three real bugs, not just compile errors:
- proto regen collision shadowing checked-in pkg/pb packages
- ledger-core/gateway address-variable mismatch (stack would never
actually connect on default config)
- the big one: MarkDepositReceived never credited the ledger, so every
tenant's balance was permanently stuck at 0 and bridge-funding could
only ever decline — the core agentic-rationing feature could never
produce a real grant. Fixed at the ledger level with idempotent
mark-and-credit in one WAL frame, covered by 3 new tests.
End-to-end verified live, reproducibly: seed -> simulate a late deposit
-> agent grants a partial bridge with a computed rationale -> second
grant correctly declines once the 24h velocity cap engages. Verified
independently by the orchestrator too: 'make build' and 'make test'
both clean (Rust: 29 tests; Go: all packages; C: WAL test suite).
Airwallex sandbox credentials still pending organizer approval —
tracked as an owner blocker in docs/AIRWALLEX-SETUP.md, not a code gap.
2026-10-19 03:04:13 +03:00
|
|
|
golang.org/x/net v0.33.0 // indirect
|
|
|
|
|
golang.org/x/sys v0.28.0 // indirect
|
|
|
|
|
golang.org/x/text v0.21.0 // indirect
|
2026-10-19 12:25:41 +03:00
|
|
|
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
|
feat: Ration phase 1 — full polyglot build for Airwallex Starter Kit 5
Six services, independently built then integrated:
- services/wal (C): crash-safe write-ahead log, CRC32-checksummed
frames, torn-write recovery via truncate-to-last-valid-frame.
- services/ledger-core (Rust): double-entry ledger over the C WAL via
FFI, reserve-floor enforcement BEFORE any WAL write, idempotent
ApplyEntry, full LedgerCore gRPC service.
- services/gateway (Go): Airwallex Issuing/Global-Accounts client
(mock mode default, live mode ready), the actual rationing math
(reserve floor, 60% bridge cap, 24h velocity cap, partial-over-decline).
- services/agent (Go): deterministic hard-rule policy envelope computed
BEFORE any LLM call; Claude only decides within that pre-approved
envelope; every decision audit-logged even when the LLM call fails.
- services/tui (Go, Bubble Tea) + services/cli (Go, cobra): the only
UI — no web frontend, per explicit direction.
Integration found and fixed three real bugs, not just compile errors:
- proto regen collision shadowing checked-in pkg/pb packages
- ledger-core/gateway address-variable mismatch (stack would never
actually connect on default config)
- the big one: MarkDepositReceived never credited the ledger, so every
tenant's balance was permanently stuck at 0 and bridge-funding could
only ever decline — the core agentic-rationing feature could never
produce a real grant. Fixed at the ledger level with idempotent
mark-and-credit in one WAL frame, covered by 3 new tests.
End-to-end verified live, reproducibly: seed -> simulate a late deposit
-> agent grants a partial bridge with a computed rationale -> second
grant correctly declines once the 24h velocity cap engages. Verified
independently by the orchestrator too: 'make build' and 'make test'
both clean (Rust: 29 tests; Go: all packages; C: WAL test suite).
Airwallex sandbox credentials still pending organizer approval —
tracked as an owner blocker in docs/AIRWALLEX-SETUP.md, not a code gap.
2026-10-19 03:04:13 +03:00
|
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20241223144023-3abc09e42ca8 // indirect
|
|
|
|
|
)
|