Skip to content

test: remove workflow store compatibility imports#218

Merged
devkade merged 1 commit into
devfrom
refactor/issue-209-file-workflow-store-tests-b
May 17, 2026
Merged

test: remove workflow store compatibility imports#218
devkade merged 1 commit into
devfrom
refactor/issue-209-file-workflow-store-tests-b

Conversation

@devkade
Copy link
Copy Markdown
Owner

@devkade devkade commented May 17, 2026

Summary

  • Migrates the final FileKapiStore test clusters to FileWorkflowStore.
  • Removes the temporary FileKapiStore compatibility export from src/adapters/file-store.ts.
  • Leaves no FileKapiStore references in test/ or src/adapters/file-store.ts.

Linked issue

Refs #209

Problem

The previous store rename slices moved the source-facing implementation to FileWorkflowStore and migrated the smaller test files. Three large test clusters and the temporary compatibility export still kept the old FileKapiStore name alive.

Implementation

  • test/service-store.test.ts
    • Replaced FileKapiStore imports/instantiations with FileWorkflowStore.
  • test/autoresearch-validation.test.ts
    • Replaced FileKapiStore imports/instantiations with FileWorkflowStore.
  • test/autoresearch-bridge.test.ts
    • Replaced FileKapiStore imports/instantiations with FileWorkflowStore.
  • src/adapters/file-store.ts
    • Removed export { FileWorkflowStore as FileKapiStore };.

Residual scan

rg -n '\bFileKapiStore\b' test src/adapters/file-store.ts
# no matches

QA / Verification

  • npm test -- test/service-store.test.ts test/autoresearch-validation.test.ts test/autoresearch-bridge.test.ts — pass; package script ran the full suite: 521 tests, 510 pass, 11 skipped.
  • git diff --check — pass after fixing one trailing blank line.
  • npm run check — pass.
  • npm run check:unused — pass.
  • npm run quality:budgets — pass with existing non-failing code_smells=52 warning.
  • rg -n '\bFileKapiStore\b' test src/adapters/file-store.ts — no matches.

Anomalies observed

