[PR #4208] [CLOSED] fix(sqlite): classify path resolution errors as invalid input #6126

Closed
opened 2026-10-31 01:12:04 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/4208
Author: @himamaheswarreddy
Created: 10/15/2026
Status: ❌ Closed

Base: main ← Head: fix/sqlite-path-error-classification


📝 Commits (1)

  • 2c78d7d fix(sqlite): classify path resolution errors as invalid input

📊 Changes

3 files changed (+78 additions, -2 deletions)

View changed files

📝 src/sqlite/SqliteDatabaseFailures.ts (+6 -1)
📝 tests/acceptance/sqliteDatabaseCli.test.ts (+39 -1)
📝 tests/boundary/sqlite/sqliteDatabaseProvider.test.ts (+33 -0)

📄 Description

Summary

Fixes #4188. Initial SQLite path-resolution failures for ELOOP and ENAMETOOLONG were falling through to execution_failure. They now use the existing typed invalid-input path, matching missing and non-directory selections.

Change

  • Extend sqliteDatabaseFailure to classify ELOOP and ENAMETOOLONG as AnalysisInputError.
  • Add provider-boundary regressions for both errno cases.
  • Add public CLI and stdio MCP regressions asserting invalid_request, the path/invalid_value issue, and matching error details.

Validation

  • npm ci
  • npm run build:cached
  • npm run verify:test-discovery — all 1352 test files discovered exactly once
  • npm run format:check
  • npm run check:fast
  • npm run test:focused -- tests/boundary/sqlite/sqliteDatabaseProvider.test.ts tests/acceptance/sqliteDatabaseCli.test.ts — 34 passed, 1 skipped
  • npm run test:sqlite — 121 passed, 3 skipped
  • git diff --check

The repository setup used Node 26.11.1/npm 12.2.0; the repository documents Node 22/24/26 support.

AI disclosure

This change was prepared with AI assistance. The human owner must review the final diff, validation evidence, and remaining gaps before requesting maintainer review.

Author readiness

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

This PR is intentionally a draft until the human owner completes the readiness declaration.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/4208 **Author:** [@himamaheswarreddy](https://github.com/himamaheswarreddy) **Created:** 10/15/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/sqlite-path-error-classification` --- ### 📝 Commits (1) - [`2c78d7d`](https://github.com/morluto/rea/commit/2c78d7dbb076cea4fae99dba01be9cfe2fbf4d94) fix(sqlite): classify path resolution errors as invalid input ### 📊 Changes **3 files changed** (+78 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/sqlite/SqliteDatabaseFailures.ts` (+6 -1) 📝 `tests/acceptance/sqliteDatabaseCli.test.ts` (+39 -1) 📝 `tests/boundary/sqlite/sqliteDatabaseProvider.test.ts` (+33 -0) </details> ### 📄 Description ## Summary Fixes #4188. Initial SQLite path-resolution failures for `ELOOP` and `ENAMETOOLONG` were falling through to `execution_failure`. They now use the existing typed invalid-input path, matching missing and non-directory selections. ## Change - Extend `sqliteDatabaseFailure` to classify `ELOOP` and `ENAMETOOLONG` as `AnalysisInputError`. - Add provider-boundary regressions for both errno cases. - Add public CLI and stdio MCP regressions asserting `invalid_request`, the `path`/`invalid_value` issue, and matching error details. ## Validation - `npm ci` - `npm run build:cached` - `npm run verify:test-discovery` — all 1352 test files discovered exactly once - `npm run format:check` - `npm run check:fast` - `npm run test:focused -- tests/boundary/sqlite/sqliteDatabaseProvider.test.ts tests/acceptance/sqliteDatabaseCli.test.ts` — 34 passed, 1 skipped - `npm run test:sqlite` — 121 passed, 3 skipped - `git diff --check` The repository setup used Node 26.11.1/npm 12.2.0; the repository documents Node 22/24/26 support. ## AI disclosure This change was prepared with AI assistance. The human owner must review the final diff, validation evidence, and remaining gaps before requesting maintainer review. ## Author readiness - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. This PR is intentionally a draft until the human owner completes the readiness declaration. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:12:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6126
No description provided.