Sync 2.7.1 release corrections into dev #30

Merged
nimmo merged 7 commits from sync/release-2.7.1 into dev 2026-10-16 23:20:43 +01:00
Owner

Merge release/2.7.1 corrections into dev, preserving all release candidate review refinements, test additions, and advancing the provisional development target to 2.8.0-dev1.

Merge release/2.7.1 corrections into `dev`, preserving all release candidate review refinements, test additions, and advancing the provisional development target to `2.8.0-dev1`.
Prepare 2.7.1-rc.1
All checks were successful
Branch and package checks / check (push) Successful in 38s
7eee9fdb0f
Release 2.7.1
All checks were successful
Branch and package checks / check (push) Successful in 38s
Build and Push Attic Cache / build (pull_request) Successful in 31s
Branch and package checks / check (pull_request) Successful in 5s
AI pull-request review / review (pull_request) Successful in 13m16s
d59a8cb8ce
Release 2.7.1: snapshot skipped_media checkpoint and tolerate safeFile fs errors
All checks were successful
Branch and package checks / check (pull_request) Successful in 39s
Build and Push Attic Cache / build (pull_request) Successful in 49s
AI pull-request review / review (pull_request) Successful in 25m0s
Branch and package checks / check (push) Successful
21c4626455
Merge 2.7.1 release corrections into dev and begin 2.8.0 development
All checks were successful
Branch and package checks / check (pull_request) Successful in 38s
Build and Push Attic Cache / build (pull_request) Successful in 40s
AI pull-request review / review (pull_request) Successful in 6m53s
7ecc563cc7
clankbot left a comment

Automated code review

Reviewed commit: 7ecc563cc7b8ab8c7f0c473e76b10bc7a1774f49

Verdict: Requires further work

Resolve the blocking or important findings and investigate failed deterministic checks before merging.

Overall assessment

The back-merge is mechanically consistent (VERSION, package.json and CHANGELOG all move to 2.8.0-dev1; the 2.7.1/2.7.1-rc.N headings and dev-series entries are preserved), and the two src/jobs.ts changes are coherent: the [...skippedMedia] snapshot is justified because src/worker.ts:246/255/262 stores the reported object in pendingCheckpoint and only JSON.stringifies it at a deferred flush, and the whitelisted catch around safeFile matches the existing isFileError whitelist. The residual issues are evidence/coverage: the new test in tests/vectorize-error-tolerance.test.mjs cannot reach the new catch (src/dedup.ts:17-31 returns null for a directory via if (!file.isFile()) return null; and only rethrows non-ENOENT errors from realpath/lstat, none of which a readable directory under mkdtempSync produces), the tolerated fs-error skip path records no identifying media, and the rewritten SEARCH-01 row now attributes the whole 2.7.1-dev3..dev12 work to 2.7.1-rc.2, contradicting the CHANGELOG entries carried in the same commit.

Blocking findings

None.

Important findings

  • New test does not exercise the added safeFile error path (tests/vectorize-error-tolerance.test.mjs:471; high confidence)
    The new test turns 2.jpg into a directory (rmSync(item2Path,{force:true}); mkdirSync(item2Path)). src/dedup.ts safeFile (lines 17-31) handles a directory without throwing: realpath/lstat both succeed and it returns null at if (!file.isFile()) return null;; its only catch rethrows non-ENOENT errors, none of which occur for a readable directory under mkdtempSync(tmpdir()). So the new try { isSafe = Boolean(await safeFile(row)); } catch block at src/jobs.ts:924-933 is never entered and the assertions (completed===2, skipped_unsafe_files===1, last_media_id===3, phase==='complete') hold identically against the pre-change if (!await safeFile(row)) code. The other nine tests in the file trigger skips via encoder 422 responses or rmSync (ENOENT -> safeFile returns null), so none of them cover the new catch either.
    Impact: The rc.2 tolerance behaviour is untested: the REQUIREMENTS-TRACE claim that the suite covers 'catches safeFile fs errors (ENOENT/EACCES/EISDIR) as unsafe-file skips' is not backed by the supplied tests, and a regression that re-raised EACCES/EISDIR from safeFile would keep all 10 cases green while failing the vectorize job.
    Suggested fix: Make the fixture actually raise a whitelisted errno out of safeFile, e.g. chmodSync(join(dir,'sub'), 0o000) on a subdirectory used in a stored filepath to force EACCES in realpath/lstat, or store a filepath whose parent component is a regular file; assert the item is counted in skipped_unsafe_files and the job still reaches phase: 'complete'. Keep the directory case as a separate test for the isFile() null path.

Suggestions

  • Tolerated safeFile errors are recorded only as a count, with no identifying media (src/jobs.ts:927; medium confidence)
    The new catch sets isSafe = false, and the if (!isSafe) branch only does skippedUnsafe++; runUnsafeCount++;. skippedMedia.push({ media_id: row.id, error: msg.slice(0,512) }) occurs only in the encoder-error catch (src/jobs.ts ~975, guarded by if (skippedMedia.length < 20)), so a row skipped because safeFile threw EACCES/EISDIR leaves no entry in checkpoint.skipped_media; the job then reaches report('complete'). Before this change the same errno propagated out of safeFile and out of vectorizeHandler, failing the job visibly.
    Impact: A gallery folder with a permission problem, or a media row whose path resolves to a directory, now becomes an unattributed skipped_unsafe_files count in an otherwise-successful job; the operator-inspection affordance the change adds (the 5-consecutive abort message) does not apply to these skips, so a previously-visible failure becomes harder to diagnose.
    Suggested fix: Surface the tolerated skip in the bounded skippedMedia list (e.g. push { media_id: row.id, error: String((error as {code?:string}).code ?? '') } under the existing skippedMedia.length < 20 guard) or otherwise record the failing path/code in the checkpoint, so the count is actionable.

  • Trace paragraph attributes the whole 2.7.1 development history to rc.2 (REQUIREMENTS-TRACE.md:60; medium confidence)
    The rewritten SEARCH-01 row changes the sentence subject from '2.7.1-dev12 addresses embedding job failure on transient 503, connection drops, and unprocessable media: ...' to '2.7.1-rc.2 addresses ...', while keeping the entire dev-series list (encoderRequest retry/backoff, run anchors, UnprocessableMediaError, awaited retrySqliteBusy, etc.). The CHANGELOG entries carried in the same diff attribute those items to 2.7.1-dev3 through 2.7.1-dev12 (e.g. dev9 'Persist run anchors in checkpoint, drop message substring in isFileError, preserve consecutive errors across unsafe files'; dev12 're-raise decode-time memory errors as 503 instead of 422'), and 2.7.1-rc.2 to only 'snapshot skipped_media checkpoint and tolerate safeFile fs errors'.
    Impact: The acceptance evidence now credits rc.2 with work done on the development series, which contradicts the changelog in the same commit and weakens the trace's per-candidate attribution.
    Suggested fix: Restore the historical attribution to the 2.7.1-devN rounds and add a separate sentence for the two rc.2 items (defensive skipped_media snapshot at src/jobs.ts:926, safeFile fs-error tolerance at src/jobs.ts:924-933), pointing at the new test cases once they actually cover those paths.

Tests and validation

  • package-checks: success

Questions

  • The new catch whitelists only ENOENT/EACCES/EISDIR, but safeFile calls realpath on the filepath and its parent; should ENOTDIR (a stored filepath with a regular file as a path component) also be tolerated, or is failing the whole job the intended behaviour for that case?
  • The CHANGELOG adds 'release: Accepted 2.7.1 release' and VERSION/package.json advance to 2.8.0-dev1, but acceptance/ contains release-2.3.0.md through release-2.7.0.md and no release-2.7.1.md, and the SEARCH-01 row still states 'Real full-library completion and genuinely absent sqlite-vec host acceptance remain open'. Can you confirm the 2.7.1 acceptance record and the main merge/tag exist on the release branch, since branch state is not present in the checked-out tree?
  • Is the added test expected to be counted in the trace's 'passes all 10 cases' claim given that it does not currently reach the code path it names?

Review limitations

  • No commands were executed and no code was edited; test-suite results were taken from the supplied material, not independently verified.
  • Repository state was read only at the checked-out head (which already contains the change); branch history, the release/2.7.1 promotion, the main merge and the tag could not be inspected, so release-acceptance claims could not be confirmed.
  • No live, GPU, scale or deployment acceptance evidence is present in the supplied material; the cited unit tests do not establish those gates.
  • Analysis is limited to the six changed files and the definitions they call (src/dedup.ts safeFile, src/worker.ts reportProgress/flushProgress, scripts/version.py, VERSIONING.md); unchanged behaviour elsewhere was not audited.

