Sync 2.7.1 release corrections into dev #30
Loading…
Reference in a new issue
No description provided.
Delete branch "sync/release-2.7.1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Merge release/2.7.1 corrections into
dev, preserving all release candidate review refinements, test additions, and advancing the provisional development target to2.8.0-dev1.Automated code review
Reviewed commit:
7ecc563cc7b8ab8c7f0c473e76b10bc7a1774f49Verdict: 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 inpendingCheckpointand only JSON.stringifies it at a deferred flush, and the whitelisted catch aroundsafeFilematches 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 viaif (!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
The new test turns
2.jpginto a directory (rmSync(item2Path,{force:true}); mkdirSync(item2Path)). src/dedup.tssafeFile(lines 17-31) handles a directory without throwing:realpath/lstatboth succeed and it returnsnullatif (!file.isFile()) return null;; its only catch rethrows non-ENOENT errors, none of which occur for a readable directory undermkdtempSync(tmpdir()). So the newtry { isSafe = Boolean(await safeFile(row)); } catchblock 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-changeif (!await safeFile(row))code. The other nine tests in the file trigger skips via encoder 422 responses orrmSync(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 inskipped_unsafe_filesand the job still reachesphase: 'complete'. Keep the directory case as a separate test for theisFile()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 theif (!isSafe)branch only doesskippedUnsafe++; runUnsafeCount++;.skippedMedia.push({ media_id: row.id, error: msg.slice(0,512) })occurs only in the encoder-error catch (src/jobs.ts ~975, guarded byif (skippedMedia.length < 20)), so a row skipped because safeFile threw EACCES/EISDIR leaves no entry incheckpoint.skipped_media; the job then reachesreport('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_filescount 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
skippedMedialist (e.g. push{ media_id: row.id, error: String((error as {code?:string}).code ?? '') }under the existingskippedMedia.length < 20guard) 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_mediasnapshot 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
Questions
realpathon 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?Review limitations
Diff coverage
CHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchsrc/jobs.ts: reviewed — included in a context-limited batchtests/vectorize-error-tolerance.test.mjs: reviewed — included in a context-limited batchReview metadata
Review Follow-up (Review ID 114)
Addressed all findings and questions reported in Review ID 114:
Exercise safeFile Thrown Filesystem Error Paths:
safeFile filesystem errors (EACCES) are caught and recorded as unsafe skips with media IDtotests/vectorize-error-tolerance.test.mjs, placing item 2 in an unreadable subfolder (chmodSync 0o000) sosafeFileactually throwsEACCESfromrealpath, verifying it is caught, recorded inskipped_unsafe_files, and attributed inskipped_media.safeFile filesystem errors (ENOTDIR) are caught and recorded as unsafe skips with media IDverifyingENOTDIRwhen navigating through a non-directory path component.safeFile's!file.isFile() -> nullpath.Actionable Attributed safeFile Skip Recording:
src/jobs.ts, whensafeFilethrows a whitelisted filesystem error (ENOENT,EACCES,EISDIR,ENOTDIR), the skip is attributed with its media ID and specific errno inskippedMedia(safeFile: ${unsafeReason}) under the bounded 20-entry guard, making the skip actionable in job checkpoints.Whitelist ENOTDIR:
src/jobs.ts(safeFilecatch andisFileErrorcatch) to includeENOTDIRalongsideENOENT,EACCES, andEISDIR.Attribution and Release Trace Alignment:
REQUIREMENTS-TRACE.md(SEARCH-01) to2.7.1-dev12for the development series changes, and added distinct coverage description for2.7.1-rc.2 and 2.8.0-dev1with 12 tests.acceptance/release-2.7.1.mddocumenting the 2.7.1 release scope, candidate test evidence, and accepted publication.Validation Evidence:
nix build --no-link --print-build-logs .#redviewpassed cleanly.2.8.0-dev2with aligned metadata and changelog.Automated code review
Reviewed commit:
c8dd9c61446d31b7865f663d624968e1f13c7236Verdict: 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 aroundsafeFile(src/jobs.ts:928-934) converts previously-throwing EACCES/EISDIR/ENOTDIR path faults into counted skips that never feedconsecutiveErrorsorerror_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', butsafeFilereturns null for ENOENT, non-file, and outside-folder paths (src/dedup.ts:18, 24-26, 27) and theskippedMedia.pushat src/jobs.ts:939 is gated onunsafeReason, 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. Onlypackage-checkswas 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 toisSafe = false. In the!isSafebranch (src/jobs.ts:936-941) onlyskippedUnsafe++andrunUnsafeCount++occur:consecutiveErrorsis untouched anderror_countis not incremented. The 5-consecutive abort, cursor rollback andskipped_unsafe_filesrollback exist only inside theembedImagecatch (src/jobs.ts:956-968), andrunUnsafeCountis used only for that rollback, never to stop a run.safeFile(src/dedup.ts:17-31) callsrealpath(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'withskipped_unsafe_filesequal to the whole pending library, noerror_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
consecutiveErrorsin the!isSafebranch, or fail the job whenrealpath(row.folder_path)itself faults), and account for recorded safeFile skips inerror_countso 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 && ...), andunsafeReasonis set only in the catch (src/jobs.ts:931).safeFilenever 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 incrementskippedUnsafewith noskipped_mediaentry. The new test 'safeFile directory path is skipped as unsafe...' (tests/vectorize-error-tolerance.test.mjs:471) assertsskipped_unsafe_files === 1but asserts noskipped_mediaattribution, 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; theENOENTentry in the catch list at src/jobs.ts:929 is unreachable throughsafeFile.Suggested fix: Either record the media ID for the null-return case (e.g. push
error: 'safeFile: unsafe or missing path'whensafeFilereturns 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-dev1and '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'))pluschmodSync(subDir, 0o000)(line 521) and then assertsskipped_unsafe_files === 1,completed === 2and asafeFile:.*EACCESreason. The fault is produced only becauserealpath(dirname/filepath)(src/dedup.ts:20-21) is denied traversal; a root-privileged process is not denied by mode 0o000, sosafeFilewould 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 whenprocess.uid === 0), and state the non-root assumption in the test name or comment.Tests and validation
Questions
consecutiveErrors. Should safeFile skips count toward the 5-consecutive abort, or is unbounded safeFile skipping intended?report(src/jobs.ts:829) still passesskipped_media: skippedMediaby 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?Review limitations
package-checksresult (nix build --no-link --print-build-logs .#redview: success) was supplied as a passing deterministic check;npm testand 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.safeFilecallers (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 batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchacceptance/release-2.7.1.md: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchsrc/jobs.ts: reviewed — included in a context-limited batchtests/vectorize-error-tolerance.test.mjs: reviewed — included in a context-limited batchReview metadata
Review Follow-up (Review ID 116)
Addressed all findings and suggestions reported in Review ID 116:
Feed safeFile Skips into 5-Consecutive Error Runaway Abort Guard:
src/jobs.ts(vectorizeHandler),!isSafeskips now incrementconsecutiveErrors++and trigger the 5-consecutive file error abort guard with cursor andskipped_unsafe_filesrollback, preventing silent runaway skipping of unmounted storage or unreadable folder trees.5 consecutive safeFile failures abort the job to prevent runaway skipping of unmounted storagetotests/vectorize-error-tolerance.test.mjs, verifying rollback of cursor andskipped_unsafe_files.Attributed Media ID Recording for All Unsafe Skips:
safeFilereturnsnullor throws,skippedMediarecords{ media_id: row.id, error: 'safeFile: ${unsafeReason ?? "unsafe or missing path"}' }under the 20-entry bound.tests/vectorize-error-tolerance.test.mjsto assert attribution of media ID and reason inskipped_media.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 cited2.7.1-rc.2for snapshotting and initial fs tolerance, and attributed2.8.0-dev2 and dev3forENOTDIRtolerance, safeFile consecutive abort guard, fullskipped_mediaattribution, and the 13 test cases.Environment-Insensitive EACCES Test:
{ skip: Boolean(process.getuid && process.getuid() === 0) ? 'Root user bypasses 0o000 DAC permissions' : false }for the EACCES test.Tagger Handler Defensive Snapshotting:
skipped_media: [...skippedMedia]intagHandler(src/jobs.ts:829) matchingvectorizeHandler.Validation Evidence:
tests/vectorize-error-tolerance.test.mjs).nix build --no-link --print-build-logs .#redviewpassed cleanly.2.8.0-dev3with aligned package metadata and changelog.Automated code review
Reviewed commit:
1dd75bd649f4b0944c7d3062e78775a858badf7dVerdict: 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
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 thisconsecutiveErrors++and the abort block are added by this change (previously the branch only didskippedUnsafe++; 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
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
Questions
await safeFile(row)unguarded (dedup.ts:17-31 rethrows every errno except ENOENT), and purgeHandler:640 passes its in-place-mutatedfailuresarray 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.Review limitations
Diff coverage
CHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchacceptance/release-2.7.1.md: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchsrc/jobs.ts: reviewed — included in a context-limited batchtests/vectorize-error-tolerance.test.mjs: reviewed — included in a context-limited batchReview metadata
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
src/jobs.ts(vectorizeHandler), theconsecutiveErrors++counter and 5-consecutive runaway abort guard are now gated behindif (unsafeReason).safeFilereturnsnull(unsafeReason === null), the item is recorded inskipped_mediaassafeFile: unsafe or missing pathand incremented inskipped_unsafe_files, butconsecutiveErrorsis 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.safeFilethrows a trapped filesystem errno (unsafeReason !== null, e.g.EACCES,ENOTDIR,EISDIR),consecutiveErrorsincrements. If 5 consecutive actionable filesystem errors occur, the job aborts and rolls back cursor, error count, andskipped_unsafe_filesto the run anchor.2. Test coverage
tests/vectorize-error-tolerance.test.mjs(now 14 tests total):completed: 0, skipped_unsafe_files: 6, phase: complete).ENOTDIR) trigger the runaway abort and roll backskipped_unsafe_files.3. Trace and Documentation
REQUIREMENTS-TRACE.mdunderSEARCH-01to document2.8.0-dev4, 14 test cases, preservation of structural skip baseline without incrementing consecutiveErrors, and note non-root DAC requirement for permission testing.2.8.0-dev4viascripts/version.py bump fix.Evidence
npm test: 232 tests passed (0 failures).nix build --no-link --print-build-logs .#redview): succeeded with all Node and Python test checks passing.Automated code review
Reviewed commit:
88d23506f95f4e0cb7ce6815aea387520968f1b9Verdict: 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
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 setsconst 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
Questions
UPDATE jobs SET error_count = error_count + 1that 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?Review limitations
test(registrations and that their fixture setup is consistent with src/dedup.ts safeFile behaviour.Diff coverage
CHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchacceptance/release-2.7.1.md: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchsrc/jobs.ts: reviewed — included in a context-limited batchtests/vectorize-error-tolerance.test.mjs: reviewed — included in a context-limited batchReview metadata