[PR #3655] [CLOSED] test(cli): cover SQLite selection through a symlink before .. #5864

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3655
Author: @maliv2
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: fix/3324-sqlite-cli-path-symlink-parent


📝 Commits (3)

  • 585c1c5 fix(cli): keep the selected SQLite path across symlinks before ..
  • 9f8b7c7 test(cli): skip the symlink path cases without native SQLite limits
  • 64ddccb Merge remote-tracking branch 'upstream/main' into fix/3324-sqlite-cli-path-symlink-parent

📊 Changes

1 file changed (+63 additions, -1 deletions)

View changed files

📝 tests/acceptance/sqliteDatabaseCli.test.ts (+63 -1)

📄 Description

Summary

Fixes #3324. inspect-sqlite-database link/../sample.db returned successful, observed Evidence (rows and SHA-256) for a different database than the one the operating system selects. #4067 has since moved caller-path anchoring into absoluteCallerPath, which fixes this command; this PR now only adds the regression coverage for it.

Problem and expected behavior

The CLI used to anchor its path with path.resolve, which collapses .. lexically: link/../sample.db became <parent of link>/sample.db while POSIX follows link first. Expected: the database the OS selects is inspected, with its own digest and rows.

Change and scope

Test only: two acceptance cases in tests/acceptance/sqliteDatabaseCli.test.ts (absolute and relative selection of link/../sample.db, with a distinct sibling database that must not be read). They assert the selected row value and the selected file's SHA-256, run only where native SQLite limits are available, and are skipped on Windows. The earlier shared-helper change was dropped after #4067 landed.

Contract and boundary impact

  • Semantic owner and earliest changed stage: not applicable (test only).
  • Contribution scope fit and linked maintainer decision: not applicable.
  • CLI and MCP/tool-catalog contract: none.
  • Provider, bridge, target-format, or platform compatibility: POSIX only; skipped on Windows.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Generated metadata, package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

Executed (Linux x64, Node 24.18.0), on current main (b3b5c8b13) plus this test file: npm run test:focused -- tests/acceptance/sqliteDatabaseCli.test.ts — 10 passed, 1 skipped. Before #4067 the two new cases failed on main with expected 'WRONG' to be 'SELECTED'.

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • npm run test:focused -- tests/acceptance/sqliteDatabaseCli.test.ts (Linux, Node 24.18.0, on current main plus this file) — 10 passed, 1 skipped
  • npm run lint, npx knip, npx oxfmt --check on the test file (Windows, Node 26.4.0) — clean

Not run: npm run check, full acceptance suite, macOS.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: none (test only).

Author readiness

Human owner: @maliv2

This change was prepared with AI assistance. The human owner (@maliv2) completed the declarations below after reviewing the diff.

  • 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.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 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/3655 **Author:** [@maliv2](https://github.com/maliv2) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/3324-sqlite-cli-path-symlink-parent` --- ### 📝 Commits (3) - [`585c1c5`](https://github.com/morluto/rea/commit/585c1c5cbdefb4a8352c19fd49c273ff45d11fc6) fix(cli): keep the selected SQLite path across symlinks before `..` - [`9f8b7c7`](https://github.com/morluto/rea/commit/9f8b7c761663c66128e8660c2e3e1d560f199e58) test(cli): skip the symlink path cases without native SQLite limits - [`64ddccb`](https://github.com/morluto/rea/commit/64ddccbc0116a13a00e102e4cd8389420fdee62d) Merge remote-tracking branch 'upstream/main' into fix/3324-sqlite-cli-path-symlink-parent ### 📊 Changes **1 file changed** (+63 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tests/acceptance/sqliteDatabaseCli.test.ts` (+63 -1) </details> ### 📄 Description ## Summary Fixes #3324. `inspect-sqlite-database link/../sample.db` returned successful, observed Evidence (rows and SHA-256) for a different database than the one the operating system selects. #4067 has since moved caller-path anchoring into `absoluteCallerPath`, which fixes this command; this PR now only adds the regression coverage for it. ## Problem and expected behavior The CLI used to anchor its path with `path.resolve`, which collapses `..` lexically: `link/../sample.db` became `<parent of link>/sample.db` while POSIX follows `link` first. Expected: the database the OS selects is inspected, with its own digest and rows. ## Change and scope Test only: two acceptance cases in `tests/acceptance/sqliteDatabaseCli.test.ts` (absolute and relative selection of `link/../sample.db`, with a distinct sibling database that must not be read). They assert the selected row value and the selected file's SHA-256, run only where native SQLite limits are available, and are skipped on Windows. The earlier shared-helper change was dropped after #4067 landed. ## Contract and boundary impact - Semantic owner and earliest changed stage: not applicable (test only). - Contribution scope fit and linked maintainer decision: not applicable. - CLI and MCP/tool-catalog contract: none. - Provider, bridge, target-format, or platform compatibility: POSIX only; skipped on Windows. - Evidence, artifact, provenance, or reconstruction contract: none. - Generated metadata, package, or installation impact: none. Expected effects: - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage Executed (Linux x64, Node 24.18.0), on current `main` (b3b5c8b13) plus this test file: `npm run test:focused -- tests/acceptance/sqliteDatabaseCli.test.ts` — 10 passed, 1 skipped. Before #4067 the two new cases failed on `main` with `expected 'WRONG' to be 'SELECTED'`. - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `npm run test:focused -- tests/acceptance/sqliteDatabaseCli.test.ts` (Linux, Node 24.18.0, on current `main` plus this file) — 10 passed, 1 skipped - `npm run lint`, `npx knip`, `npx oxfmt --check` on the test file (Windows, Node 26.4.0) — clean Not run: `npm run check`, full acceptance suite, macOS. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: not applicable. - Package or release metadata impact: none. - Security, privacy, process, or containment review: none (test only). ## Author readiness Human owner: @maliv2 This change was prepared with AI assistance. The human owner (@maliv2) completed the declarations below after reviewing the diff. - [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. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:10:01 +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#5864
No description provided.