Skip to content

Expose RunLog seed failure stages - #1200

Merged
kody-bot merged 1 commit into
mainfrom
cursor/runlog-consolidation-1b40
Aug 4, 2026
Merged

kody-bot merged 1 commit into
mainfrom
cursor/runlog-consolidation-1b40

Conversation

@kentcdodds

@kentcdodds kentcdodds commented Aug 4, 2026 •

Copy link
Copy Markdown
Owner

Intent

Diagnose the one remaining production RunLog seed failure without exposing user-authored data.

Summary

  • add content-free failureStage and failurePhase fields to admin seed results
  • distinguish workflow/job/activation and D1/seed/verify failures
  • remove raw error objects from operator warning logs

Testing

  • focused admin/capability tests: 34 passed
  • pre-push full Node/Workers and E2E suites passed
  • format, lint, and typecheck passed

System changes

No seeding semantics change; operator diagnostics only.

Conductor report

STATUS: in-progress

What shipped: content-free seed failure staging is pushed; CI/merge/deploy and production rerun pending.

Risk self-assessment: low β€” additive admin output fields and safer logs.

Merged/deployed: no / no.

Scope spill: none.

Open in WebΒ Open in CursorΒ 

Summary by CodeRabbit

  • Improvements
    • Added clear per-user diagnostics identifying where and during which step a legacy seed operation failed.
    • Improved error isolation so failures for one user do not interrupt processing for others.
    • Successful results now explicitly indicate that no failure occurred.
  • Documentation
    • Updated capability details and output schemas to describe the new diagnostic fields.
  • Tests
    • Added coverage for all failure stages and verification scenarios while preserving sensitive error-content redaction checks.

@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b35384ae-9ce3-4866-8061-ba4b99c5c58a

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between a90dc91 and 83290e1.

πŸ“’ Files selected for processing (4)
  • packages/worker/src/admin/run-log-legacy-seed.node.test.ts
  • packages/worker/src/admin/run-log-legacy-seed.ts
  • packages/worker/src/mcp/capabilities/admin/admin-run-log-legacy-seed.node.test.ts
  • packages/worker/src/mcp/capabilities/admin/admin-run-log-legacy-seed.ts

πŸ“ Walkthrough

Walkthrough

The legacy seed flow now classifies per-user failures by inventory surface and phase. Results expose nullable failure metadata. Processing isolates failed users, avoids raw error logging, and documents the fields in the MCP capability schema.

Changes

Legacy seed diagnostics

Layer / File(s) Summary
Failure metadata contract
packages/worker/src/admin/run-log-legacy-seed.ts, packages/worker/src/mcp/capabilities/admin/admin-run-log-legacy-seed.ts
Added failure stage and phase types. Added nullable fields to per-user results and the MCP output schema.
Surface-specific failure handling
packages/worker/src/admin/run-log-legacy-seed.ts
Wrapped workflow, job, and activation D1, seed, verification, and cursor operations with surface-specific failure classification.
Per-user result isolation
packages/worker/src/admin/run-log-legacy-seed.ts
Updated processUser to stop processing after a classified failure, aggregate successful stages, and log only stable identifiers and failure metadata.
Diagnostic validation
packages/worker/src/admin/run-log-legacy-seed.node.test.ts, packages/worker/src/mcp/capabilities/admin/admin-run-log-legacy-seed.node.test.ts
Added injected failure hooks and parameterized coverage for failure stages, phases, warnings, redaction, successful null fields, and MCP schema documentation.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AdminRunLog
  participant processUser
  participant runSurfaceStep
  participant TrackingRPC
  AdminRunLog->>processUser: process one user
  processUser->>runSurfaceStep: run workflow, job, or activation step
  runSurfaceStep->>TrackingRPC: read, seed, or verify inventory
  TrackingRPC-->>runSurfaceStep: success or error
  runSurfaceStep-->>processUser: classified result
  processUser-->>AdminRunLog: user result with failureStage and failurePhase
Loading

Possibly related PRs

πŸš₯ Pre-merge checks | βœ… 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
βœ… Passed checks (4 passed)
Check name Status Explanation
Title check βœ… Passed The title clearly and concisely describes the main change: exposing RunLog seed failure stages.
Description check βœ… Passed The description includes the required Intent, Summary, Testing, and System changes sections with relevant details and test results.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches πŸ’‘ 1
πŸ“ Generate docstrings πŸ’‘
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/runlog-consolidation-1b40

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

πŸ”Ž Preview deployed: https://kody-pr-1200.kody-a99.workers.dev

Worker: kody-pr-1200
D1: kody-pr-1200-db
KV: kody-pr-1200-oauth-kv

Mocks:

@kody-bot
kody-bot merged commit 03be2ac into main Aug 4, 2026
10 checks passed
@kody-bot
kody-bot deleted the cursor/runlog-consolidation-1b40 branch August 4, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants