CedarCopilot wants to merge 2 commits into staging from fix/sync-agent-description-column
Live on prod, 1 of 6 behaviors degraded
Strict CloudWatch fallback found 537 prod failure log lines for [UpdateExternalCrmWorkflow] Driver update failed (Step updateOpportunityField failed: HTTP 401: [{\) in the last 24h while checking update, backfill-agent-description-column.test, backfill-agent-description-column.
Since the deploy, there are 0 OTEL spans matching authorSubagentDoc, writeDocumentGuarded, writeResourceGuarded, or admin.subagent.author, and 0 concrete CloudWatch executions/successes/errors for that surface. The only related-looking span was 1 execute_tool run-subagent event.
No production execution evidence was found for the deployed backfill since 2026-09-07T15:33:23Z (~61h). CloudWatch returned 0 rows for the exact [agent-description] scope, per-document warning, subagent-count, and DONE tokens. The script is log-only and emits no OTEL spans, so.
Verification reached its budget before a verdict.
Since 2026-09-07T15:33:23Z, telemetry shows 5 successful execute_tool write-document calls from 1 user, with p95 latency about 1.30s overall. The calls covered ordinary conversation/coaching paths only: 2 patch and 3 upsert; there were 0 append calls and 0 calls to playbook.
No production telemetry since 2026-09-07T15:33:23Z positively identifies migrateToPlaybook, filesMigrated, or seed-playbook executions. CloudWatch returned 0 matching rows for those exact operation tokens. OTEL shows 5 successful execute_tool write-document spans (p95 1300.4.
Libra has verdicts on 1 of 6 tracked behaviors on prod; 5 are still being checked. Libra checks hourly for 3 days after each deploy.
Traced every current place that creates or edits a subagent document, prompted by a review question on the when_to_use/model retirement PR. documents.description is a separate, generic top-level column (used by generic document-listing routes like documents.ts/kb.ts , not the agent-specific UI/dispatch surfaces, which all read frontmatter fresh) that writeDocument only updates when a caller explicitly passes it. Neither of the two real, active agent-creation paths did:
author-subagent.ts's authorSubagentDoc , the single writeDocumentGuarded call site (handles both create and edit) is used by agent-create.ts (the primary create-agent entrypoint) and the repair/edit flow. Now passes the effective description parsed fresh from the content actually being saved.seed-playbook.ts's migrateToPlaybook , all three subagent-doc writes (default system agents, the no-instructions placeholder, and the full custom-agent write) now pass description too.Confirmed empirically against production: 845 of 854 real subagent docs have this column out of sync with their actual frontmatter description.
New backfill-agent-description-column.ts, DRY_RUN-verified against production: 845 to sync, 8 already in sync, 1 skipped (a malformed doc with no frontmatter description at all , correctly reported rather than guessed at, since writeDocument's description param has no way to explicitly clear a stale column value, only to leave it alone). Not run for real yet , flagging for an explicit decision given the scale.
My first-pass comment in author-subagent.ts claimed the verification gate "requires" a description to be present before this write. Traced into verify-subagent-doc.ts and found description_present is only a warning-severity check, not an error one , dryReport.ok does not actually guarantee that. Fixed the comment to describe the real (still safe) behavior instead of a false guarantee.
pnpm --filter @zero/server run types , clean.oxlint --deny-warnings , clean on all 6 files.deps:check , clean (1774 modules).playbook/agent-workspace test directories plus the new test file , 1364 tests, all pass.DRY_RUN=1 BACKFILL_ALL=1 against the real production database (confirmed on primary via pg_is_in_recovery()).migrateToPlaybook's three write-call fixes have no new dedicated test coverage , this legacy migration function has no existing test file to extend (confirmed by search), and the fix is mechanically identical to the pattern tested thoroughly in author-subagent.test.ts/agent-create.test.ts. Flagging rather than claiming coverage that isn't there.
š¤ Generated with Claude Code
https://claude.ai/code/session_01E3AhwqADAFeqe9wEhz6Mk7
This PR propagates agent frontmatter descriptions into the generic documents.description column, adds a bulk synchronization script, and expands tests around the primary authoring path.
The PR is not yet safe to merge because existing-agent edits still leave documents.description stale, and the explicit assertion rule must also be satisfied.
The new argument reaches the guarded-write boundary but is omitted from the actual patch sent to writeDocument, leaving the principal edit path functionally incomplete; the bulk backfill also needs protection against unintended reconciliation side effects.
**Files Ne
Libra has not measured any production surfaces for this change yet.