fix(compat): a fresh install's first agent stops reporting must-fix findings from Trinity's own starters (#2899) - #2929
Merged
Conversation
…indings from Trinity's own starters (#2899) `T-004`/`T-005` failed an ABSENT `resources` block, so every agent created from `scout`/`sage`/`scribe` — the three templates a fresh install seeds as the `acme-*` fleet — opened its Overview tab with a red "2 must-fix" banner. Absence is the supported shape: the agent inherits the admin's fleet-wide default (RES-001), and a template-level block would override both that default and the values a manifest or API caller asked for (`crud._resolve_local_template`). #1908 parked this as a product decision behind a two-check waiver; the decision is INHERIT. * T-004/T-005 pass on an absent/null/empty declaration, naming the default in the message. A declared value is validated by the create path's own `normalize_cpu`/`normalize_memory`, so the check accepts exactly what creation accepts (`4G`, unquoted `cpu: 2`) and rejects exactly what it rejects — T-005's old regex passed `512m`, which `normalize_memory` 400s. Values are `_clip`ped before they reach a message: `template.yaml` is agent-writable. * A non-mapping `resources:` fails T-004 and skips T-005 — one malformed block, one finding. The create path raises AttributeError on it, unguarded. * `_KNOWN_FAILING_CHECKS` is now EMPTY, so the #1908 guard holds every visible bundled template to every HARD static check with nothing exempt. * The generic `PUT /api/settings/{key}` refuses `agent_default_cpu`/ `agent_default_memory`. The dedicated route validates them; unvalidated, a junk default 400s every creation that relies on it. * `X-004` exempts the platform-injected `trinity` server in the template.yaml-only direction; a template shipping its own `trinity` block is still reported. * The panel headline counts must-fix only: "N must-fix compatibility issues" (danger), "No must-fix issues · N recommendations" (neutral — the API still calls that state `issues`, and soft covers S-006/S-008), "Compatible" only at zero. Skipped AI checks collapse to one line per reason; with no Anthropic key that was 30 rows of 89 burying the real findings. Dead `infoCount`/`failing` computeds removed. Docs: validation spec (incl. X-004's type column, which said AI for a STATIC check), agent guide's "resources (required)", requirements §4.1.1, feature flow. Out of scope, filed: #2903 (canary `512m`), #2904 (MCP names declared in three places), Abilityai/cornelius#9 (that template's own findings). Fixes #2899 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
acme-*agent. The two must-fix findings wereT-004/T-005complaining thatscout/sage/scribedeclare noresources:— which is the supported shape: the agent inherits the admin's fleet-wide default (RES-001), and a template-level block would override both that default and the valuesdefault-system.yamlasks for. bug(templates): sage/scout/scribe ship no .gitignore — every agent created from them is born with 4 hard security findings #1908 parked this behind a two-check waiver as a product decision; the decision is inherit, so the checks are re-graded and the waiver is gone.Changes
compatibility/static_checks.py—T-004/T-005pass on an absent/null/empty declaration (message names the default). A declared value is validated by the create path's ownnormalize_cpu/normalize_memory, so the check accepts exactly what creation accepts (4G, unquotedcpu: 2) and rejects exactly what it rejects — the oldT-005regex passed512m, whichnormalize_memory400s. Values are_clipped before reaching a message (template.yamlis agent-writable). A non-mappingresources:failsT-004and skipsT-005: one malformed block, one finding.X-004exempts the platform-injectedtrinityserver in the template.yaml-only direction.tests/unit/test_1908_bundled_template_gitignore.py—_KNOWN_FAILING_CHECKSis now EMPTY, so the existing guard holds every visible bundled template to every HARD static check with nothing exempt. This is the CI gate the issue's AC fix: add missing logging_config.py to backend Dockerfile #4 asks for; it existed already and only these two ids were waived.routers/settings/generic.py— the catch-all refusesagent_default_cpu/agent_default_memory(422 → the dedicated validated route). Unvalidated, a junk default 400s every creation that relies on it.CompatibilityPanel.vue— headline counts must-fix only: "N must-fix compatibility issues" (danger) · "No must-fix issues · N recommendations" (neutral) · "Compatible" only at zero. Neutral rather than success on the advisory arm: the API still calls that stateissues, and soft coversS-006/S-008. Skipped AI checks collapse to one line per reason. DeadinfoCount/failingcomputeds removed. Raw-colour counts unchanged (35), so no baseline re-freeze.X-004's type column, which said AI for a STATIC check), the agent guide's "Resource limits (required)", requirements §4.1.1, feature flow.Test Plan
pytest tests/unit/test_compatibility_checks.py— 143 pass, incl. a table asserting eachresourcesrow against the create path's own verdict, and a clipped-message checkpytest tests/unit/test_1908_bundled_template_gitignore.py— 94 pass with the waiver removedpytest tests/unit/test_2899_resource_defaults_blocklist.py— new guard on the catch-allnpm run test:unit— 3153 pass, incl. the new mountedcompatibilityPanel.spec.js(7)acme-scout/sage/scribeeachhard=2 soft=1 info=5. After:hard=0,T-004/T-005pass with "resources.cpu is not declared — the platform default applies"; banner reads "No must-fix issues · 1 recommendation"; the 30 AI rows are one line.corneliusX-004now names only the realplaywrightgap, nottrinity. Light and dark both checked.Notes
512m/3g/64gfrom pass into must-fix — correct, since creation rejects them.slowagent pins512m, so it cannot be created), refactor(templates): MCP server names are declared in up to three places and drift — derive them from .mcp.json.template #2904 (MCP server names declared in three places), Seeded Cornelius shows 5 advisory compatibility findings on a fresh Trinity install cornelius#9 (that repo's own findings).Fixes #2899
🤖 Generated with Claude Code