Commit Graph
13 Commits
Author SHA1 Message Date
dev_agentandClaude Opus 5.5 6a7c040657 Build the run's provider from the key it redacts; record render failures
CI / ci (pull_request) Successful in 1m33s
CI / ci (push) Successful in 1m33s
Review findings on b0cf6fb:

1. Config took a ready-made Provider and a separate, optional APIKey used
   only for redaction, so a provider holding a decrypted key could run
   with APIKey empty and a reply quoting that key unlabelled was stored.
   Config now holds the household's llm.Settings, the decrypted APIKey and
   a NewProvider constructor (presets.FromSettings in production). Run
   builds the provider from exactly that key and redacts the same key, so
   the two cannot differ. ProviderName, Model and Temperature come from
   Settings. A new test runs presets.FromSettings against a server that
   echoes the bearer key unlabelled in the reply text, reply JSON and
   model name, across a repair turn, and asserts the stored row never
   holds it; with redaction disabled the test fails.

2. A render failure wrote no ai_runs row. Every run with a valid Config
   now writes one: a render failure is bad_output and a provider that
   cannot be built is provider_error, each with the error text and empty
   request and response lists. TestRunRenderError now expects exactly one
   such row. A Config error (no store, provider name or model) still
   writes none, since the row cannot be written without them.

Redaction rules, the four statuses for provider-reaching runs (one row,
both turns) and Purge are unchanged.

Maestro task 53e382d8-1db3-4555-a31d-e44cf55cc98d.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 09:43:24 -04:00
dev_agentandClaude Opus 5.5 b0cf6fb951 Record every harness run in ai_runs with redaction and purge
CI / ci (push) Successful in 1m35s
CI / ci (pull_request) Successful in 1m32s
harness.Run now writes one ai_runs row per run that reaches the provider,
covering the repair turn: skill, version, provider, model, temperature,
status (ok, repaired, bad_output, provider_error), latency, summed token
counts when reported, error text and the per-turn request and response
bodies. Every stored string is redacted first: the decrypted API key,
Authorization and API-key header values, Google Chat webhook URLs and
URLs with key-like query or fragment parameters or user info. JSON is
decoded and its strings redacted, so escapes cannot hide a credential.
A row that cannot be written fails the run.

Purge deletes rows created before a cutoff (RunRetention is 30 days),
clearing suggestion_batches and week_plans references in the same
transaction.

Migration 0006 rebuilds ai_runs with the new status CHECK and a
created_at index; a pre-harness running or error row stops it.

Maestro task 53e382d8-1db3-4555-a31d-e44cf55cc98d.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 09:32:20 -04:00
dev_agent 5d5404b3cb Name normalization and dedupe (#59)
CI / ci (push) Successful in 1m32s
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-05 09:16:16 -04:00
dev_agent 6ff6443db7 Household context builder with token budget (#57)
CI / ci (push) Successful in 1m34s
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-05 08:34:44 -04:00
dev_agent 942ac42b86 Layered prompt rendering from embedded templates (#55)
CI / ci (push) Successful in 1m33s
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-05 08:15:35 -04:00
dev_agent 55c15b1b3a Skill harness interface and repair retry (#53)
CI / ci (push) Successful in 1m31s
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-05 07:55:34 -04:00
dev_agent b347e1c911 Retry, backoff and default Generate timeout (#48)
CI / ci (push) Successful in 1m28s
CI / ci (pull_request) Successful in 1m30s
Independent review Codex gpt-6-sol high: APPROVED (0 findings)
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
Co-committed-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-04 11:02:55 -04:00
dev_agent e105cdb9c5 Add xAI Grok as a provider (#46)
CI / ci (push) Successful in 1m28s
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
Co-committed-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-04 09:36:10 -04:00
dev_agent 9ace3aba9f Provider presets and factory (#44)
CI / ci (push) Successful in 1m28s
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
Co-committed-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-04 09:18:34 -04:00
dev_agent 32ab0c0b6d Ollama native adapter (#41)
CI / ci (push) Successful in 1m29s
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
Co-committed-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-04 08:47:05 -04:00
dev_agent 15886f2c55 Anthropic Messages adapter (#40)
CI / ci (push) Successful in 1m27s
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
Co-committed-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-04 08:09:20 -04:00
dev_agent acd29c8221 Feature 08 task 2: OpenAI-compatible adapter (#35)
CI / ci (push) Successful in 1m28s
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
Co-committed-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-04 07:41:45 -04:00
dev_agent 72042516e2 Feature 08 task 1: Provider interface, typed errors and Fake provider (#33)
CI / ci (push) Successful in 1m29s
Co-authored-by: dev_agent <dev_agent@cubecraftlabs.com>
Co-committed-by: dev_agent <dev_agent@cubecraftlabs.com>
2026-10-03 16:14:12 -04:00