Repository navigation
feat: Foundry AI-infrastructure audit for Free AI + Knowledge Base - #41
Merged
Merged
Conversation
Extends FLEET_HEALTH_CONTRACTS for free-ai and knowledge-base with the ai-infrastructure-toolbox-automation contract: auth-safe probes, protected fail-closed probe, freshness model, provider cost/degradation evidence (Free AI), background-job lifecycle, storage ownership + reconstruction paths, and maintenance-only authority. Adds `pnpm fleet:ai-infra-audit` (scripts/fleet-ai-infra-audit.mjs + scripts/lib/fleet-ai-infra-audit.mjs) which runs the declared auth-safe probes live and emits a sanitized JSON + Markdown Foundry snapshot. The snapshot contains only route status, latency, provider class, quota/degradation flags, daily budget utilization, storage ownership, and recovery owner — no prompts, completions, retrieved chunks, corpus text, authorization headers, or credential-shaped strings (redacted in defense in depth). Adds 12 unit tests covering contract validation, privacy redaction, provider degradation vs outage classification, neuron budget utilization, corpus freshness (on-demand model), snapshot building, and Markdown rendering. Verified: pnpm test (373/373), pnpm typecheck, live audit (15/15 probes pass against production, no provider tokens spent). Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
7 tasks done
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
FLEET_HEALTH_CONTRACTSforfree-aiandknowledge-basewith theai-infrastructure-toolbox-automationcontract: auth-safe probes, protected fail-closed probe, freshness model, provider cost/degradation evidence (Free AI), background-job lifecycle, storage ownership + reconstruction paths, and maintenance-only authority.pnpm fleet:ai-infra-audit(scripts/fleet-ai-infra-audit.mjs+scripts/lib/fleet-ai-infra-audit.mjs) which runs the declared auth-safe probes live and emits a sanitized JSON + Markdown Foundry snapshot to.symphony/fleet-ai-infra-audit/.Privacy contract
The snapshot contains only: route name, HTTP status, latency, provider class, quota/degradation flags, daily budget utilization, storage ownership, and recovery owner. It contains no prompts, completions, retrieved chunks, corpus text, authorization headers, or credential-shaped strings (redacted in defense in depth). No provider tokens are spent and no private corpus queries are issued by any declared probe.
Why
This is the Foundry half of the OpenSpec
automate-ai-infrastructure-toolboxchange. It wires the per-service inventories (free-ai PR #22, knowledge-base PR #12) into a reusable, sanitized coverage audit that Foundry can run on a cadence without spending money or leaking private data.What is NOT in this PR
Test plan
pnpm test— 373/373 pass (12 new tests)pnpm typecheck— 14/14 tasks passpnpm lint— 0 errors (53 pre-existing warnings)pnpm fleet:ai-infra-audit -- --no-live— contract-only snapshot, contract OKpnpm fleet:ai-infra-audit— live: 15/15 probes pass (10 free-ai + 5 knowledge-base), no provider tokens spent, provider availability correctly classified asdegraded(5 available / 64 degraded / 23 exhausted — partial degradation, not outage)Generated with Devin