Skip to content

docs: sync error-codes.mdx with actual source code#10

Merged
indykish merged 1 commit intomainfrom
fix/sync-error-codes
Apr 12, 2026
Merged

docs: sync error-codes.mdx with actual source code#10
indykish merged 1 commit intomainfrom
fix/sync-error-codes

Conversation

@indykish
Copy link
Copy Markdown
Contributor

@indykish indykish commented Apr 12, 2026

Summary

Synchronizes api-reference/error-codes.mdx with the actual error codes defined in the usezombie source code (src/errors/error_entries.zig).

Changes

Removed (phantom codes not in source):

  • PROPOSAL-001 through PROPOSAL-017 (17 codes) - never implemented
  • RUN-001 through RUN-009 (9 codes) - never implemented
  • SPEC-001 through SPEC-004 (4 codes) - never implemented

Added (codes that exist in source but were missing from docs):

  • Scoring: UZ-SCORING-001
  • Pipeline v1 removed: UZ-RUNS-410
  • Profile: UZ-PROFILE-001, UZ-PROFILE-002
  • Gate: UZ-GATE-001 through UZ-GATE-004
  • Startup: UZ-STARTUP-001 through UZ-STARTUP-007
  • Sandbox: UZ-SANDBOX-001 through UZ-SANDBOX-003
  • Executor: UZ-EXEC-001 through UZ-EXEC-014
  • Slack plugin: UZ-SLACK-001 through UZ-SLACK-003

Verification

100% synchronized. Each error code in src/errors/error_entries.zig now has a matching entry in api-reference/error-codes.mdx.

Greptile Summary

This PR removes 30 undocumented/phantom error codes and adds 32 codes across 8 new sections (Scoring, Profile, Gate, Startup, Sandbox, Executor, Slack, Pipeline v1 removed) to match the actual source. Two minor style-guide deviations were found in the newly added content: a single-quoted CLI reference instead of backtick code formatting (UZ-STARTUP-001) and use of "task" instead of the required term "run" (UZ-EXEC-007).

Confidence Score: 5/5

Safe to merge — documentation-only change with two minor style-guide deviations that don't block merge.

All findings are P2 style issues (backtick formatting and a single terminology word). No correctness, data-integrity, or structural problems were found. The sync of 62 error codes (30 removed, 32 added) looks complete and internally consistent.

No files require special attention beyond the two inline suggestions on api-reference/error-codes.mdx.

Important Files Changed

Filename Overview
api-reference/error-codes.mdx Removes 30 phantom error codes (PROPOSAL-, RUN-, SPEC-* series) and adds 32 new codes across 8 categories; two minor style issues: single-quote formatting for zombied doctor and "task" terminology on UZ-EXEC-007.

Sequence Diagram

sequenceDiagram
    participant C as Client
    participant Z as zombied API
    participant DB as Database / Redis

    C->>Z: API Request
    alt Valid request
        Z->>DB: Process
        DB-->>Z: Result
        Z-->>C: 2xx Success
    else Auth failure
        Z-->>C: 401/403 UZ-AUTH-*
    else Validation error
        Z-->>C: 400 UZ-REQ-* / UZ-UUIDV7-*
    else Resource not found
        Z-->>C: 404 UZ-ZMB-009 / UZ-PROFILE-001 / UZ-AGENT-001
    else Execution failure
        Z->>DB: Write gate/exec results
        DB-->>Z: Error
        Z-->>C: 500 UZ-EXEC-* / UZ-GATE-* / UZ-SANDBOX-*
    else Billing / entitlement
        Z-->>C: 402/403 UZ-BILLING-* / UZ-ENTL-*
    else Service unavailable
        Z-->>C: 503 UZ-INTERNAL-001 / UZ-STARTUP-*
    end
    Note over Z,C: All error responses use RFC 7807 application/problem+json
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: api-reference/error-codes.mdx
Line: 201

Comment:
**Single-quote instead of backtick code formatting for CLI command**

`'zombied doctor'` uses single quotes rather than backtick code formatting. Per the project style guide, `zombied` (and commands that invoke it) should always appear in code formatting. Every other CLI reference on this page (e.g., `zombiectl config set`, `zombiectl credential add`) already follows this convention.

```suggestion
| `UZ-STARTUP-001` | 500 | Environment check failed | Required environment variables are missing. Run `zombied doctor` to see which ones. |
```

**Context Used:** AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=e994989b-b25e-4468-be5d-6bde3ddb0ce6))

How can I resolve this? If you propose a fix, please make it concise.

---

This is a comment left during a code review.
Path: api-reference/error-codes.mdx
Line: 227

Comment:
**Terminology: "task" should be "run"**

The project terminology guide specifies "run" not "job" or "task." The phrase "The task took too long to complete" should use "run" to stay consistent with the rest of the documentation.

```suggestion
| `UZ-EXEC-007` | 500 | Execution lease expired | Execution lease expired. The run took too long to complete. |
```

**Context Used:** AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=e994989b-b25e-4468-be5d-6bde3ddb0ce6))

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "docs: sync error-codes.mdx with actual s..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Context used:

  • Context used - AGENTS.md (source)

**Removed phantom error codes (not in source):**
- All PROPOSAL codes (001-017) - never implemented
- All RUN codes (001-009) - never implemented
- All SPEC codes (001-004) - never implemented

**Added missing error codes from source:**
- UZ-SCORING-001
- UZ-RUNS-410 (Pipeline v1 removed)
- UZ-PROFILE-001, UZ-PROFILE-002
- UZ-GATE-001 to UZ-GATE-004
- UZ-STARTUP-001 to UZ-STARTUP-007
- UZ-SANDBOX-001 to UZ-SANDBOX-003
- UZ-EXEC-001 to UZ-EXEC-014
- UZ-SLACK-001 to UZ-SLACK-003

**Result:** Error codes now 100% synchronized between
src/errors/error_entries.zig and api-reference/error-codes.mdx (99 codes each)
@indykish indykish merged commit c6cf68e into main Apr 12, 2026
4 checks passed
@indykish indykish deleted the fix/sync-error-codes branch April 12, 2026 18:43
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.

1 participant