Diff coverage

  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • src/jobs.ts: reviewed — included in a context-limited batch
  • tests/vectorize-error-tolerance.test.mjs: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 4
  • Previous automated review: none found
  • Findings: 3
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `7ecc563cc7b8ab8c7f0c473e76b10bc7a1774f49` ## Verdict: Requires further work Resolve the blocking or important findings and investigate failed deterministic checks before merging. ### Overall assessment The back-merge is mechanically consistent (VERSION, package.json and CHANGELOG all move to 2.8.0-dev1; the 2.7.1/2.7.1-rc.N headings and dev-series entries are preserved), and the two src/jobs.ts changes are coherent: the `[...skippedMedia]` snapshot is justified because src/worker.ts:246/255/262 stores the reported object in `pendingCheckpoint` and only JSON.stringifies it at a deferred flush, and the whitelisted catch around `safeFile` matches the existing isFileError whitelist. The residual issues are evidence/coverage: the new test in tests/vectorize-error-tolerance.test.mjs cannot reach the new catch (src/dedup.ts:17-31 returns null for a directory via `if (!file.isFile()) return null;` and only rethrows non-ENOENT errors from realpath/lstat, none of which a readable directory under mkdtempSync produces), the tolerated fs-error skip path records no identifying media, and the rewritten SEARCH-01 row now attributes the whole 2.7.1-dev3..dev12 work to 2.7.1-rc.2, contradicting the CHANGELOG entries carried in the same commit. ### Blocking findings None. ### Important findings - **New test does not exercise the added safeFile error path** (tests/vectorize-error-tolerance.test.mjs:471; high confidence) The new test turns `2.jpg` into a directory (`rmSync(item2Path,{force:true}); mkdirSync(item2Path)`). src/dedup.ts `safeFile` (lines 17-31) handles a directory without throwing: `realpath`/`lstat` both succeed and it returns `null` at `if (!file.isFile()) return null;`; its only catch rethrows non-ENOENT errors, none of which occur for a readable directory under `mkdtempSync(tmpdir())`. So the new `try { isSafe = Boolean(await safeFile(row)); } catch` block at src/jobs.ts:924-933 is never entered and the assertions (`completed===2`, `skipped_unsafe_files===1`, `last_media_id===3`, `phase==='complete'`) hold identically against the pre-change `if (!await safeFile(row))` code. The other nine tests in the file trigger skips via encoder 422 responses or `rmSync` (ENOENT -> safeFile returns null), so none of them cover the new catch either. Impact: The rc.2 tolerance behaviour is untested: the REQUIREMENTS-TRACE claim that the suite covers 'catches safeFile fs errors (ENOENT/EACCES/EISDIR) as unsafe-file skips' is not backed by the supplied tests, and a regression that re-raised EACCES/EISDIR from safeFile would keep all 10 cases green while failing the vectorize job. Suggested fix: Make the fixture actually raise a whitelisted errno out of safeFile, e.g. `chmodSync(join(dir,'sub'), 0o000)` on a subdirectory used in a stored filepath to force EACCES in realpath/lstat, or store a filepath whose parent component is a regular file; assert the item is counted in `skipped_unsafe_files` and the job still reaches `phase: 'complete'`. Keep the directory case as a separate test for the `isFile()` null path. ### Suggestions - **Tolerated safeFile errors are recorded only as a count, with no identifying media** (src/jobs.ts:927; medium confidence) The new catch sets `isSafe = false`, and the `if (!isSafe)` branch only does `skippedUnsafe++; runUnsafeCount++;`. `skippedMedia.push({ media_id: row.id, error: msg.slice(0,512) })` occurs only in the encoder-error catch (src/jobs.ts ~975, guarded by `if (skippedMedia.length < 20)`), so a row skipped because safeFile threw EACCES/EISDIR leaves no entry in `checkpoint.skipped_media`; the job then reaches `report('complete')`. Before this change the same errno propagated out of safeFile and out of vectorizeHandler, failing the job visibly. Impact: A gallery folder with a permission problem, or a media row whose path resolves to a directory, now becomes an unattributed `skipped_unsafe_files` count in an otherwise-successful job; the operator-inspection affordance the change adds (the 5-consecutive abort message) does not apply to these skips, so a previously-visible failure becomes harder to diagnose. Suggested fix: Surface the tolerated skip in the bounded `skippedMedia` list (e.g. push `{ media_id: row.id, error: String((error as {code?:string}).code ?? '') }` under the existing `skippedMedia.length < 20` guard) or otherwise record the failing path/code in the checkpoint, so the count is actionable. - **Trace paragraph attributes the whole 2.7.1 development history to rc.2** (REQUIREMENTS-TRACE.md:60; medium confidence) The rewritten SEARCH-01 row changes the sentence subject from '2.7.1-dev12 addresses embedding job failure on transient 503, connection drops, and unprocessable media: ...' to '2.7.1-rc.2 addresses ...', while keeping the entire dev-series list (encoderRequest retry/backoff, run anchors, UnprocessableMediaError, awaited retrySqliteBusy, etc.). The CHANGELOG entries carried in the same diff attribute those items to 2.7.1-dev3 through 2.7.1-dev12 (e.g. dev9 'Persist run anchors in checkpoint, drop message substring in isFileError, preserve consecutive errors across unsafe files'; dev12 're-raise decode-time memory errors as 503 instead of 422'), and 2.7.1-rc.2 to only 'snapshot skipped_media checkpoint and tolerate safeFile fs errors'. Impact: The acceptance evidence now credits rc.2 with work done on the development series, which contradicts the changelog in the same commit and weakens the trace's per-candidate attribution. Suggested fix: Restore the historical attribution to the 2.7.1-devN rounds and add a separate sentence for the two rc.2 items (defensive `skipped_media` snapshot at src/jobs.ts:926, safeFile fs-error tolerance at src/jobs.ts:924-933), pointing at the new test cases once they actually cover those paths. ### Tests and validation - package-checks: **success** ### Questions - The new catch whitelists only ENOENT/EACCES/EISDIR, but safeFile calls `realpath` on the filepath and its parent; should ENOTDIR (a stored filepath with a regular file as a path component) also be tolerated, or is failing the whole job the intended behaviour for that case? - The CHANGELOG adds 'release: Accepted 2.7.1 release' and VERSION/package.json advance to 2.8.0-dev1, but acceptance/ contains release-2.3.0.md through release-2.7.0.md and no release-2.7.1.md, and the SEARCH-01 row still states 'Real full-library completion and genuinely absent sqlite-vec host acceptance remain open'. Can you confirm the 2.7.1 acceptance record and the main merge/tag exist on the release branch, since branch state is not present in the checked-out tree? - Is the added test expected to be counted in the trace's 'passes all 10 cases' claim given that it does not currently reach the code path it names? ### Review limitations - No commands were executed and no code was edited; test-suite results were taken from the supplied material, not independently verified. - Repository state was read only at the checked-out head (which already contains the change); branch history, the release/2.7.1 promotion, the main merge and the tag could not be inspected, so release-acceptance claims could not be confirmed. - No live, GPU, scale or deployment acceptance evidence is present in the supplied material; the cited unit tests do not establish those gates. - Analysis is limited to the six changed files and the definitions they call (src/dedup.ts safeFile, src/worker.ts reportProgress/flushProgress, scripts/version.py, VERSIONING.md); unchanged behaviour elsewhere was not audited. ### Diff coverage - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `src/jobs.ts`: **reviewed** — included in a context-limited batch - `tests/vectorize-error-tolerance.test.mjs`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 4 - Previous automated review: none found - Findings: 3 </details>
Author
Owner

Review Follow-up (Review ID 114)

Addressed all findings and questions reported in Review ID 114:

  1. Exercise safeFile Thrown Filesystem Error Paths:

    • Added safeFile filesystem errors (EACCES) are caught and recorded as unsafe skips with media ID to tests/vectorize-error-tolerance.test.mjs, placing item 2 in an unreadable subfolder (chmodSync 0o000) so safeFile actually throws EACCES from realpath, verifying it is caught, recorded in skipped_unsafe_files, and attributed in skipped_media.
    • Added safeFile filesystem errors (ENOTDIR) are caught and recorded as unsafe skips with media ID verifying ENOTDIR when navigating through a non-directory path component.
    • Retained the directory test covering safeFile's !file.isFile() -> null path.
    • The test suite now passes all 12 cases.
  2. Actionable Attributed safeFile Skip Recording:

    • In src/jobs.ts, when safeFile throws a whitelisted filesystem error (ENOENT, EACCES, EISDIR, ENOTDIR), the skip is attributed with its media ID and specific errno in skippedMedia (safeFile: ${unsafeReason}) under the bounded 20-entry guard, making the skip actionable in job checkpoints.
  3. Whitelist ENOTDIR:

    • Expanded the whitelisted filesystem errors in src/jobs.ts (safeFile catch and isFileError catch) to include ENOTDIR alongside ENOENT, EACCES, and EISDIR.
  4. Attribution and Release Trace Alignment:

    • Restored historical attribution in REQUIREMENTS-TRACE.md (SEARCH-01) to 2.7.1-dev12 for the development series changes, and added distinct coverage description for 2.7.1-rc.2 and 2.8.0-dev1 with 12 tests.
    • Created acceptance/release-2.7.1.md documenting the 2.7.1 release scope, candidate test evidence, and accepted publication.
  5. Validation Evidence:

    • All 229 Node tests pass.
    • All 63 Python tests pass.
    • Full derivation build nix build --no-link --print-build-logs .#redview passed cleanly.
    • Version advanced to 2.8.0-dev2 with aligned metadata and changelog.
