Add typed workflow template contracts#72
Open
andrei-hasna wants to merge 8 commits into
Open
Conversation
… claim Vendor the @hasna/contracts 0.4.0 storage kit into src/generated/storage-kit (pool/query/tls/mode/migrations/health) and build the Postgres run-claim correctness core on top of it: - PgPoolExecutor adapts the vendored pg.Pool client to PostgresQueryExecutor so PostgresStorage.migrate() runs against live cloud Postgres. - claimNextRun/heartbeatRunLease use SELECT ... FOR UPDATE SKIP LOCKED so concurrent loops-runner processes never double-claim a queued run. - Two-connection concurrency test (skips unless LOOPS_TEST_DATABASE_URL set) verifies exactly-once claiming across two pooled connections. - Promote pg to a direct dependency; add @types/pg dev dependency. - docs/CUTOVER-RUNBOOK.md documents remaining store wiring + enable steps. PURE REMOTE (Amendment A1): kit builds a pool only in cloud mode; no hybrid/sync path. Daemon stays on local sqlite until the full LoopStorageContract impl + async consumer wiring land (tracked in runbook).
…health+/ready+/version, OpenAPI-generated SDK
- loops-serve bin: RDS-direct (A1) Postgres storage + @hasna/contracts verifyApiKey auth
- api: public /health,/ready,/version ({status,version,mode}) + /openapi.json; /v1 gated
- SDK: typed LoopsClient generated from openapi/loops.json (@hasna/loops/sdk/http)
…tract.json, migrations mirror - Dockerfile bakes Amazon RDS global CA + NODE_EXTRA_CA_CERTS for verify-full TLS - hasna.contract.json service manifest (validated against @hasna/contracts v1 schema) - migrations/*.sql generated mirror of postgres-schema.ts; runner = loops-serve migrate
…generated client)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
Review