---
id: 11285
title: Implement dual-search read-path fallback in LocalFileService
state: CLOSED
labels:
  - enhancement
  - ai
  - architecture
assignees:
  - neo-opus-ada
createdAt: '2026-05-13T07:32:43Z'
updatedAt: '2026-05-13T10:18:13Z'
githubUrl: 'https://github.com/neomjs/neo/issues/11285'
author: neo-gemini-pro
commentsCount: 0
parentIssue: 11187
subIssues: []
subIssuesCompleted: 0
subIssuesTotal: 0
blockedBy: []
blocking: []
closedAt: '2026-05-13T10:18:13Z'
---
# Implement dual-search read-path fallback in LocalFileService

## Context
This is bucket B2 of Epic #11187.
During the migration of the archive and active structures, the read-path needs backward compatibility to locate items that might be in transition.

## The Problem
If `LocalFileService` only looks in the new deterministic paths, it will fail to find items that haven't been moved yet.

## The Architectural Reality
- `ai/services/github-workflow/LocalFileService.mjs`

## The Fix
Implement a dual-search in `LocalFileService` to fall back to legacy paths if an item is not found in the new canonical path.

## Acceptance Criteria
- [ ] `LocalFileService#getIssueById` (and PR equivalent) checks both old and new paths.

## Out of Scope
- Modifying the write-path or syncer logic.

## Related
- Epic #11187

Origin Session ID: 2c4aa4df-2628-45ae-a9c2-156fd9308f21

## Timeline

- 2026-05-13T07:32:45Z @neo-gemini-pro added the `enhancement` label
- 2026-05-13T07:32:45Z @neo-gemini-pro added the `ai` label
- 2026-05-13T07:32:46Z @neo-gemini-pro added the `architecture` label
- 2026-05-13T07:33:01Z @neo-gemini-pro added parent issue #11187
- 2026-05-13T07:36:16Z @neo-opus-ada assigned to @neo-opus-ada
- 2026-05-13T07:42:36Z @neo-opus-ada cross-referenced by PR #11289
- 2026-05-13T07:44:36Z @neo-gpt cross-referenced by #11291
- 2026-05-13T08:19:21Z @neo-gpt cross-referenced by PR #11295
- 2026-05-13T08:26:36Z @neo-opus-ada cross-referenced by PR #11296
- 2026-05-13T10:18:13Z @tobiu referenced in commit `48456be` - "feat(github-workflow): dual-search read-path in LocalFileService for archive transition (#11285) (#11289)

Implements B2 of Epic #11187 archive substrate migration. During the active-to-archive
transition, LocalFileService read-path now tries the new canonical archiveRoot before
falling back to legacy archiveDir for issues, and recurses into legacy XXxx subdirs of
discussionsDir before searching archiveRoot for discussions.

- getIssueById: tries archiveRoot first, falls back to archiveDir
- getDiscussionById: tries flat discussionsDir first, falls back to recursive XXxx subdirs,
  then archiveRoot (no legacy discussion-archive substrate exists per Epic #11187 body)
- 10 unit tests covering all dual-search paths + ordering (new canonical wins on duplicate)

Test discipline: describe.serial to prevent fullyParallel races on shared aiConfig
mutations per feedback_symmetric_spec_cleanup memory anchor.

Verified: 80/80 pass across test/playwright/unit/ai/services/github-workflow/ — no
regression in sibling test suites.

Co-authored-by: tobiu <tobiasuhlig78@gmail.com>"
- 2026-05-13T10:18:13Z @tobiu closed this issue
- 2026-05-13T10:28:29Z @neo-opus-ada cross-referenced by PR #11297

