Skip to content

feat(engram): add data-directory domain core#700

Open
tonyblu331 wants to merge 2 commits into
Gentleman-Programming:mainfrom
tonyblu331:feat/engram-dd-2-domain-core
Open

feat(engram): add data-directory domain core#700
tonyblu331 wants to merge 2 commits into
Gentleman-Programming:mainfrom
tonyblu331:feat/engram-dd-2-domain-core

Conversation

@tonyblu331
Copy link
Copy Markdown
Contributor

@tonyblu331 tonyblu331 commented May 28, 2026

Linked Issue

Closes #346

PR Type

  • type:feature - Engram data-dir feature slice

Maintainer action required: add the type:feature label. GitHub rejected label updates from tonyblu331 with AddLabelsToLabelable permission errors.

Summary

Adds the core Engram data-directory domain helpers now that the disk-space infrastructure slice (#638) is merged into main.

This slice keeps the chain reviewable: it only introduces default/custom data-dir references, database path helpers, copy behavior, environment overrides, and presentation helpers. It deliberately does not include service orchestration, location listing, TUI state, install-flow wiring, or unrelated Windows test stabilization.

Changes

Area What changed
internal/components/engram/copy.go Adds database copy behavior with destination validation and parent creation.
internal/components/engram/env.go Adds environment-driven data-dir override helpers.
internal/components/engram/presenter.go Adds user-facing formatting for data-dir paths.
Tests Covers copy behavior, env override behavior, and presenter formatting.

Test Plan

Focused Local Unit Tests

GOCACHE=G:\codex-go-tmp\gocache GOTMPDIR=G:\codex-go-tmp\gotmp TEMP=G:\codex-go-tmp\tmp TMP=G:\codex-go-tmp\tmp APPDATA=G:\codex-go-tmp\appdata XDG_CONFIG_HOME=G:\codex-go-tmp\xdg go test -count=1 ./internal/components/engram ./internal/storage

Full Suite / CI

Local Windows full-suite note

I did not broaden this PR to fix unrelated local Windows baseline failures. I re-ran go test -count=1 ./... from an LF checkout to avoid CRLF golden noise; it still fails locally in packages outside this slice. The same targeted failures reproduce on current origin/main (1f13b8d), so they are not caused by this PR:

Package Local failure
internal/cli TestRunInstallKimiMissingUVFailsBeforeExecutingInstallCommands
internal/components/gga TestInjectIsIdempotent / first-run config-change expectation
internal/update TestCheckSingleTool_EngramUsesBinaryReleaseChannel
internal/update/upgrade TestConfigPathsForBackup_GGAExtrasAreIncluded

Those should be handled in a separate Windows test-stabilization PR if maintainers want local Windows go test ./... green. This slice stays scoped to Engram data-dir domain helpers.

Chain Context

Field Value
Chain strategy Sequential upstream slices unless a maintainer creates upstream chain branches
Chain start feat/engram-dd-1-infra (#638, merged)
Chain end fix/engram-dd-15-operation-consistency
Current slice feat/engram-dd-2-domain-core
Prior dependency #638 merged into main at 2026-05-27 13:01:52 UTC
Follow-up branch feat/engram-dd-3-domain-service after this slice lands
Review budget 357 changed lines
Out of scope Service orchestration, location listing, TUI state/screens, app wiring, unrelated Windows full-suite stabilization, and later hardening/test slices

Planned review order by branch:

main -> feat/engram-dd-1-infra (#638 merged) -> 📍 feat/engram-dd-2-domain-core -> feat/engram-dd-3-domain-service -> feat/engram-dd-4-domain-locations -> feat/engram-dd-5-model-screens -> feat/engram-dd-6-tui-flow-consolidated -> fix/engram-dd-7-service-hardening -> feat/engram-dd-8-app-wiring-consolidated -> fix/engram-dd-9-test-stabilization -> fix/engram-dd-10-mcp-env-sync -> fix/engram-dd-11-data-dir-consistency -> fix/engram-dd-12-rollback-consistency -> fix/engram-dd-13-mcp-config-preservation -> test/engram-dd-14-mcp-config-preservation -> fix/engram-dd-15-operation-consistency

Contributor Checklist

  • PR is linked to an issue with status:approved
  • PR stays within 400 changed lines
  • Exactly one type:* label is applied (type:feature, maintainer action required)
  • Focused local unit tests pass
  • GitHub Actions Unit Tests pass
  • GitHub Actions E2E Tests pass (ubuntu, fedora, arch)
  • Documentation update not required for this internal domain slice
  • My commits follow Conventional Commits format
  • My commits do not include Co-Authored-By trailers

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.

First-class Engram data-directory selection and migration in install/TUI flows

1 participant