Repository navigation
Description
Problem
Several failure paths in the run command only log warnings when --verbose is set. In normal usage, these failures are completely invisible to the user — they see success or unexpected behavior with no diagnostic information.
Silent failure locations
1. State reconciliation failure (run.ts:431-437)
} catch {
if (config.verbose) {
console.log(chalk.yellow(` ⚠️ State reconciliation failed, continuing...`));
}
}If .sequant/state.json can't be reconciled (corruption, permission error), the user gets no feedback. Execution continues with potentially stale state.
2. Metrics recording failure (run.ts:852-858)
} catch (metricsError) {
if (config.verbose) {
console.log(chalk.yellow(` ⚠️ Metrics recording error: ${metricsError}`));
}
}Metrics silently fail. The user's sequant stats will show incomplete data with no explanation.
3. State guard catch block (run.ts:463-466)
} catch {
activeIssues.push(issueNumber); // Silently includes issue on state lookup failure
}If reading an issue's state throws (file corruption, race condition), the issue is silently added to the active list. Only verbose mode logs this.
Why this matters
Users running sequant run 123 456 in CI or in normal mode see clean output and assume everything worked. If state reconciliation failed, or metrics weren't recorded, they only discover it later when sequant stats is wrong or state is stale. The feedback loop is broken — they can't diagnose the problem without re-running with --verbose, by which point the transient error may not reproduce.
Acceptance Criteria
- State reconciliation failures log a one-line warning (yellow) in all modes, not just verbose
- Metrics recording failures log a one-line warning in all modes
- State guard catch blocks log which issue failed state lookup and why
- Verbose mode continues to show additional detail (stack trace, full error object) beyond the one-line warning
- No change to control flow — these are all non-fatal, execution still continues
- Existing tests pass; add test coverage for at least one of the warning paths
Files in Scope
src/commands/run.ts— lines 431-437, 463-466, 852-858
Design Notes
The pattern should be:
} catch (error) {
console.log(chalk.yellow(` ⚠️ State reconciliation failed, continuing...`));
if (config.verbose) {
console.log(chalk.gray(` ${error}`));
}
}One-line summary always visible. Details in verbose. This is consistent with how other CLI tools (npm, git) handle non-fatal warnings.
Activity
fix(#403): surface non-fatal warnings in all modes, not just verbose
admarble commentedon Mar 24, 2026
Exec Phase: Implementation Complete
AC Coverage
Key Changes
src/commands/run.ts— Removedif (config.verbose)guards from 3 catch blocks; extractedlogNonFatalWarninghelpersrc/commands/run.test.ts— 3 new tests for the warning pattern (always-visible + verbose-only detail)CHANGELOG.md— Added entry under### FixedQuality Gates
npm run buildnpm run lintnpm testPR
Created: #415
Quality Plan Alignment: N/A — No quality plan in issue
admarble commentedon Mar 24, 2026
QA Review for Issue #403
AC Coverage
logNonFatalWarningcalled unconditionally atrun.ts:445logNonFatalWarningcalled atrun.ts:871#${issueNumber}atrun.ts:477-478logNonFatalWarningconditionally logs error object whenverbose=trueCoverage: 6/6 AC items fully met
CI Status
build (20.x)build (22.x)typecheckvalidate-pluginvalidate-skillsCI Summary: 5 passed, 0 pending, 0 failed
Quality Metrics
any)Quality Plan Verification
N/A — No quality plan found in issue comments
Test Coverage Analysis
src/commands/run.tssrc/commands/run.test.tsCHANGELOG.mdCoverage: 1/1 changed source files have corresponding tests
Critical paths without tests: None
Code Review
Strengths:
logNonFatalWarninghelper — DRY pattern applied consistently across all 3 catch blocksunknown@internalJSDoc tag correctly marks the function as not part of public APIIssues:
Suggestions:
Test Quality Review
console.logis mocked — minimal and appropriateAnti-Pattern Detection
Code Patterns
No anti-patterns detected. No empty catch blocks, no
awaitin loops, no hardcoded secrets in the diff.Dependency Audit
N/A — No dependency changes
Call-Site Review
New exported functions detected: 1
logNonFatalWarning()run.ts:445run.ts:477run.ts:871Findings: All call sites match AC constraints. The loop call at line 477 is correct — it should log per-issue when each issue's state lookup fails.
Execution Evidence
N/A — No scripts or CLI registration changes
Skill Command Verification
N/A — No skill files changed
CLI Registration Verification
N/A — No option interface changes
Smoke Test
Not Required — No workflow-affecting changes (no skills, scripts, or CLI commands modified)
CHANGELOG Verification
Result: CHANGELOG requirements met
Self-Evaluation
logNonFatalWarningunconditionallyVerdict: READY_FOR_MERGE
All 6 AC items are met. The implementation follows the exact design pattern specified in the issue. Code is clean, tests are thorough, CI is green, CHANGELOG is updated. No issues found.
Documentation
Next Steps
fix(#403): surface non-fatal warnings in all modes, not just verbose
fix(#403): surface non-fatal warnings in all modes, not just verbose (#…