### Review Follow-up (Review ID 114) Addressed all findings and questions reported in Review ID 114: 1. **Exercise safeFile Thrown Filesystem Error Paths**: - Added `safeFile filesystem errors (EACCES) are caught and recorded as unsafe skips with media ID` to `tests/vectorize-error-tolerance.test.mjs`, placing item 2 in an unreadable subfolder (`chmodSync 0o000`) so `safeFile` actually throws `EACCES` from `realpath`, verifying it is caught, recorded in `skipped_unsafe_files`, and attributed in `skipped_media`. - Added `safeFile filesystem errors (ENOTDIR) are caught and recorded as unsafe skips with media ID` verifying `ENOTDIR` when navigating through a non-directory path component. - Retained the directory test covering `safeFile`'s `!file.isFile() -> null` path. - The test suite now passes all 12 cases. 2. **Actionable Attributed safeFile Skip Recording**: - In `src/jobs.ts`, when `safeFile` throws a whitelisted filesystem error (`ENOENT`, `EACCES`, `EISDIR`, `ENOTDIR`), the skip is attributed with its media ID and specific errno in `skippedMedia` (`safeFile: ${unsafeReason}`) under the bounded 20-entry guard, making the skip actionable in job checkpoints. 3. **Whitelist ENOTDIR**: - Expanded the whitelisted filesystem errors in `src/jobs.ts` (`safeFile` catch and `isFileError` catch) to include `ENOTDIR` alongside `ENOENT`, `EACCES`, and `EISDIR`. 4. **Attribution and Release Trace Alignment**: - Restored historical attribution in `REQUIREMENTS-TRACE.md` (SEARCH-01) to `2.7.1-dev12` for the development series changes, and added distinct coverage description for `2.7.1-rc.2 and 2.8.0-dev1` with 12 tests. - Created `acceptance/release-2.7.1.md` documenting the 2.7.1 release scope, candidate test evidence, and accepted publication. 5. **Validation Evidence**: - All 229 Node tests pass. - All 63 Python tests pass. - Full derivation build `nix build --no-link --print-build-logs .#redview` passed cleanly. - Version advanced to `2.8.0-dev2` with aligned metadata and changelog.
Address review findings: test and record safeFile fs errors, include ENOTDIR, and align trace and release acceptance
All checks were successful
Build and Push Attic Cache / build (pull_request) Successful in 43s
Branch and package checks / check (pull_request) Successful in 5s
AI pull-request review / review (pull_request) Successful in 13m14s
c8dd9c6144
clankbot left a comment

Automated code review

Reviewed commit: c8dd9c61446d31b7865f663d624968e1f13c7236

Verdict: Requires further work

Resolve the blocking or important findings and investigate failed deterministic checks before merging.

Overall assessment

The back-merge carries the 2.7.1 vectorize error-tolerance work into dev and advances the dev serial to 2.8.0-dev2 (VERSION, package.json and CHANGELOG.md agree, matching the VERSIONING.md sync-branch procedure). The skipped_media: [...skippedMedia] snapshot in vectorizeHandler (src/jobs.ts:910) is a real fix for worker.ts's deferred flush (src/worker.ts:260-263 stores the object, JSON.stringify happens in flushProgress). Two substantive issues are evidence-based: (1) the new try/catch around safeFile (src/jobs.ts:928-934) converts previously-throwing EACCES/EISDIR/ENOTDIR path faults into counted skips that never feed consecutiveErrors or error_count, so the 5-consecutive runaway guard (src/jobs.ts:956-968) no longer bounds them and a systemic folder fault now completes the job with the whole library silently skipped; (2) the acceptance record and trace claim ENOENT and the other fs faults are 'recorded ... with media IDs', but safeFile returns null for ENOENT, non-file, and outside-folder paths (src/dedup.ts:18, 24-26, 27) and the skippedMedia.push at src/jobs.ts:939 is gated on unsafeReason, which is set only when safeFile throws — the new directory-path test (tests/vectorize-error-tolerance.test.mjs:471) asserts the count but no attribution. Remaining items are documentation/version attribution and an environment-sensitive new test. Only package-checks was supplied as a passing deterministic check, so the '12 cases' and 'all suites pass' claims are unverified here.

Blocking findings

None.

Important findings

  • safeFile errno faults are now swallowed as skips that bypass the consecutive-error/runaway guard (src/jobs.ts:936; high confidence)
    The diff replaces if (!await safeFile(row)) with a try/catch (src/jobs.ts:928-934) that maps thrown ENOENT/EACCES/EISDIR/ENOTDIR to isSafe = false. In the !isSafe branch (src/jobs.ts:936-941) only skippedUnsafe++ and runUnsafeCount++ occur: consecutiveErrors is untouched and error_count is not incremented. The 5-consecutive abort, cursor rollback and skipped_unsafe_files rollback exist only inside the embedImage catch (src/jobs.ts:956-968), and runUnsafeCount is used only for that rollback, never to stop a run. safeFile (src/dedup.ts:17-31) calls realpath(row.folder_path) per row, so an unreadable gallery-folder root faults for every row. Previously the un-caught throw propagated out of the loop and failed the job.
    Impact: A systemic path fault (unreadable or unresolvable gallery folder) that previously failed the job and left the cursor intact is now swallowed per row: the job reports phase: 'complete' with skipped_unsafe_files equal to the whole pending library, no error_count, and no operator-visible stop, so media are silently left un-indexed. This also contradicts the acceptance bullet at acceptance/release-2.7.1.md:9, which states these fs errors are tolerated 'up to 4 consecutive errors'.
    Suggested fix: Feed safeFile skips into the same runaway accounting as embedImage file errors (increment consecutiveErrors in the !isSafe branch, or fail the job when realpath(row.folder_path) itself faults), and account for recorded safeFile skips in error_count so the rollback at src/jobs.ts:962-963 stays consistent with what was counted.

  • Acceptance/trace wording claims media-ID attribution for ENOENT and null-return unsafe cases that the code never records (acceptance/release-2.7.1.md:9; high confidence)
    The acceptance bullet lists tolerance of 'filesystem errors (ENOENT, EACCES, EISDIR, ENOTDIR)' and the SEARCH-01 trace row (REQUIREMENTS-TRACE.md:60) says these are recorded 'as actionable skipped_unsafe_files with media IDs'. In src/jobs.ts:939 the push is guarded by if (unsafeReason && ...), and unsafeReason is set only in the catch (src/jobs.ts:931). safeFile never throws for ENOENT — it returns null (src/dedup.ts:27) — and returns null for paths outside the folder (src/dedup.ts:18) and for non-file targets (src/dedup.ts:24-26); those cases increment skippedUnsafe with no skipped_media entry. The new test 'safeFile directory path is skipped as unsafe...' (tests/vectorize-error-tolerance.test.mjs:471) asserts skipped_unsafe_files === 1 but asserts no skipped_media attribution, unlike the EACCES/ENOTDIR tests.
    Impact: The most common unsafe conditions (missing file, directory in place of a file, path outside the enabled folder) are counted but not attributable, so the acceptance evidence overstates what an operator can review from checkpoint_json.skipped_media; the ENOENT entry in the catch list at src/jobs.ts:929 is unreachable through safeFile.
    Suggested fix: Either record the media ID for the null-return case (e.g. push error: 'safeFile: unsafe or missing path' when safeFile returns null) or restate the acceptance/trace wording so that only thrown errno faults (EACCES/EISDIR/ENOTDIR) are described as attributed with media IDs and null returns are described as counted only.

Suggestions

  • Trace attributes the ENOTDIR handling and 12-case suite to 2.8.0-dev1, which the CHANGELOG places in 2.8.0-dev2 (REQUIREMENTS-TRACE.md:60; high confidence)
    The SEARCH-01 row now reads '2.7.1-rc.2 and 2.8.0-dev1 add defensive skipped_media snapshotting ... tolerate and record safeFile filesystem errors (ENOENT/EACCES/EISDIR/ENOTDIR) ... and cover directory paths, EACCES permission faults, and ENOTDIR path errors in tests/vectorize-error-tolerance.test.mjs (12 cases)'. CHANGELOG.md attributes 'Merge 2.7.1 release corrections into dev and begin 2.8.0 development' to ## 2.8.0-dev1 and 'Address review findings: test and record safeFile fs errors, include ENOTDIR, and align trace and release acceptance' to ## 2.8.0-dev2, which is the version carried by VERSION and package.json in this change.
    Impact: The acceptance evidence cites a version that per the CHANGELOG does not contain the ENOTDIR handling or the 12-case suite, weakening the version-to-evidence alignment that VERSIONING.md and AGENTS.md require (trace evidence recorded against the candidate/commit that carries it).
    Suggested fix: Cite 2.8.0-dev2 for the ENOTDIR/12-case evidence in the SEARCH-01 row, or split the row so rc.2 evidence and the dev follow-up are attributed to the versions that actually carry them.

  • New EACCES test depends on non-root DAC enforcement and would not exercise the intended branch when run as root (tests/vectorize-error-tolerance.test.mjs:521; medium confidence)
    The test forces the EACCES path by mkdirSync(join(dir,'restricted')) plus chmodSync(subDir, 0o000) (line 521) and then asserts skipped_unsafe_files === 1, completed === 2 and a safeFile:.*EACCES reason. The fault is produced only because realpath(dirname/filepath) (src/dedup.ts:20-21) is denied traversal; a root-privileged process is not denied by mode 0o000, so safeFile would succeed, item 2 would be embedded, and the assertions would fail for reasons unrelated to the code path under test.
    Impact: The claimed 12-case coverage is environment-sensitive: a root-privileged test run would report a failure that does not reflect the changed code path, so the test does not reliably prove the EACCES branch is reached.
    Suggested fix: Make the fault independent of the effective uid (inject the fault through a mocked realpath, or skip/xfail when process.uid === 0), and state the non-root assumption in the test name or comment.

Tests and validation

  • package-checks: success

Questions

  • The 2.7.1 acceptance record lists ENOTDIR tolerance and the defensive skipped_media snapshot as accepted release scope, but CHANGELOG.md attributes 'include ENOTDIR' to the 2.8.0-dev2 commit and rc.2 only to 'tolerate safeFile fs errors'. Was the ENOTDIR handling and the 12-case suite present in the frozen 2.7.1-rc.2 candidate, or is the acceptance document citing post-freeze dev changes?
  • The acceptance bullet states fs errors are tolerated 'up to 4 consecutive errors', but the safeFile skip branch (src/jobs.ts:936-941) does not feed consecutiveErrors. Should safeFile skips count toward the 5-consecutive abort, or is unbounded safeFile skipping intended?
  • The tagger handler's report (src/jobs.ts:829) still passes skipped_media: skippedMedia by reference while the same array is mutated later (src/jobs.ts:866) and worker.ts stores the object for a later flush. Should the same snapshot be applied there, or is that path out of scope for this change?
  • The PR records 2.8.0-dev2 (VERSION, package.json, CHANGELOG) rather than 2.8.0-dev1; please confirm the intended dev serial for this back-merge plus the review-fix commit.

Review limitations

  • Only the package-checks result (nix build --no-link --print-build-logs .#redview: success) was supplied as a passing deterministic check; npm test and the Python unittest discovery results were not supplied, so the '12 cases' claim and the acceptance document's 'all Node unit tests and Python test suites pass' claim could not be verified.
  • No live encoder/GPU run, full-library completion, or sqlite-vec host evidence was supplied; the trace itself records those as open acceptance items.
  • The checked-out working tree reflects the head branch only; the release/2.7.1 branch head, the v2.7.1 tag/push, and the base dev state at 2.7.1-dev12 could not be inspected, so release-candidate versus dev attribution relies on the supplied CHANGELOG and commit messages.
  • No CI job results, MR review artifacts, or human acceptance reports beyond the untrusted PR/trace text were supplied; merge readiness is not asserted.
  • The tagger handler and other safeFile callers (src/jobs.ts:807, 850; src/similar.ts) were read only to check the changed code's dependencies; no defect is reported in that unchanged code.

Diff coverage

  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • acceptance/release-2.7.1.md: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • src/jobs.ts: reviewed — included in a context-limited batch
  • tests/vectorize-error-tolerance.test.mjs: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 5
  • Previous automated review: none found
  • Findings: 4
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `c8dd9c61446d31b7865f663d624968e1f13c7236` ## Verdict: Requires further work Resolve the blocking or important findings and investigate failed deterministic checks before merging. ### Overall assessment The back-merge carries the 2.7.1 vectorize error-tolerance work into dev and advances the dev serial to 2.8.0-dev2 (VERSION, package.json and CHANGELOG.md agree, matching the VERSIONING.md sync-branch procedure). The `skipped_media: [...skippedMedia]` snapshot in vectorizeHandler (src/jobs.ts:910) is a real fix for worker.ts's deferred flush (src/worker.ts:260-263 stores the object, JSON.stringify happens in flushProgress). Two substantive issues are evidence-based: (1) the new try/catch around `safeFile` (src/jobs.ts:928-934) converts previously-throwing EACCES/EISDIR/ENOTDIR path faults into counted skips that never feed `consecutiveErrors` or `error_count`, so the 5-consecutive runaway guard (src/jobs.ts:956-968) no longer bounds them and a systemic folder fault now completes the job with the whole library silently skipped; (2) the acceptance record and trace claim ENOENT and the other fs faults are 'recorded ... with media IDs', but `safeFile` returns null for ENOENT, non-file, and outside-folder paths (src/dedup.ts:18, 24-26, 27) and the `skippedMedia.push` at src/jobs.ts:939 is gated on `unsafeReason`, which is set only when safeFile throws — the new directory-path test (tests/vectorize-error-tolerance.test.mjs:471) asserts the count but no attribution. Remaining items are documentation/version attribution and an environment-sensitive new test. Only `package-checks` was supplied as a passing deterministic check, so the '12 cases' and 'all suites pass' claims are unverified here. ### Blocking findings None. ### Important findings - **safeFile errno faults are now swallowed as skips that bypass the consecutive-error/runaway guard** (src/jobs.ts:936; high confidence) The diff replaces `if (!await safeFile(row))` with a try/catch (src/jobs.ts:928-934) that maps thrown ENOENT/EACCES/EISDIR/ENOTDIR to `isSafe = false`. In the `!isSafe` branch (src/jobs.ts:936-941) only `skippedUnsafe++` and `runUnsafeCount++` occur: `consecutiveErrors` is untouched and `error_count` is not incremented. The 5-consecutive abort, cursor rollback and `skipped_unsafe_files` rollback exist only inside the `embedImage` catch (src/jobs.ts:956-968), and `runUnsafeCount` is used only for that rollback, never to stop a run. `safeFile` (src/dedup.ts:17-31) calls `realpath(row.folder_path)` per row, so an unreadable gallery-folder root faults for every row. Previously the un-caught throw propagated out of the loop and failed the job. Impact: A systemic path fault (unreadable or unresolvable gallery folder) that previously failed the job and left the cursor intact is now swallowed per row: the job reports `phase: 'complete'` with `skipped_unsafe_files` equal to the whole pending library, no `error_count`, and no operator-visible stop, so media are silently left un-indexed. This also contradicts the acceptance bullet at acceptance/release-2.7.1.md:9, which states these fs errors are tolerated 'up to 4 consecutive errors'. Suggested fix: Feed safeFile skips into the same runaway accounting as embedImage file errors (increment `consecutiveErrors` in the `!isSafe` branch, or fail the job when `realpath(row.folder_path)` itself faults), and account for recorded safeFile skips in `error_count` so the rollback at src/jobs.ts:962-963 stays consistent with what was counted. - **Acceptance/trace wording claims media-ID attribution for ENOENT and null-return unsafe cases that the code never records** (acceptance/release-2.7.1.md:9; high confidence) The acceptance bullet lists tolerance of 'filesystem errors (ENOENT, EACCES, EISDIR, ENOTDIR)' and the SEARCH-01 trace row (REQUIREMENTS-TRACE.md:60) says these are recorded 'as actionable skipped_unsafe_files with media IDs'. In src/jobs.ts:939 the push is guarded by `if (unsafeReason && ...)`, and `unsafeReason` is set only in the catch (src/jobs.ts:931). `safeFile` never throws for ENOENT — it returns null (src/dedup.ts:27) — and returns null for paths outside the folder (src/dedup.ts:18) and for non-file targets (src/dedup.ts:24-26); those cases increment `skippedUnsafe` with no `skipped_media` entry. The new test 'safeFile directory path is skipped as unsafe...' (tests/vectorize-error-tolerance.test.mjs:471) asserts `skipped_unsafe_files === 1` but asserts no `skipped_media` attribution, unlike the EACCES/ENOTDIR tests. Impact: The most common unsafe conditions (missing file, directory in place of a file, path outside the enabled folder) are counted but not attributable, so the acceptance evidence overstates what an operator can review from `checkpoint_json.skipped_media`; the `ENOENT` entry in the catch list at src/jobs.ts:929 is unreachable through `safeFile`. Suggested fix: Either record the media ID for the null-return case (e.g. push `error: 'safeFile: unsafe or missing path'` when `safeFile` returns null) or restate the acceptance/trace wording so that only thrown errno faults (EACCES/EISDIR/ENOTDIR) are described as attributed with media IDs and null returns are described as counted only. ### Suggestions - **Trace attributes the ENOTDIR handling and 12-case suite to 2.8.0-dev1, which the CHANGELOG places in 2.8.0-dev2** (REQUIREMENTS-TRACE.md:60; high confidence) The SEARCH-01 row now reads '2.7.1-rc.2 and 2.8.0-dev1 add defensive skipped_media snapshotting ... tolerate and record safeFile filesystem errors (ENOENT/EACCES/EISDIR/ENOTDIR) ... and cover directory paths, EACCES permission faults, and ENOTDIR path errors in tests/vectorize-error-tolerance.test.mjs (12 cases)'. CHANGELOG.md attributes 'Merge 2.7.1 release corrections into dev and begin 2.8.0 development' to `## 2.8.0-dev1` and 'Address review findings: test and record safeFile fs errors, include ENOTDIR, and align trace and release acceptance' to `## 2.8.0-dev2`, which is the version carried by VERSION and package.json in this change. Impact: The acceptance evidence cites a version that per the CHANGELOG does not contain the ENOTDIR handling or the 12-case suite, weakening the version-to-evidence alignment that VERSIONING.md and AGENTS.md require (trace evidence recorded against the candidate/commit that carries it). Suggested fix: Cite 2.8.0-dev2 for the ENOTDIR/12-case evidence in the SEARCH-01 row, or split the row so rc.2 evidence and the dev follow-up are attributed to the versions that actually carry them. - **New EACCES test depends on non-root DAC enforcement and would not exercise the intended branch when run as root** (tests/vectorize-error-tolerance.test.mjs:521; medium confidence) The test forces the EACCES path by `mkdirSync(join(dir,'restricted'))` plus `chmodSync(subDir, 0o000)` (line 521) and then asserts `skipped_unsafe_files === 1`, `completed === 2` and a `safeFile:.*EACCES` reason. The fault is produced only because `realpath(dirname/filepath)` (src/dedup.ts:20-21) is denied traversal; a root-privileged process is not denied by mode 0o000, so `safeFile` would succeed, item 2 would be embedded, and the assertions would fail for reasons unrelated to the code path under test. Impact: The claimed 12-case coverage is environment-sensitive: a root-privileged test run would report a failure that does not reflect the changed code path, so the test does not reliably prove the EACCES branch is reached. Suggested fix: Make the fault independent of the effective uid (inject the fault through a mocked `realpath`, or skip/xfail when `process.uid === 0`), and state the non-root assumption in the test name or comment. ### Tests and validation - package-checks: **success** ### Questions - The 2.7.1 acceptance record lists ENOTDIR tolerance and the defensive skipped_media snapshot as accepted release scope, but CHANGELOG.md attributes 'include ENOTDIR' to the 2.8.0-dev2 commit and rc.2 only to 'tolerate safeFile fs errors'. Was the ENOTDIR handling and the 12-case suite present in the frozen 2.7.1-rc.2 candidate, or is the acceptance document citing post-freeze dev changes? - The acceptance bullet states fs errors are tolerated 'up to 4 consecutive errors', but the safeFile skip branch (src/jobs.ts:936-941) does not feed `consecutiveErrors`. Should safeFile skips count toward the 5-consecutive abort, or is unbounded safeFile skipping intended? - The tagger handler's `report` (src/jobs.ts:829) still passes `skipped_media: skippedMedia` by reference while the same array is mutated later (src/jobs.ts:866) and worker.ts stores the object for a later flush. Should the same snapshot be applied there, or is that path out of scope for this change? - The PR records 2.8.0-dev2 (VERSION, package.json, CHANGELOG) rather than 2.8.0-dev1; please confirm the intended dev serial for this back-merge plus the review-fix commit. ### Review limitations - Only the `package-checks` result (nix build --no-link --print-build-logs .#redview: success) was supplied as a passing deterministic check; `npm test` and the Python unittest discovery results were not supplied, so the '12 cases' claim and the acceptance document's 'all Node unit tests and Python test suites pass' claim could not be verified. - No live encoder/GPU run, full-library completion, or sqlite-vec host evidence was supplied; the trace itself records those as open acceptance items. - The checked-out working tree reflects the head branch only; the release/2.7.1 branch head, the v2.7.1 tag/push, and the base dev state at 2.7.1-dev12 could not be inspected, so release-candidate versus dev attribution relies on the supplied CHANGELOG and commit messages. - No CI job results, MR review artifacts, or human acceptance reports beyond the untrusted PR/trace text were supplied; merge readiness is not asserted. - The tagger handler and other `safeFile` callers (src/jobs.ts:807, 850; src/similar.ts) were read only to check the changed code's dependencies; no defect is reported in that unchanged code. ### Diff coverage - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `acceptance/release-2.7.1.md`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `src/jobs.ts`: **reviewed** — included in a context-limited batch - `tests/vectorize-error-tolerance.test.mjs`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 5 - Previous automated review: none found - Findings: 4 </details>
Author
Owner

Review Follow-up (Review ID 116)

Addressed all findings and suggestions reported in Review ID 116:

  1. Feed safeFile Skips into 5-Consecutive Error Runaway Abort Guard:

    • In src/jobs.ts (vectorizeHandler), !isSafe skips now increment consecutiveErrors++ and trigger the 5-consecutive file error abort guard with cursor and skipped_unsafe_files rollback, preventing silent runaway skipping of unmounted storage or unreadable folder trees.
    • Added 5 consecutive safeFile failures abort the job to prevent runaway skipping of unmounted storage to tests/vectorize-error-tolerance.test.mjs, verifying rollback of cursor and skipped_unsafe_files.
  2. Attributed Media ID Recording for All Unsafe Skips:

    • When safeFile returns null or throws, skippedMedia records { media_id: row.id, error: 'safeFile: ${unsafeReason ?? "unsafe or missing path"}' } under the 20-entry bound.
    • Updated directory-path test in tests/vectorize-error-tolerance.test.mjs to assert attribution of media ID and reason in skipped_media.
  3. Trace and Acceptance Attribution Alignment:

    • acceptance/release-2.7.1.md: Restored the accepted release scope to (ENOENT, EACCES, EISDIR) matching the frozen 2.7.1 candidate.
    • REQUIREMENTS-TRACE.md: Specifically cited 2.7.1-rc.2 for snapshotting and initial fs tolerance, and attributed 2.8.0-dev2 and dev3 for ENOTDIR tolerance, safeFile consecutive abort guard, full skipped_media attribution, and the 13 test cases.
  4. Environment-Insensitive EACCES Test:

    • Added skip condition { skip: Boolean(process.getuid && process.getuid() === 0) ? 'Root user bypasses 0o000 DAC permissions' : false } for the EACCES test.
  5. Tagger Handler Defensive Snapshotting:

    • Applied defensive array snapshotting skipped_media: [...skippedMedia] in tagHandler (src/jobs.ts:829) matching vectorizeHandler.
  6. Validation Evidence:

    • All 231 Node tests passed (all 13 cases in tests/vectorize-error-tolerance.test.mjs).
    • All 63 Python tests passed.
    • Package build and derivation check nix build --no-link --print-build-logs .#redview passed cleanly.
    • Version advanced to 2.8.0-dev3 with aligned package metadata and changelog.
### Review Follow-up (Review ID 116) Addressed all findings and suggestions reported in Review ID 116: 1. **Feed safeFile Skips into 5-Consecutive Error Runaway Abort Guard**: - In `src/jobs.ts` (`vectorizeHandler`), `!isSafe` skips now increment `consecutiveErrors++` and trigger the 5-consecutive file error abort guard with cursor and `skipped_unsafe_files` rollback, preventing silent runaway skipping of unmounted storage or unreadable folder trees. - Added `5 consecutive safeFile failures abort the job to prevent runaway skipping of unmounted storage` to `tests/vectorize-error-tolerance.test.mjs`, verifying rollback of cursor and `skipped_unsafe_files`. 2. **Attributed Media ID Recording for All Unsafe Skips**: - When `safeFile` returns `null` or throws, `skippedMedia` records `{ media_id: row.id, error: 'safeFile: ${unsafeReason ?? "unsafe or missing path"}' }` under the 20-entry bound. - Updated directory-path test in `tests/vectorize-error-tolerance.test.mjs` to assert attribution of media ID and reason in `skipped_media`. 3. **Trace and Acceptance Attribution Alignment**: - `acceptance/release-2.7.1.md`: Restored the accepted release scope to `(ENOENT, EACCES, EISDIR)` matching the frozen 2.7.1 candidate. - `REQUIREMENTS-TRACE.md`: Specifically cited `2.7.1-rc.2` for snapshotting and initial fs tolerance, and attributed `2.8.0-dev2 and dev3` for `ENOTDIR` tolerance, safeFile consecutive abort guard, full `skipped_media` attribution, and the 13 test cases. 4. **Environment-Insensitive EACCES Test**: - Added skip condition `{ skip: Boolean(process.getuid && process.getuid() === 0) ? 'Root user bypasses 0o000 DAC permissions' : false }` for the EACCES test. 5. **Tagger Handler Defensive Snapshotting**: - Applied defensive array snapshotting `skipped_media: [...skippedMedia]` in `tagHandler` (src/jobs.ts:829) matching `vectorizeHandler`. 6. **Validation Evidence**: - All 231 Node tests passed (all 13 cases in `tests/vectorize-error-tolerance.test.mjs`). - All 63 Python tests passed. - Package build and derivation check `nix build --no-link --print-build-logs .#redview` passed cleanly. - Version advanced to `2.8.0-dev3` with aligned package metadata and changelog.
Address review round 2: feed safeFile skips to consecutive error abort, record all unsafe media, and align trace and acceptance
All checks were successful
Branch and package checks / check (pull_request) Successful in 38s
Build and Push Attic Cache / build (pull_request) Successful in 40s
AI pull-request review / review (pull_request) Successful in 13m5s
1dd75bd649
clankbot left a comment

Automated code review

Reviewed commit: 1dd75bd649f4b0944c7d3062e78775a858badf7d

Verdict: Requires further work

Resolve the blocking or important findings and investigate failed deterministic checks before merging.

Overall assessment

Back-merge of the accepted 2.7.1 release into dev plus continued development to 2.8.0-dev3. Metadata is internally consistent (VERSION, package.json and the top CHANGELOG heading all read 2.8.0-dev3; the changelog keeps the release/rc entries and the dev serials in descending order, matching VERSIONING.md's 'every completed development update advances -devN' and 'begin a new target after publishing'). The vectorize changes are self-consistent: safeFile errno rejections (ENOENT/EACCES/EISDIR/ENOTDIR) are converted to recorded skips, the run anchors (run_start_cursor/index, run_error_count, run_unsafe_count) and skipped_media are truncated/rolled back coherently in both the safeFile and encoder-error abort paths, error_count is decremented only by the amount actually incremented in that path, and the shallow array copies in tagHandler/vectorizeHandler match worker.ts, which stores the reported object as pendingCheckpoint and serializes it later in flushProgress. The 13 test cases in tests/vectorize-error-tolerance.test.mjs match the count claimed in REQUIREMENTS-TRACE.md, and the pre-existing 'unsafe-file skips do not reset consecutive encoder errors' case still reaches the 5-consecutive abort under the new counting. One behavioural change conflicts with the recorded SEARCH-01 acceptance baseline; the rest are coverage/documentation observations.

Blocking findings

None.

Important findings

  • safeFile rejections now feed the 5-consecutive runaway guard, so structurally unsafe paths fail the vectorize job (src/jobs.ts:943; medium confidence)
    src/jobs.ts:936-958: the new skip branch increments consecutiveErrors for every unsafe row - including the non-throwing containment/non-file case, which yields reason = 'unsafe or missing path' - and at 5 it rolls the cursor back to runStartCursor and throws, which worker.ts:307-309 turns into a failed job. The diff shows this consecutiveErrors++ and the abort block are added by this change (previously the branch only did skippedUnsafe++; runUnsafeCount++; cursor = row.id; continue;). tests/vectorize-error-tolerance.test.mjs:605 asserts the job now rejects for five consecutive missing/unsafe rows. REQUIREMENTS.md:72 (SEARCH-01 acceptance baseline) states the job must index media 'skipping unsafe or non-file paths'.
    Impact: A library with five consecutive media whose paths are legitimately outside their gallery folder, are non-files, or whose folder no longer resolves now fails the vectorize job and requires operator re-invocation instead of completing with recorded skips; on resume the cursor is rewound to runStartCursor, so the same five rows fail again and the index cannot advance past them without manual intervention. This is a behaviour change relative to the recorded SEARCH-01 baseline, not just to the 2.7.1 candidate.
    Suggested fix: Confirm this is intended and record the deviation from the SEARCH-01 'skipping unsafe or non-file paths' baseline in REQUIREMENTS-TRACE.md; otherwise distinguish the two classes already available in the code - keep skipping structural rejections (safeFile returned null via inside()/isFile(), i.e. unsafeReason === null) and apply the 5-consecutive runaway guard only to the errno class captured in unsafeReason.

Suggestions

  • Claimed EACCES coverage is skipped when the suite runs as uid 0 (tests/vectorize-error-tolerance.test.mjs:514; medium confidence)
    tests/vectorize-error-tolerance.test.mjs:514 test('safeFile filesystem errors (EACCES) ...', { skip: Boolean(process.getuid && process.getuid() === 0) ? 'Root user bypasses 0o000 DAC permissions' : false }, ...). REQUIREMENTS-TRACE.md:60 states the 13 cases 'cover directory paths, EACCES permission faults, ENOTDIR path errors, and safeFile runaway abort'. A skipped case still counts toward the 13 and reports as passing.
    Impact: In a root/CI environment the EACCES branch of the new errno whitelist in src/jobs.ts:929 is never exercised, so the trace's EACCES coverage claim is not backed by an executed assertion there; the whitelist's EACCES arm is only demonstrated on non-root hosts.
    Suggested fix: Note the uid dependency in the trace wording, or force the condition without depending on DAC permissions (e.g. inject a faulting safeFile through a mocked folder_path, or run the case under a non-privileged uid) so the EACCES arm is exercised in the same environment the gates run in.

Tests and validation

  • package-checks: success

Questions

  • The stated objective names 2.8.0-dev1 as the provisional target, but the head carries 2.8.0-dev3 with two additional dev entries that also change src/jobs.ts and add four tests. Are those two extra serials intended to be part of this back-merge PR rather than follow-up work branches?
  • Should the same errno tolerance and snapshot conventions established in vectorizeHandler be applied to the other handlers in src/jobs.ts? tagHandler:850 still calls await safeFile(row) unguarded (dedup.ts:17-31 rethrows every errno except ENOENT), and purgeHandler:640 passes its in-place-mutated failures array to reportProgress by reference while worker.ts:262 stores it and flushProgress serializes it later. Both are unchanged code, so they are not reported as findings, but the change makes the two heavy-media paths disagree about what a safeFile failure means.
  • Should acceptance/release-2.7.1.md - added at dev head - be annotated as describing the frozen 2.7.1-rc.2 candidate only, since the merged head additionally tolerates ENOTDIR and feeds safeFile skips into the runaway abort?

Review limitations

  • Only the supplied diff, the checked-out tree, and the documents named in it were available; no PR discussion, branch history, CI logs, or live/scale acceptance runs were accessible, so 'package-checks: success' is taken as supplied rather than verified.
  • No repository code was executed and no files were edited; the 13 test cases and the version/metadata alignment were read from the files, not run.
  • Open acceptance items named in REQUIREMENTS-TRACE.md and acceptance/release-2.7.1.md (real full-library completion, sqlite-vec host acceptance, production deployment) were not evaluated.
  • Behaviour of code outside the supplied diff (e.g. tagHandler, purgeHandler, similar.ts, dedup.ts) was read from the checkout for context only; no defect is claimed for it.

Diff coverage

  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • acceptance/release-2.7.1.md: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • src/jobs.ts: reviewed — included in a context-limited batch
  • tests/vectorize-error-tolerance.test.mjs: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 6
  • Previous automated review: none found
  • Findings: 2
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `1dd75bd649f4b0944c7d3062e78775a858badf7d` ## Verdict: Requires further work Resolve the blocking or important findings and investigate failed deterministic checks before merging. ### Overall assessment Back-merge of the accepted 2.7.1 release into dev plus continued development to 2.8.0-dev3. Metadata is internally consistent (VERSION, package.json and the top CHANGELOG heading all read 2.8.0-dev3; the changelog keeps the release/rc entries and the dev serials in descending order, matching VERSIONING.md's 'every completed development update advances -devN' and 'begin a new target after publishing'). The vectorize changes are self-consistent: safeFile errno rejections (ENOENT/EACCES/EISDIR/ENOTDIR) are converted to recorded skips, the run anchors (run_start_cursor/index, run_error_count, run_unsafe_count) and skipped_media are truncated/rolled back coherently in both the safeFile and encoder-error abort paths, error_count is decremented only by the amount actually incremented in that path, and the shallow array copies in tagHandler/vectorizeHandler match worker.ts, which stores the reported object as pendingCheckpoint and serializes it later in flushProgress. The 13 test cases in tests/vectorize-error-tolerance.test.mjs match the count claimed in REQUIREMENTS-TRACE.md, and the pre-existing 'unsafe-file skips do not reset consecutive encoder errors' case still reaches the 5-consecutive abort under the new counting. One behavioural change conflicts with the recorded SEARCH-01 acceptance baseline; the rest are coverage/documentation observations. ### Blocking findings None. ### Important findings - **safeFile rejections now feed the 5-consecutive runaway guard, so structurally unsafe paths fail the vectorize job** (src/jobs.ts:943; medium confidence) src/jobs.ts:936-958: the new skip branch increments consecutiveErrors for every unsafe row - including the non-throwing containment/non-file case, which yields `reason = 'unsafe or missing path'` - and at 5 it rolls the cursor back to runStartCursor and throws, which worker.ts:307-309 turns into a failed job. The diff shows this `consecutiveErrors++` and the abort block are added by this change (previously the branch only did `skippedUnsafe++; runUnsafeCount++; cursor = row.id; continue;`). tests/vectorize-error-tolerance.test.mjs:605 asserts the job now rejects for five consecutive missing/unsafe rows. REQUIREMENTS.md:72 (SEARCH-01 acceptance baseline) states the job must index media 'skipping unsafe or non-file paths'. Impact: A library with five consecutive media whose paths are legitimately outside their gallery folder, are non-files, or whose folder no longer resolves now fails the vectorize job and requires operator re-invocation instead of completing with recorded skips; on resume the cursor is rewound to runStartCursor, so the same five rows fail again and the index cannot advance past them without manual intervention. This is a behaviour change relative to the recorded SEARCH-01 baseline, not just to the 2.7.1 candidate. Suggested fix: Confirm this is intended and record the deviation from the SEARCH-01 'skipping unsafe or non-file paths' baseline in REQUIREMENTS-TRACE.md; otherwise distinguish the two classes already available in the code - keep skipping structural rejections (safeFile returned null via inside()/isFile(), i.e. unsafeReason === null) and apply the 5-consecutive runaway guard only to the errno class captured in unsafeReason. ### Suggestions - **Claimed EACCES coverage is skipped when the suite runs as uid 0** (tests/vectorize-error-tolerance.test.mjs:514; medium confidence) tests/vectorize-error-tolerance.test.mjs:514 `test('safeFile filesystem errors (EACCES) ...', { skip: Boolean(process.getuid && process.getuid() === 0) ? 'Root user bypasses 0o000 DAC permissions' : false }, ...)`. REQUIREMENTS-TRACE.md:60 states the 13 cases 'cover directory paths, EACCES permission faults, ENOTDIR path errors, and safeFile runaway abort'. A skipped case still counts toward the 13 and reports as passing. Impact: In a root/CI environment the EACCES branch of the new errno whitelist in src/jobs.ts:929 is never exercised, so the trace's EACCES coverage claim is not backed by an executed assertion there; the whitelist's EACCES arm is only demonstrated on non-root hosts. Suggested fix: Note the uid dependency in the trace wording, or force the condition without depending on DAC permissions (e.g. inject a faulting safeFile through a mocked folder_path, or run the case under a non-privileged uid) so the EACCES arm is exercised in the same environment the gates run in. ### Tests and validation - package-checks: **success** ### Questions - The stated objective names 2.8.0-dev1 as the provisional target, but the head carries 2.8.0-dev3 with two additional dev entries that also change src/jobs.ts and add four tests. Are those two extra serials intended to be part of this back-merge PR rather than follow-up work branches? - Should the same errno tolerance and snapshot conventions established in vectorizeHandler be applied to the other handlers in src/jobs.ts? tagHandler:850 still calls `await safeFile(row)` unguarded (dedup.ts:17-31 rethrows every errno except ENOENT), and purgeHandler:640 passes its in-place-mutated `failures` array to reportProgress by reference while worker.ts:262 stores it and flushProgress serializes it later. Both are unchanged code, so they are not reported as findings, but the change makes the two heavy-media paths disagree about what a safeFile failure means. - Should acceptance/release-2.7.1.md - added at dev head - be annotated as describing the frozen 2.7.1-rc.2 candidate only, since the merged head additionally tolerates ENOTDIR and feeds safeFile skips into the runaway abort? ### Review limitations - Only the supplied diff, the checked-out tree, and the documents named in it were available; no PR discussion, branch history, CI logs, or live/scale acceptance runs were accessible, so 'package-checks: success' is taken as supplied rather than verified. - No repository code was executed and no files were edited; the 13 test cases and the version/metadata alignment were read from the files, not run. - Open acceptance items named in REQUIREMENTS-TRACE.md and acceptance/release-2.7.1.md (real full-library completion, sqlite-vec host acceptance, production deployment) were not evaluated. - Behaviour of code outside the supplied diff (e.g. tagHandler, purgeHandler, similar.ts, dedup.ts) was read from the checkout for context only; no defect is claimed for it. ### Diff coverage - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `acceptance/release-2.7.1.md`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `src/jobs.ts`: **reviewed** — included in a context-limited batch - `tests/vectorize-error-tolerance.test.mjs`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 6 - Previous automated review: none found - Findings: 2 </details>
Author
Owner

Review Feedback Response — Round 3 (Commit 88d2350)

Responding to automated review (Review ID 118):

1. Differentiate structural missing/non-file skips from thrown filesystem errnos

  • Resolution: In src/jobs.ts (vectorizeHandler), the consecutiveErrors++ counter and 5-consecutive runaway abort guard are now gated behind if (unsafeReason).
    • When safeFile returns null (unsafeReason === null), the item is recorded in skipped_media as safeFile: unsafe or missing path and incremented in skipped_unsafe_files, but consecutiveErrors is not incremented. This preserves the SEARCH-01 baseline where missing files or rejected path bounds in an existing media table are safely skipped without aborting the job.
    • When safeFile throws a trapped filesystem errno (unsafeReason !== null, e.g. EACCES, ENOTDIR, EISDIR), consecutiveErrors increments. If 5 consecutive actionable filesystem errors occur, the job aborts and rolls back cursor, error count, and skipped_unsafe_files to the run anchor.

2. Test coverage

  • Updated tests/vectorize-error-tolerance.test.mjs (now 14 tests total):
    • Added test verifying 5 consecutive structural missing-file skips continue without aborting and complete the job (completed: 0, skipped_unsafe_files: 6, phase: complete).
    • Added test verifying 5 consecutive thrown errno faults (ENOTDIR) trigger the runaway abort and roll back skipped_unsafe_files.

3. Trace and Documentation

  • Updated REQUIREMENTS-TRACE.md under SEARCH-01 to document 2.8.0-dev4, 14 test cases, preservation of structural skip baseline without incrementing consecutiveErrors, and note non-root DAC requirement for permission testing.
  • Bumped version to 2.8.0-dev4 via scripts/version.py bump fix.

Evidence

  • npm test: 232 tests passed (0 failures).
  • Python test suite: 63 tests passed (0 failures).
  • Nix package check (nix build --no-link --print-build-logs .#redview): succeeded with all Node and Python test checks passing.
### Review Feedback Response — Round 3 (Commit `88d2350`) Responding to automated review (Review ID 118): #### 1. Differentiate structural missing/non-file skips from thrown filesystem errnos - **Resolution**: In `src/jobs.ts` (`vectorizeHandler`), the `consecutiveErrors++` counter and 5-consecutive runaway abort guard are now gated behind `if (unsafeReason)`. - When `safeFile` returns `null` (`unsafeReason === null`), the item is recorded in `skipped_media` as `safeFile: unsafe or missing path` and incremented in `skipped_unsafe_files`, but `consecutiveErrors` is **not** incremented. This preserves the SEARCH-01 baseline where missing files or rejected path bounds in an existing media table are safely skipped without aborting the job. - When `safeFile` throws a trapped filesystem errno (`unsafeReason !== null`, e.g. `EACCES`, `ENOTDIR`, `EISDIR`), `consecutiveErrors` increments. If 5 consecutive actionable filesystem errors occur, the job aborts and rolls back cursor, error count, and `skipped_unsafe_files` to the run anchor. #### 2. Test coverage - Updated `tests/vectorize-error-tolerance.test.mjs` (now 14 tests total): - Added test verifying 5 consecutive structural missing-file skips continue without aborting and complete the job (`completed: 0, skipped_unsafe_files: 6, phase: complete`). - Added test verifying 5 consecutive thrown errno faults (`ENOTDIR`) trigger the runaway abort and roll back `skipped_unsafe_files`. #### 3. Trace and Documentation - Updated `REQUIREMENTS-TRACE.md` under `SEARCH-01` to document `2.8.0-dev4`, 14 test cases, preservation of structural skip baseline without incrementing consecutiveErrors, and note non-root DAC requirement for permission testing. - Bumped version to `2.8.0-dev4` via `scripts/version.py bump fix`. #### Evidence - `npm test`: 232 tests passed (0 failures). - Python test suite: 63 tests passed (0 failures). - Nix package check (`nix build --no-link --print-build-logs .#redview`): succeeded with all Node and Python test checks passing.
Address review round 3: gate consecutive error abort on thrown safeFile errnos and preserve structural skip baseline
All checks were successful
Build and Push Attic Cache / build (pull_request) Successful in 46s
Branch and package checks / check (pull_request) Successful in 6s
AI pull-request review / review (pull_request) Successful in 14m42s
88d23506f9
clankbot left a comment

Automated code review

Reviewed commit: 88d23506f95f4e0cb7ce6815aea387520968f1b9

Verdict: Ready to merge

No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.

Overall assessment

Back-merge of the accepted 2.7.1 corrections into dev plus three review-round fix bumps to 2.8.0-dev4. Version metadata is internally consistent: VERSION, package.json and the CHANGELOG head all read 2.8.0-dev4, which satisfies scripts/version.py:129 check_alignment (VERSION == package.json, CHANGELOG contains '## 2.8.0-dev4'), and the entry categories used ('development', 'release', 'candidate', 'fix') are exactly the kinds scripts/version.py:121 write_version emits for develop/promote/candidate/bump. The src/jobs.ts change is arithmetically coherent: the new safeFile try/catch (src/jobs.ts:927-935) converts only whitelisted errnos into unsafe skips and re-throws everything else; structural (safeFile-returned-null) skips keep the pre-2.7.1 baseline by incrementing skippedUnsafe/runUnsafeCount without touching consecutiveErrors, while thrown-errno skips increment consecutiveErrors and gate the 5-consecutive abort. The rollback in that branch (cursor -> runStartCursor, error_count -= runErrorCount, skippedUnsafe -= runUnsafeCount, skippedMedia.splice(runStartIndex)) stays consistent because runErrorCount is incremented only on the path that increments error_count (src/jobs.ts:999-1000), and the guard if (runErrorCount > 0) correctly skips a no-op decrement for pure safeFile runs. The five new tests match the fixture semantics: setupFixture writes real 1..3.jpg, so dir/1.jpg/nested-*.jpg raises ENOTDIR from realpath (src/dedup.ts:24) and a 0o000 parent raises EACCES from realpath (src/dedup.ts:25); safeFile's internal ENOENT catch (src/dedup.ts:26) is what makes the 6-missing-file test take the structural, non-aborting path. acceptance/release-2.7.1.md follows the existing acceptance/release-.md convention. I found no blocking or important defect in the supplied changes; the remaining finding is a documentation-accuracy correction in the trace row.

Blocking findings

None.

Important findings

None.

Suggestions

  • SEARCH-01 trace wording claims skipped_media records 'all unsafe skips', but the code caps the list at 20 entries and labels structural skips without an errno (REQUIREMENTS-TRACE.md:60; high confidence)
    The updated SEARCH-01 evidence text states that 2.8.0-dev2..dev4 'record actionable skipped_media entries for all unsafe skips'. The changed code at src/jobs.ts:940 pushes only if (skippedMedia.length < 20), and src/jobs.ts:939 sets const reason = unsafeReason ?? 'unsafe or missing path', so a structural (safeFile-returned-null) skip is recorded with a generic string that carries no errno. The same 20-entry bound is already documented for purge jobs in README.md:128 ('retains up to 20 file errors').
    Impact: A reader following the trace would conclude every unsafe skip is individually attributed, whereas past 20 unsafe skips only the aggregate skipped_unsafe_files counter is retained, and missing-path skips carry no cause. The trace is the review record used to judge acceptance, so an over-stated attribution claim weakens the evidence for the SEARCH-01 row.
    Suggested fix: Qualify the wording, e.g. 'record actionable skipped_media entries for unsafe skips up to the existing 20-entry checkpoint bound, with errno causes only for thrown safeFile errnos (structural missing-path skips keep the generic "unsafe or missing path" label)'.

Tests and validation

  • package-checks: success

Questions

  • Should safeFile-thrown errno skips also increment the job's error_count? The changed branch at src/jobs.ts:936-963 increments consecutiveErrors and skippedUnsafe but never issues the UPDATE jobs SET error_count = error_count + 1 that the embedImage path performs at src/jobs.ts:1000, so a run aborted by five safeFile errnos reports error_count 0 while the 5-consecutive abort test (tests/vectorize-error-tolerance.test.mjs:650) asserts skipped_unsafe_files and consecutive_errors are rolled back to 0. Is under-counting file errors in job status intentional?
  • Should the ENOENT entry in the new whitelist at src/jobs.ts:931 be there at all? src/dedup.ts:26 already converts ENOENT to a null return, so safeFile cannot throw ENOENT; the entry is only reachable via the separate embedImage whitelist at src/jobs.ts:975. Confirm this is deliberate (i.e. missing files must stay on the non-aborting structural path) rather an attempt to make missing files count toward the runaway guard.
  • The PR objective text refers to advancing to 2.8.0-dev1 while VERSION, package.json and the CHANGELOG head are 2.8.0-dev4; confirming the head value is intended (three review-round fix bumps) would settle this, since check_alignment only requires the three files to agree.
  • acceptance/release-2.7.1.md states the 2.7.1 candidate tolerates 'filesystem errors (ENOENT, EACCES, EISDIR)' and aborts 'up to 4 consecutive errors'. That describes the frozen release-branch code, which is not in the supplied tree; please confirm the candidate's behaviour matches, since the dev code now also tolerates ENOTDIR and gates the abort on thrown errnos only.

Review limitations

  • I did not execute repository code or tests, so the trace claim that tests/vectorize-error-tolerance.test.mjs passes 14 cases is unverified here; I only confirmed the file contains 14 test( registrations and that their fixture setup is consistent with src/dedup.ts safeFile behaviour.
  • The 2.7.1 / 2.7.1-rc.2 release-branch code was not supplied, so statements in acceptance/release-2.7.1.md and in the trace about that candidate's behaviour cannot be checked against code; I inspected only the dev tree at 2.8.0-dev4.
  • No CI or test-run output was supplied; I cannot confirm the Node/Python suites, the version.py check gate, or the Nix package checks pass at this head.
  • The EACCES test at tests/vectorize-error-tolerance.test.mjs:514 self-skips when process.getuid() === 0; no supplied evidence shows the uid under which the suite ran, so I cannot state whether that case actually executed in the recorded gate.
  • I did not evaluate the open acceptance items the trace still records (real full-library completion, absent sqlite-vec host, production deployment), nor anything outside the changed files and the checked-out tree.

Diff coverage

  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • acceptance/release-2.7.1.md: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • src/jobs.ts: reviewed — included in a context-limited batch
  • tests/vectorize-error-tolerance.test.mjs: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 7
  • Previous automated review: none found
  • Findings: 1
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `88d23506f95f4e0cb7ce6815aea387520968f1b9` ## Verdict: Ready to merge No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory. ### Overall assessment Back-merge of the accepted 2.7.1 corrections into dev plus three review-round fix bumps to 2.8.0-dev4. Version metadata is internally consistent: VERSION, package.json and the CHANGELOG head all read 2.8.0-dev4, which satisfies scripts/version.py:129 check_alignment (VERSION == package.json, CHANGELOG contains '## 2.8.0-dev4'), and the entry categories used ('development', 'release', 'candidate', 'fix') are exactly the kinds scripts/version.py:121 write_version emits for develop/promote/candidate/bump. The src/jobs.ts change is arithmetically coherent: the new safeFile try/catch (src/jobs.ts:927-935) converts only whitelisted errnos into unsafe skips and re-throws everything else; structural (safeFile-returned-null) skips keep the pre-2.7.1 baseline by incrementing skippedUnsafe/runUnsafeCount without touching consecutiveErrors, while thrown-errno skips increment consecutiveErrors and gate the 5-consecutive abort. The rollback in that branch (cursor -> runStartCursor, error_count -= runErrorCount, skippedUnsafe -= runUnsafeCount, skippedMedia.splice(runStartIndex)) stays consistent because runErrorCount is incremented only on the path that increments error_count (src/jobs.ts:999-1000), and the guard `if (runErrorCount > 0)` correctly skips a no-op decrement for pure safeFile runs. The five new tests match the fixture semantics: setupFixture writes real 1..3.jpg, so dir/1.jpg/nested-*.jpg raises ENOTDIR from realpath (src/dedup.ts:24) and a 0o000 parent raises EACCES from realpath (src/dedup.ts:25); safeFile's internal ENOENT catch (src/dedup.ts:26) is what makes the 6-missing-file test take the structural, non-aborting path. acceptance/release-2.7.1.md follows the existing acceptance/release-<version>.md convention. I found no blocking or important defect in the supplied changes; the remaining finding is a documentation-accuracy correction in the trace row. ### Blocking findings None. ### Important findings None. ### Suggestions - **SEARCH-01 trace wording claims skipped_media records 'all unsafe skips', but the code caps the list at 20 entries and labels structural skips without an errno** (REQUIREMENTS-TRACE.md:60; high confidence) The updated SEARCH-01 evidence text states that 2.8.0-dev2..dev4 'record actionable skipped_media entries for all unsafe skips'. The changed code at src/jobs.ts:940 pushes only `if (skippedMedia.length < 20)`, and src/jobs.ts:939 sets `const reason = unsafeReason ?? 'unsafe or missing path'`, so a structural (safeFile-returned-null) skip is recorded with a generic string that carries no errno. The same 20-entry bound is already documented for purge jobs in README.md:128 ('retains up to 20 file errors'). Impact: A reader following the trace would conclude every unsafe skip is individually attributed, whereas past 20 unsafe skips only the aggregate skipped_unsafe_files counter is retained, and missing-path skips carry no cause. The trace is the review record used to judge acceptance, so an over-stated attribution claim weakens the evidence for the SEARCH-01 row. Suggested fix: Qualify the wording, e.g. 'record actionable skipped_media entries for unsafe skips up to the existing 20-entry checkpoint bound, with errno causes only for thrown safeFile errnos (structural missing-path skips keep the generic "unsafe or missing path" label)'. ### Tests and validation - package-checks: **success** ### Questions - Should safeFile-thrown errno skips also increment the job's error_count? The changed branch at src/jobs.ts:936-963 increments consecutiveErrors and skippedUnsafe but never issues the `UPDATE jobs SET error_count = error_count + 1` that the embedImage path performs at src/jobs.ts:1000, so a run aborted by five safeFile errnos reports error_count 0 while the 5-consecutive abort test (tests/vectorize-error-tolerance.test.mjs:650) asserts skipped_unsafe_files and consecutive_errors are rolled back to 0. Is under-counting file errors in job status intentional? - Should the ENOENT entry in the new whitelist at src/jobs.ts:931 be there at all? src/dedup.ts:26 already converts ENOENT to a null return, so safeFile cannot throw ENOENT; the entry is only reachable via the separate embedImage whitelist at src/jobs.ts:975. Confirm this is deliberate (i.e. missing files must stay on the non-aborting structural path) rather an attempt to make missing files count toward the runaway guard. - The PR objective text refers to advancing to 2.8.0-dev1 while VERSION, package.json and the CHANGELOG head are 2.8.0-dev4; confirming the head value is intended (three review-round fix bumps) would settle this, since check_alignment only requires the three files to agree. - acceptance/release-2.7.1.md states the 2.7.1 candidate tolerates 'filesystem errors (ENOENT, EACCES, EISDIR)' and aborts 'up to 4 consecutive errors'. That describes the frozen release-branch code, which is not in the supplied tree; please confirm the candidate's behaviour matches, since the dev code now also tolerates ENOTDIR and gates the abort on thrown errnos only. ### Review limitations - I did not execute repository code or tests, so the trace claim that tests/vectorize-error-tolerance.test.mjs passes 14 cases is unverified here; I only confirmed the file contains 14 `test(` registrations and that their fixture setup is consistent with src/dedup.ts safeFile behaviour. - The 2.7.1 / 2.7.1-rc.2 release-branch code was not supplied, so statements in acceptance/release-2.7.1.md and in the trace about that candidate's behaviour cannot be checked against code; I inspected only the dev tree at 2.8.0-dev4. - No CI or test-run output was supplied; I cannot confirm the Node/Python suites, the version.py check gate, or the Nix package checks pass at this head. - The EACCES test at tests/vectorize-error-tolerance.test.mjs:514 self-skips when process.getuid() === 0; no supplied evidence shows the uid under which the suite ran, so I cannot state whether that case actually executed in the recorded gate. - I did not evaluate the open acceptance items the trace still records (real full-library completion, absent sqlite-vec host, production deployment), nor anything outside the changed files and the checked-out tree. ### Diff coverage - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `acceptance/release-2.7.1.md`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `src/jobs.ts`: **reviewed** — included in a context-limited batch - `tests/vectorize-error-tolerance.test.mjs`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 7 - Previous automated review: none found - Findings: 1 </details>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
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
nimmo/redview!30
No description provided.