mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-04-25 01:25:52 +03:00
[PR #149] [MERGED] feat: add preflight validation phase with structured error reporting #144
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shannon-KeygraphHQ#144
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/KeygraphHQ/shannon/pull/149
Author: @ajmallesh
Created: 2/20/2026
Status: ✅ Merged
Merged: 2/20/2026
Merged by: @ezl-keygraph
Base:
main← Head:fix/preflight-validation📝 Commits (4)
f0f18b5feat: add preflight validation phase with structured error reportingd7c3ed8refactor: extract error formatting utilities from workflows.ts into workflow-errors.ts9e2f80brefactor: replace HTTP credential checks with Claude Agent SDK queryb0887e9refactor: use SDK-exported SDKAssistantMessageError instead of local type definition📊 Changes
9 files changed (+479 additions, -13 deletions)
View changed files
📝
src/ai/message-handlers.ts(+1 -1)📝
src/ai/types.ts(+2 -8)📝
src/audit/workflow-logger.ts(+19 -1)📝
src/services/error-handling.ts(+10 -0)➕
src/services/preflight.ts(+253 -0)📝
src/temporal/activities.ts(+68 -0)➕
src/temporal/workflow-errors.ts(+94 -0)📝
src/temporal/workflows.ts(+27 -3)📝
src/types/errors.ts(+5 -0)📄 Description
Summary
Preflight validation phase — New
runPreflightValidationactivity runs before any agent execution, validating repo path exists with.git, config file parses correctly (if provided), and credentials work (API key, OAuth token, or router mode). Fails fast with actionable errors before committing to the pipeline.Structured error formatting — Replaced single-line error strings with pipe-delimited segments that
WorkflowLogger.formatErrorBlock()renders as indented multi-line blocks. Each error now includes: phase context, error type, message, and remediation hint.Remediation hints — Added
REMEDIATION_HINTSmapping for common failure types (AuthenticationError, ConfigurationError, BillingError, etc.) so users immediately know what to check when runs fail.Error classification — Added
REPO_NOT_FOUND,AUTH_FAILED, andBILLING_ERRORcodes to theErrorCodeenum with proper classification inerror-handling.ts.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.