Symptom Evidence Impact Action
Initial git diff --check found a trailing blank line at EOF after alias removal. src/adapters/file-store.ts:391: new blank line at EOF. Formatting gate failed. Removed the extra blank line and reran git diff --check successfully.
Package test script runs full suite even with file args. Command expanded to tsx --test test/*.test.ts ...; 521 tests ran. Stronger coverage, slower run. Reported here.
quality:budgets still warns on code_smells=52. npm run quality:budgets output. Existing non-failing budget warning; unchanged by this rename. No action in this PR.

Risks / Follow-up

kapi-agent review

  • Expected reviewer-only bot behavior: automatic formal review after PR open; if absent after a short wait, request with @kapi-agent review.
  • Merge gate: latest kapi-agent approval/check must apply to the current head before merge.

@devkade
Copy link
Copy Markdown
Owner Author

devkade commented May 17, 2026

@kapi-agent review

Revision explanation for current head 207ec1959c3e848d6ccfe5e504bc13adbc6483aa:

What changed:

  • Migrated the final three FileKapiStore test clusters to FileWorkflowStore.
  • Removed the temporary FileKapiStore compatibility export from src/adapters/file-store.ts.
  • Confirmed no remaining FileKapiStore references in test/ or src/adapters/file-store.ts.

Why this closes the prior feedback:

Verification:

  • npm test -- test/service-store.test.ts test/autoresearch-validation.test.ts test/autoresearch-bridge.test.ts — pass; package script ran 521 tests / 510 pass / 11 skipped.
  • git diff --check — pass after fixing one trailing blank line.
  • npm run check — pass.
  • npm run check:unused — pass.
  • npm run quality:budgets — pass with existing non-failing code_smells=52 warning.
  • rg -n '\\bFileKapiStore\\b' test src/adapters/file-store.ts — no matches.

Copy link
Copy Markdown

@kapi-agent kapi-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kapi-agent review

Verdict: APPROVE

Final approval summary

Review journey

This PR completes a narrow rename cleanup for issue #209. The semantic scope is limited to removing the legacy FileKapiStore compatibility surface and migrating the remaining tests to FileWorkflowStore. There was no prior kapi-agent review on this head, so no fix ping-pong was required.

What changed

  • src/adapters/file-store.ts: removed export { FileWorkflowStore as FileKapiStore };.
  • test/service-store.test.ts, test/autoresearch-validation.test.ts, test/autoresearch-bridge.test.ts: replaced remaining FileKapiStore imports/instantiations with FileWorkflowStore.

Why this is correct

The implementation class is already FileWorkflowStore, and the temporary compatibility export only preserved the old name. The tests now exercise the canonical name directly, and the residual scan shows no remaining FileKapiStore references under the intended source/test surface.

Evidence

  • Verifier gate: PASS.
  • Size gate: PASS, 114 changed lines under threshold.
  • Revision-explanation status: not required; explanation present in PR body.
  • Ilchul harness: PASS/neutral, no blocking findings.
  • CI/local evidence supplied by gate: npm ci && npm run verify passed.
  • Additional inspection: checked package metadata and searched for remaining FileKapiStore references in src and test; none found.

Remaining risks and approval rationale

Remaining risk is low: removing an exported alias can break out-of-tree imports, but this package is marked private and the change is aligned with the stated cleanup issue. The touched code is almost entirely tests plus removal of the compatibility alias, with full verification passing. Approval is justified.

Blocking issues

None.

Warnings / risks

  • src/adapters/file-store.ts: removing the compatibility export is intentionally breaking for any local/out-of-tree code importing FileKapiStore. Given the package is private and the PR explicitly completes the rename cleanup, this is acceptable.

Suggestions

  • Consider a follow-up scan outside src/test if local extension examples or docs can import internal adapters, though I did not see evidence that this is required for this PR.

Looks good

  • The change is mechanically consistent: all migrated tests use FileWorkflowStore.
  • The old compatibility export is removed only after the remaining in-repo consumers were migrated.
  • Verification coverage is strong for a rename cleanup: full tests, typecheck, unused checks, quality budgets, and residual symbol scan.

Verification notes

  • Verifier gate status: PASS — npm ci && npm run verify exited 0.
  • Size gate status: PASS — 114 changed lines, below the semantic review threshold.
  • Revision-explanation status: not required; found in PR body.
  • Ilchul review harness gate: PASS/neutral, no blocking findings.
  • PR evidence includes successful targeted/full test execution, git diff --check, npm run check, npm run check:unused, npm run quality:budgets, and rg -n '\bFileKapiStore\b' test src/adapters/file-store.ts with no matches.

Engine: pi

Copy link
Copy Markdown

@kapi-agent kapi-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kapi-agent review

Verdict: APPROVE

Final approval summary

Review journey

This PR completes a narrow store-surface rename cleanup for issue #209. The semantic scope is bounded: migrate the remaining test imports/instantiations from FileKapiStore to FileWorkflowStore, then remove the temporary compatibility export.

What changed

  • src/adapters/file-store.ts: removed export { FileWorkflowStore as FileKapiStore };.
  • test/service-store.test.ts, test/autoresearch-validation.test.ts, and test/autoresearch-bridge.test.ts: migrated remaining FileKapiStore references to FileWorkflowStore.

Why this is correct

The implementation already exposes FileWorkflowStore as the canonical store class. The removed alias was temporary compatibility surface, and the updated tests now exercise the canonical name directly. A residual scan shows no remaining FileKapiStore references in src or test, so the rename surface is internally consistent.

Evidence

  • Verifier gate: PASS — npm ci && npm run verify exited 0.
  • Size gate: PASS — 114 changed lines, below the 200-line review threshold; mostly test-only rename updates.
  • Ilchul harness gate: PASS — neutral/comment result with 0 blocking findings.
  • Revision-explanation status: not required, found.
  • Inspected files: src/adapters/file-store.ts, changed test imports/usages, package.json, and repository-wide symbol scan.

Remaining risks and approval rationale

Remaining risk is low and limited to external consumers importing FileKapiStore directly from an internal adapter path. This package is marked private, and the PR intentionally removes a temporary compatibility alias after internal migration. Approval is justified because the change is narrow, verification passes, and no blocking correctness, safety, or workflow-contract issue remains.

Blocking issues

None.

Warnings / risks

  • src/adapters/file-store.ts: removing the alias is a breaking change for any out-of-tree/internal scripts that still import FileKapiStore. Given the package is private and the PR goal is to complete the compatibility cleanup, this is acceptable.

Suggestions

  • Consider documenting in the linked issue or follow-up checklist that FileKapiStore compatibility is now fully removed, so future rename work can focus on the remaining KapiService naming surface.

Looks good

  • The compatibility export removal is minimal and matches the stated migration goal.
  • Tests were updated to use the canonical FileWorkflowStore name directly.
  • The residual scan for FileKapiStore across src and test supports that the internal rename is complete for this symbol.
  • No generated files or sensitive paths are involved.

Verification notes

  • Verifier gate status: PASS — npm ci && npm run verify exited 0.
  • Size gate status: PASS — 114 changed lines, below threshold; mostly test rename churn.
  • Revision-explanation status: not required for this review, but an explanation was found.
  • PR evidence includes full test/check/unused/quality verification and a no-match scan for FileKapiStore.

Engine: pi

@devkade devkade merged commit 38b0a4c into dev May 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant