Commit graph

4560 commits

Author SHA1 Message Date
Bryan Helmkamp
580ee156b2
Merge pull request #594 from fabro-sh/preserve-provider-costs
Preserve provider-reported workflow costs
2026-07-23 08:10:18 -04:00
Bryan Helmkamp
08cef66ec8
Saturate billing cost accumulation 2026-07-23 07:53:01 -04:00
Bryan Helmkamp
5b0cfd4050
Tighten parallel branch projection tests
Assert ParallelBranchStarted seeds started_at (the live-timer half of
the fix) and cover the failed-status fold to a Failed terminal state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 07:37:34 -04:00
Bryan Helmkamp
4d2712b8db
Consolidate provider-reported cost handling into fabro-model
Replace the billed_model_usage_from_llm_with_cost wrapper with a
with_reported_cost method on BilledModelUsage and BilledTokenCounts, and
centralize the optional-cost fold as UsdMicros::accumulate so fabro-agent
and fabro-workflow share one implementation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 07:21:17 -04:00
Bryan Helmkamp
7f25689fb6
Preserve provider-reported workflow costs 2026-07-23 07:08:04 -04:00
Bryan Helmkamp
f8ed856959
Add regression test for authoritative provider billing 2026-07-23 06:59:48 -04:00
Bryan Helmkamp
f00a2ed1ea
Merge pull request #593 from fabro-sh/codex/openrouter-gpt56-claude-catalog
Add current GPT and Claude models to OpenRouter catalog
2026-07-23 06:57:38 -04:00
Bryan Helmkamp
e6c92aeb27
Add current GPT and Claude models to OpenRouter catalog 2026-07-23 06:50:26 -04:00
fabro-releases[bot]
e9a571da2e Bump version to 0.303.0-nightly.2 2026-07-23 10:06:14 +00:00
Bryan Helmkamp
b505833ccd
Update implement-plan workflow models 2026-07-22 22:51:35 -04:00
fabro-releases[bot]
d9282e66f9 Bump version to 0.303.0-nightly.1 2026-07-23 01:49:45 +00:00
Bryan Helmkamp
b39e3767a3
Fix legacy token billing projection 2026-07-22 21:37:13 -04:00
fabro-releases[bot]
3c4ed41d57 Bump version to 0.303.0-nightly.0 2026-07-23 00:17:24 +00:00
Bryan Helmkamp
b765940f8c
Track implement-plan simplify prompt 2026-07-22 19:50:31 -04:00
Bryan Helmkamp
d629816c3b
Merge pull request #589 from fabro-sh/codex/glm-5-2-support
Add GLM 5.2 direct and OpenRouter support
2026-07-22 19:47:21 -04:00
Bryan Helmkamp
3fd4b44d6e
Rename reasoning stream snapshot 2026-07-22 19:29:16 -04:00
Bryan Helmkamp
c8d175e3a5
Merge pull request #590 from fabro-sh/feat/poolside-laguna-provider
Some checks are pending
Rust / Format (push) Waiting to run
Rust / Clippy (push) Waiting to run
Rust / Generated Docs (push) Waiting to run
Rust / Test (Linux) (push) Waiting to run
Rust / Test (macOS) (push) Waiting to run
feat(llm): add Poolside Laguna models
2026-07-22 19:15:07 -04:00
Bryan Helmkamp
911f26f8e5
Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Bryan Helmkamp <19+brynary@users.noreply.github.com>
2026-07-22 19:14:54 -04:00
Bryan Helmkamp
8f47275d84
feat(llm): add Poolside Laguna models
Add Poolside as a built-in OpenAI-compatible provider and expose Laguna S 2.1 and XS 2.1 both directly and through OpenRouter. Include vault/env credential registration, secret redaction, live coverage, catalog tests, and user documentation.
2026-07-22 18:49:16 -04:00
Bryan Helmkamp
8a243085d0
Merge remote-tracking branch 'origin/main' into codex/glm-5-2-support
# Conflicts:
#	lib/crates/fabro-llm/tests/integration.rs
#	lib/crates/fabro-model/src/catalog.rs
2026-07-22 18:37:15 -04:00
Bryan Helmkamp
04f55666f9
Merge pull request #588 from fabro-sh/codex/openrouter-kimi-k3
Add Kimi K3 via OpenRouter
2026-07-22 18:29:47 -04:00
Bryan Helmkamp
1511c84f48
Test GLM 5.2 through Z.AI 2026-07-22 17:26:37 -04:00
Bryan Helmkamp
d8613fa052
Merge pull request #568 from thewoolleyman/push-credential-refresh-ahead
feat(workflow): keep push credentials fresh across long ACP turns
2026-07-22 17:20:40 -04:00
Bryan Helmkamp
c67cfef141
Add GLM 5.2 model support 2026-07-22 17:19:16 -04:00
Bryan Helmkamp
129c893c86
Add Kimi K3 via OpenRouter 2026-07-22 16:59:25 -04:00
Bryan Helmkamp
03b1b790d1
Merge pull request #587 from fabro-sh/codex/kimi-k3-openai-compat
Add Kimi K3 support and fix OpenAI-compatible tools
2026-07-22 16:45:46 -04:00
Bryan Helmkamp
5d345cf393
Fix OpenAI-compatible parity fixture 2026-07-22 16:37:32 -04:00
Bryan Helmkamp
ca11cac25d
Add Kimi K3 catalog support 2026-07-22 16:23:40 -04:00
Bryan Helmkamp
a96f90bbd8
Fix OpenAI-compatible agent tools 2026-07-22 15:31:17 -04:00
Bryan Helmkamp
25f1f64aee
Merge pull request #586 from fabro-sh/fix/repo-init-default-environment
Let repo init use the target server default environment
2026-07-22 14:51:24 -04:00
Bryan Helmkamp
49c30aa4a6
Let repo init use the server default environment 2026-07-22 14:44:43 -04:00
Scott Werner
8e8aef854c
Merge pull request #572 from fabro-sh/sqlite-runs-read-model
Add SQLite runs read model
2026-07-22 14:03:04 -04:00
Bryan Helmkamp
2843b33d92 Simplify runs read model: single-source mappings, leaner queries
Consolidate duplicated logic from the SQLite runs read model review:

- Derive the status sort CASE and board-column filter from a new
  RunStatusKind::board_rank(), replacing three hand-maintained copies
  of the status/column mapping; add a test upserting every status
  variant so the migration CHECK can't silently drift
- Share RunSize bucket thresholds between from_total_usd_micros and
  the generated size-sort CASE via RunSize::BUCKET_MAX_USD_MICROS
- Resolve run selectors from a lean identity query instead of
  decoding every stored summary per request
- Delete the RunsSortKey/RunsSortDirection adapter enums; the store
  sort enums now carry the wire serde names
- Consolidate the workflow display-name fallback chain into
  WorkflowRef::display_name() (store, CLI, run lookup)
- Share pagination clamping and the paginated list envelope across
  handlers
- Reconcile now skips rows whose source seq is unchanged and
  batch-deletes stale rows; drop the two indexes no query can use
- Hold the summary store OnceLock cell in RunDatabaseInner instead of
  a snapshot so late attachment reaches already-open writers
- Misc: expect() on COUNT(*) sign, %err logging, shared wall-time
  helper, shared SQLite test fixture, dead billing fallback removed

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 13:55:22 -04:00
Bryan Helmkamp
22844300af Add SQLite runs read model 2026-07-22 13:55:22 -04:00
Scott Werner
a71bd1ad33
Merge pull request #573 from fabro-sh/sqlite-storage-migration
Migrate secrets and automations storage to SQLite
2026-07-22 13:53:44 -04:00
Bryan Helmkamp
736e302636 Add internal parallelization strategy doc
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 13:37:31 -04:00
Bryan Helmkamp
6ec4c9a13d Simplify SQLite stores after review pass
Consolidate the legacy-import helpers (backup path naming, RFC 3339
timestamp parsing, import report) into fabro-db and reuse them from the
vault, automation, variable, and environment stores. Add
SecretStore::open_snapshot to collapse the repeated
open/snapshot/into_vault chain. Let automation trigger canonicalization
live solely in normalize_replace, replace its redundant second full
validation with a targeted manual-id collision check, single-source the
automation SELECT projection, and gate list_automation_runs on a
lightweight existence query.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 13:37:31 -04:00
Bryan Helmkamp
c12264c16d Migrate automations to SQLite 2026-07-22 13:32:35 -04:00
Scott Werner
7792883440
Merge pull request #571 from fabro-sh/move-secrets-mcp-servers-sqlite
Move secrets and MCP server storage to SQLite
2026-07-22 13:29:26 -04:00
Bryan Helmkamp
431399826d Simplify SQLite stores after review
- Delete the dead test-only Vault-based env-secrets migration and point
  the startup migration tests at the production migrate_to_store path
  over a real SQLite-backed SecretStore
