Skip to content

[codex] Surface local knowledge unavailable diagnostics#1999

Closed
HendrikD2005 wants to merge 2 commits into
devfrom
codex/issue-1996-local-knowledge-diagnostics
Closed

[codex] Surface local knowledge unavailable diagnostics#1999
HendrikD2005 wants to merge 2 commits into
devfrom
codex/issue-1996-local-knowledge-diagnostics

Conversation

@HendrikD2005

Copy link
Copy Markdown
Collaborator

Summary

Surface actionable Local Knowledge diagnostics when the connector cannot load after runtime/storage disruption.

Refs #1996

Scope

  • In scope: Local Knowledge UI error formatting, connector picker error rendering, and focused regression coverage.
  • Out of scope: changing the Local Knowledge storage/recovery backend or fixing unrelated UI coverage failures.

Reuse And No-Duplication

  • Existing Keiko functionality was inspected before implementation.
  • This PR reuses, extends, generalizes, or consolidates existing functionality where practical.
  • Any new implementation is limited to a documented capability gap in the linked issue.
  • This PR does not introduce a parallel workspace, graph, relationship, policy, evidence, memory, connector, workflow, or UI subsystem where an existing subsystem can be extended.
  • Refactoring or consolidation was considered when existing functionality was close but not shaped for this change.

Delivery Board

  • Linked issue is in the public Keiko Product Delivery project.
  • Linked issue has a valid Parent Epic: #<epic_number> unless this PR updates an epic container directly.
  • Linked issue is attached as a GitHub sub-issue of its parent epic so it appears in the correct board swimlane.
  • Parent epic is on the board with Classification: Epic, Status: Open Epics, and priority/order set for top-to-bottom implementation sequencing.
  • Linked task/card issue is on the board with Classification: Task, Status: In Progress while active, inherited or explicit Priority, and Human Review Required: Yes.
  • Project Status is In Progress while work is active, or Done only after merge and closure evidence.
  • Project Workflow State is PR Open or Ready for Human Review.
  • Owner / Agent, Branch, Pull Request, and Human Review Required are filled.
  • Issue label reflects the current state: status: in progress, status: ready for human review, or status: done after merge.
  • Autonomous agents did not merge into dev, enable auto-merge, close the issue, or bypass human review unless explicitly authorized by the human maintainer.

Product Impact

  • UI or user workflow
  • CLI or developer workflow
  • Core generation engine
  • Evidence, audit, or compliance artifact
  • Security or supply chain
  • Packaging, release, or npm publication
  • Documentation or repository hygiene
  • No user-facing behavior change

Update Impact

  • Not release-impacting.
  • Release-impact catalog or issue metadata updated.
  • Release-note category: fixes.
  • Priority: normal.
  • User-visible change: Local Knowledge unavailable and runtime-unreachable errors now include recovery guidance plus the stable diagnostic code/support id when available.
  • Release-note bullet: Local Knowledge now shows actionable diagnostics when the connector cannot load after runtime/storage disruption.
  • Supported-from versions: next release.
  • Affected state stores: local-knowledge.
  • User action required and remediation: Restart Keiko and reopen Local Knowledge; if the issue persists, run the local-state repair or Knowledge Pod reindex remediation.
  • Internal-only rationale, if applicable: N/A.
  • Release-owner review evidence: pending maintainer review.

Verification

Required:

  • Required GitHub checks pass before merge.
  • Local verification commands or rationale are listed below.
  • Reuse/extension/generalization evidence or gap rationale is listed below.

Local verification:

npm run test --workspace @oscharko-dev/keiko-ui -- app/local-knowledge/format-error.test.ts app/components/desktop/widgets/cards/ConnectorPickerWidget.test.tsx
PASS: 2 files, 21 tests

npm run typecheck
PASS

npm run typecheck --workspace @oscharko-dev/keiko-ui
PASS

npm run lint --workspace @oscharko-dev/keiko-ui
PASS

npx prettier --check packages/keiko-ui/src/app/local-knowledge/format-error.ts packages/keiko-ui/src/app/local-knowledge/format-error.test.ts packages/keiko-ui/src/app/components/desktop/widgets/cards/ConnectorPickerWidget.tsx packages/keiko-ui/src/app/components/desktop/widgets/cards/ConnectorPickerWidget.test.tsx
PASS

npm run build:ui
PASS

npm run check:editor-release-evidence
PASS

npm run arch:check
PASS with bundled Node v24.14.0 because system Node v25.9.0 is unsupported by dependency-cruiser

npm run arch:check:negative
PASS

npm run format:check
FAIL: existing repository-wide Prettier drift across thousands of files; touched files pass targeted Prettier check.

npm run test:coverage:ui
FAIL: unrelated existing failures in useWorkspace.persistence.1580.test.tsx and FilesWidget.test.tsx timeout/debounce tests; focused touched tests pass.

Reuse / gap rationale:

The server already emits redacted LOCAL_KNOWLEDGE_UNAVAILABLE envelopes and ApiError already carries correlation ids. This change extends the existing Local Knowledge shared formatError helper and routes the connector picker through it instead of adding another error subsystem.

Select only what applies:

  • UI behavior manually verified or covered by tests.
  • CLI behavior verified with command output or tests.
  • Core logic covered by unit, integration, property, or fixture tests.
  • Security-sensitive change reviewed for trust boundaries, secrets, external calls, and generated artifacts.
  • Supply-chain or package-surface change verified with package, license, lockfile, SBOM, or npm dry-run checks.
  • Documentation or Markdown change verified by the repository link check or a targeted local equivalent.
  • Release-impacting change verified with npm run check:release-impact or an explicit rationale.
  • Not applicable items are explained below.

Not applicable rationale:

  • No CLI, package-surface, supply-chain, or documentation surface changed.
  • Release-impact catalog was not updated because this is a narrow UI fix for an open user finding; release-owner metadata remains pending maintainer triage.

Review And Closure

  • The PR implements only the linked issue scope.
  • Actionable review findings are fixed or explicitly dispositioned.
  • Unresolved review threads are resolved before merge.
  • Checks are repeated after the latest pushed fix.
  • Issue acceptance criteria and closure evidence are updated only where evidence exists.
  • The linked issue records reuse, extension, generalization, or new-gap rationale before closure.
  • Delivery board status is updated before requesting final maintainer review.
  • Use Resolves #<issue_number> only when this PR should close the issue.

Risk Notes

Low implementation risk: this is a UI-only formatting change that keeps server redaction intact and displays only stable diagnostic codes plus correlation ids already designed for support. The main operational risk is that the broader UI coverage gate is currently red on unrelated suites, so maintainers should review those separately before merge.

@HendrikD2005 HendrikD2005 marked this pull request as ready for review July 6, 2026 08:13
@HendrikD2005 HendrikD2005 requested a review from oscharko as a code owner July 6, 2026 08:13
Signed-off-by: HendrikD2005 <144935017+HendrikD2005@users.noreply.github.com>
Signed-off-by: HendrikD2005 <144935017+HendrikD2005@users.noreply.github.com>
@HendrikD2005 HendrikD2005 force-pushed the codex/issue-1996-local-knowledge-diagnostics branch from 6609b97 to 72a29a7 Compare July 6, 2026 08:31
@oscharko

oscharko commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

#2001

@oscharko oscharko closed this Jul 6, 2026
@oscharko oscharko deleted the codex/issue-1996-local-knowledge-diagnostics branch July 6, 2026 08:54
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.

2 participants