Commit graph

79 commits

Author SHA1 Message Date
twentyOne2x
a7152b0a67 Sync leoclean skills during deploy 2026-07-09 08:01:43 +02:00
twentyOne2x
817d2a4592 Add canonical KB claim links 2026-07-09 07:55:47 +02:00
twentyOne2x
c34096f605 Add KB proposal normalization preview 2026-07-09 03:01:40 +02:00
twentyOne2x
5ec375cd6e Add KB proposal review dashboard 2026-07-09 02:46:14 +02:00
twentyOne2x
1703232f24
Add leoclean KB proposal review packets (#60)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-09 02:24:07 +02:00
twentyOne2x
8e3d1877c6
Source-control leoclean KB bridge (#59)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-09 01:09:53 +02:00
twentyOne2x
4f00f1335d
Avoid scanning backups during auto deploy chmod (#58)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-09 00:19:49 +02:00
twentyOne2x
b9acc4855c
Make GCP artifact publish idempotent (#57)
Some checks failed
CI / lint-and-test (push) Has been cancelled
2026-07-07 14:40:23 +02:00
twentyOne2x
464d1b3fd9
Add GCP infra execute canary runner (#56)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 14:34:11 +02:00
twentyOne2x
8a935b4625
Add portable restore canary capsule (#55)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 14:22:03 +02:00
twentyOne2x
fc451ec94f
Harden GCP readiness checker commands (#54)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 14:10:50 +02:00
twentyOne2x
50a744656f
Use dedicated GCP readiness service account (#53)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 13:58:37 +02:00
twentyOne2x
dba08ad63f
Add GCP service communication contract (#52)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 13:51:24 +02:00
twentyOne2x
c8bb649f95
Add GCP runtime baseline apply runner
Some checks are pending
CI / lint-and-test (push) Waiting to run
Adds a dry-run-by-default GCP runtime baseline runner, readiness contract coverage, docs, and tests for the resources required by GCP readiness.
2026-07-07 13:38:42 +02:00
twentyOne2x
c9a2573e86
Harden GCP artifact and readiness receipts
Some checks are pending
CI / lint-and-test (push) Waiting to run
Retains immutable Artifact Registry image digests and makes GCP readiness workflows fail after uploading evidence when readiness checks fail.
2026-07-07 13:24:14 +02:00
twentyOne2x
38ca357f81
Add Cloud SQL restore readback verifier (#49)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 13:16:24 +02:00
twentyOne2x
607baefc52
Add idempotent GCP IAM apply runner
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 13:05:08 +02:00
twentyOne2x
8f96b44539
Add GCP IAM split plan
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 12:54:53 +02:00
twentyOne2x
04e586c23e
Retain GCP readiness workflow artifacts
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 12:47:29 +02:00
twentyOne2x
6dd7f9fe8c
Add GCP Cloud SQL restore drill (#44)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 12:34:21 +02:00
twentyOne2x
2b4423e3d1
Add SQLite to Postgres restore canary (#43)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-07 12:21:54 +02:00
Fawaz
4de98b29fd
feat(kb): apply-worker — auto-land approved proposals (stage 2 automation) (#36)
Some checks are pending
CI / lint-and-test (push) Waiting to run
* feat(kb): apply-worker to auto-land approved proposals (stage 2 automation)

Event-driven worker that turns a HUMAN-approved kb_stage proposal into canonical
state, so an approval in Telegram surfaces in Leo's identity without Leo applying
its own work.

- Fires only on status='approved' (never pending_review) -> proposer != applier
  holds; the human approval stays the trigger. No auto-approve anywhere.
- Reuses scripts/apply_proposal.py verbatim as the sole apply path (same txn,
  rowcount=1 guard, FK stamp). Connects as the narrow kb_apply role, never
  superuser, never inside the hermes harness.
- Render hook (--render-cmd / KB_APPLY_RENDER_CMD) is inert until the SOUL
  renderer (PR2) is deployed; applying still works, rendered SOUL just lags.
- Ships INERT: report-only unless --enable / KB_APPLY_WORKER_ENABLED=1. systemd
  oneshot service + 5min timer, both shipped disabled.
- 10 unit tests; candidate query validated read-only vs prod (0 applyable today).

* fix(kb): apply-worker --max-per-tick cap + poison-pill retry ceiling

Fixer draft-exit items:
- --max-per-tick=1 (default): an enabled worker lands applies one-at-a-time
  and observably instead of draining the whole approved queue in one tick.
- --max-attempts=3 ceiling with a persisted failure-count state file: a
  deterministically-failing approved proposal is treated as a poison pill and
  skipped after N consecutive failures, instead of retrying every tick forever.
  State persists on disk because the worker runs oneshot per timer tick.

Both are inert until the worker is enabled; it still ships disabled.
2026-07-05 18:23:56 -04:00
Fawaz
7bb6fc417b
feat(kb): apply_proposal engine (stage 2 of KB apply pipeline) (#35)
Some checks are pending
CI / lint-and-test (push) Waiting to run
* feat(kb): apply_proposal engine to land approved proposals into canonical

Stage 2 of the KB apply pipeline (approve -> APPLY -> render -> surface).
Turns an approved kb_stage.kb_proposals row into canonical public.* rows and
flips the ledger to 'applied' in one verified transaction.

- Connects as the narrow kb_apply role (never superuser): writes only
  strategies, strategy_nodes, claim_evidence, claim_edges + kb_proposals ledger.
  Enforces "agents propose, do not self-apply" at the DB boundary.
- Per-type handlers: revise_strategy (versioned strategy + node replace),
  add_edge, attach_evidence (requires existing source_id; source minting is
  intentionally out of scope for kb_apply's grants).
- Strict apply_payload contract (v1); freeform eval packets are normalized
  upstream, not applied directly.
- --dry-run prints exact SQL; idempotent (refuses non-approved / already-applied);
  transactional with an in-txn DO-block invariant check that rolls back on failure.
- Unit tests cover SQL builders, validation, dispatch, and status guards.

* fix(kb): rowcount=1 apply guard + real applied_by FK stamp

Closes the three draft-exit review items on the apply engine:

- Ledger flip now runs in a DO block asserting exactly one 'approved'
  row moved to 'applied' (GET DIAGNOSTICS row_count). Closes the
  concurrent double-apply race — load_proposal (read) and the flip
  (write) are separate statements, so a row lock cannot span them; only
  one concurrent apply can match status='approved', so rowcount=1 is the
  authoritative guard. A loser RAISEs and the whole txn rolls back.
- applied_by_agent_id is stamped as a real FK resolved from public.agents
  by handle, defaulting to the kb-apply service agent — no more NULL FK,
  no backfill needed.
- scripts/kb_apply_prereqs.sql: one-time superuser bootstrap — inserts the
  kb-apply service-agent row (kb_apply never gets INSERT on agents), grants
  kb_apply SELECT on public.agents, and ensures the one-active-strategy
  unique index (idempotent; already present on prod).

18/18 unit tests pass.

* fix(kb): hard-resolve applied_by handle, RAISE on NULL FK

Resolve applied_by into a variable and assert NOT NULL before the ledger
flip, instead of an inline subselect that silently stamps a NULL
applied_by_agent_id on an unresolved handle. Since the FK is ON DELETE SET
NULL, a bad handle (typo/unseeded agent) was a legal silent NULL -- the
perpetually-NULL FK we eliminated. Unresolved handle now hard-fails ->
rollback. Non-default --applied-by (operator, future drafters) is the path
that goes through the lookup and could strand NULL.
2026-07-04 19:57:49 -04:00
twentyOne2x
29e7e27658 add teleo agent autorecovery timer 2026-07-02 23:37:22 +02:00
twentyOne2x
8c6874f8e4 Allow Telegram agents to write transcripts 2026-07-02 23:28:45 +02:00
twentyOne2x
fd6132e6ce
Allow Leo paid research gate by chat title (#32)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-02 01:19:17 +02:00
twentyOne2x
a9a90f0faf Split paid research acknowledgement from answer 2026-07-01 21:35:42 +02:00
twentyOne2x
6114750555 Stop exposing Leo checkout URL buttons by default 2026-07-01 13:05:31 +02:00
twentyOne2x
c6d4376a51 Render Leo x402 checkout as Telegram button card 2026-07-01 01:04:18 +02:00
twentyOne2x
ac64fd4cf4
Tag Leo auto-resume poll requests (#28)
Some checks are pending
CI / lint-and-test (push) Waiting to run
2026-07-01 00:47:36 +02:00
twentyOne2x
56df23aba0 Render Leo paid research as Telegram payment card 2026-07-01 00:26:00 +02:00
twentyOne2x
af41a3d4ca Send Leo checkout QR photo in Telegram 2026-06-30 21:55:20 +02:00
twentyOne2x
85e1f78b97 Auto-resume Leo paid research in Telegram 2026-06-30 20:05:28 +02:00
twentyOne2x
9b7feb4278 Enable quote-first Leo Telegram research 2026-06-30 19:12:12 +02:00
twentyOne2x
a55f0a4500 Avoid starting inactive legacy Leo bot on deploy 2026-06-26 13:40:50 +02:00
twentyOne2x
400b7200ba Use GitHub remote for VPS auto deploy 2026-06-26 01:19:16 +02:00
twentyOne2x
bac4222eeb Restart wallet-test agent after Telegram deploys 2026-06-26 01:07:32 +02:00
twentyOne2x
1a71efcde2
Add Teleo research eval schema
Adds graph schema prerequisite plus research-eval schema/docs/tests for Leo tool-use benchmarks and x402 research telemetry. Validated by full local pytest and green CI.
2026-06-24 14:21:03 +02:00
twentyOne2x
533295d38c
Gate Telegram market context for Leo research (#18) 2026-06-23 19:16:24 +02:00
twentyOne2x
bfc28e084b
Wire Leo Telegram x402 smart research (#17)
* Wire Leo Telegram x402 smart research

* Suppress token-bearing Telegram HTTP logs

* Keep Telegram typing visible during Leo proxy calls

* Allow Leo Telegram social research spend cap

* Route contextual Leo research prompts to smart research

* Generalize Leo smart research intent routing

* Resume Leo smart research from paid work orders
2026-06-23 18:37:33 +02:00
twentyOne2x
30544dce05
Route Telegram smart research commands (#16) 2026-06-23 11:56:06 +02:00
twentyOne2x
b593dda1cf Use existing Leo wallet-test Telegram bot 2026-06-22 21:53:37 +02:00
twentyOne2x
754f5aeee7
Add Leo wallet-test Telegram runtime verifier (#14) 2026-06-22 21:41:17 +02:00
twentyOne2x
595f977a94
Add Telegram smart research gate installer (#13) 2026-06-22 21:33:56 +02:00
twentyOne2x
dba8a21e74
Allow per-agent Telegram env files (#12) 2026-06-22 21:27:32 +02:00
twentyOne2x
d0a4f518d5
Add Leo Telegram smart research bridge (#11) 2026-06-22 21:24:00 +02:00
twentyOne2x
84e1269900 Add safe Telegram agent token installer 2026-06-22 20:47:44 +02:00
twentyOne2x
adbdf4dbba Add Leo wallet test Telegram agent config 2026-06-22 20:29:52 +02:00
twentyOne2x
2e7d4e7450 Add Leo Telegram x402 bridge 2026-06-19 19:27:12 +02:00
twentyOne2x
71ea7a625c Add decision engine replay harness
- Add source-linked model discovery registry for bakeoff candidates
- Add Rio, Theseus, and KB interop fixtures with deterministic replay proof
- Gate CI on replay output; verify with 424-test suite

`.crabbox.yaml`
`.github/workflows/ci.yml`
`docs/llm-refinement-decision-engine.md`
`docs/model-discovery-registry.md`
`fixtures/decision-engine-eval/kb_interop_propose_only.json`
`fixtures/decision-engine-eval/rio_meteora_lp_incentives.json`
`fixtures/decision-engine-eval/theseus_live_model_switch_reject.json`
`scripts/check_llm_refinement_contract.py`
`scripts/replay_decision_engine_eval.py`
`tests/test_decision_engine_replay.py`
2026-06-01 17:37:38 +02:00