- Extract shared legacy-import helpers (timestamped backup rename,
  is_toml_file) into fabro_db::legacy and parse_rfc3339_utc into
  fabro-db, replacing four per-crate copies
- Take one secrets snapshot in migrate_to_store instead of per-name
  queries
- Share one bind order between the MCP store INSERT and UPDATE
  statements
- Return SecretEntry directly from entry_from_row
- Unify the environment/MCP store blocking loaders into a generic
  load_store_blocking helper

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 13:11:10 -04:00
Bryan Helmkamp
ec3933d5de Move MCP servers to SQLite storage 2026-07-22 13:10:01 -04:00
Scott Werner
3f1eed4d3a
Merge pull request #570 from fabro-sh/secrets-sqlite
Migrate secrets storage to SQLite
2026-07-22 13:09:11 -04:00
Scott Werner
a2c2781a6e Declare a removal deadline on the legacy secrets JSON import
The automations legacy import declares REMOVAL_DEADLINE per
docs/internal/migrations-strategy.md; the secrets JSON import predates it
and never did. Add the same constant and log field so the temporary
migration's lifespan is visible in code and in startup logs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 12:47:37 -04:00
Bryan Helmkamp
f2cbc016ee Clean up SQLite secrets migration and fix CLI env credential regression
Review pass over the secrets-to-SQLite migration:

- Add SecretStore::open() consolidating the connect/migrate/import-legacy
  sequence repeated at five call sites; fabro-agent and fabro-cli drop
  their fabro-db dependency
- Restore process-env LLM credential lookup in the standalone CLI/agent
  sources via SqlVaultCredentialSource::new (regression: vault_only
  dropped the env fallback that VaultCredentialSource::new provided)
- Fix five install tests that still asserted against the legacy
  secrets.json, which the importer renames to .bak
- Make AppStateConfig.preloaded_vault required, deleting the fallback
  that re-read the already-renamed legacy file; drop the now-unused
  vault_path field and demote load_startup_vault to test-only
- Skip the snapshot clones and CAS retry in resolve() when the vault
  holds no OAuth secrets (per-request hot path)
- Remove dead persist_with_secret_store, the VaultSecretWrite alias,
  the secret_type_string one-liner (now SecretType::as_str), the
  impossible RowCountOverflow error, and duplicated row parsing
- Run check_crypto concurrently with the other diagnostics checks

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 12:45:38 -04:00
Bryan Helmkamp
6860852c9c Simplify SQLite secret storage 2026-07-22 12:45:38 -04:00
Bryan Helmkamp
d325a2c1e6 Migrate secrets storage to SQLite 2026-07-22 12:44:20 -04:00
Scott Werner
70370fdaba
Merge pull request #585 from fabro-sh/db-premigration-snapshot
Snapshot fabro.sqlite3 before applying new migrations
2026-07-22 12:38:30 -04:00
Bryan Helmkamp
ec6292827e
Bump version to 0.302.0-nightly.1 2026-07-22 12:29:40 -04:00
Scott Werner
f97ac8df3c Simplify pre-migration snapshot internals
- Detect applied migrations via sqlx's Migrate trait
  (ensure_migrations_table + list_applied_migrations) instead of
  hand-querying the _sqlx_migrations bookkeeping table, so the check
  cannot drift from what Migrator::run actually applies.
- Write the snapshot to a staging file and rename it into place, so a
  failure mid-copy never leaves a partial file at the snapshot path.
- Derive the database path from the pool's connect options instead of
  storing a duplicate copy on Database.
- Drop the invented "fabro.sqlite3" fallback filename from
  pre_migration_snapshot_path; append the suffix to the path directly.
- Deduplicate the snapshot-inspection blocks in the test behind small
  connect_read_only/table_exists helpers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 12:08:25 -04:00
Bryan Helmkamp
4062e87486
ci: harden Rust dependency and identity checks 2026-07-22 10:56:47 -04:00