Repository navigation
Description
Summary
Part of the plan to make ~/.infer/ the only default location and eventually retire the project-local .infer/ directory (see #1122 for the conversations slice).
The gateway binary and log files still default to the project directory:
downloadBinary()ininternal/gateway/manager.go(~L577) downloads the gateway release into.infer/bin/, so every project re-downloads and stores its own copy of the same machine-wide binary.configureGatewayOutput()ininternal/gateway/manager.go(~L904) writesgateway-<date>.loginto.infer/logs/.- The CLI's own logger defaults to
DefaultLogsPath = ".infer/logs"(config/config.go~L24), used byinternal/platform/logger/logger.goandcmd/runtime/state.go.ConfigureDaemonLogging()already special-cases the daemon to~/.infer/logs- that special case collapses once home is the default for everyone.
The run/PID dir already lives at ~/.infer/run (inferRunDir()), so this finishes the job for the gateway lifecycle.
Refactor: these are machine-scoped, not project-scoped - move the defaults to the home dir and delete the project-dir behavior. No backward compatibility, no migration; old .infer/bin and .infer/logs in projects are simply orphaned.
Proposed design
- Gateway binary:
~/.infer/bin/inference-gateway(one shared copy per machine, staleness check unchanged). - Gateway logs and CLI logs:
~/.infer/logs/becomes theDefaultLogsPathdefault; drop the daemon-only home override inConfigureDaemonLogging(). - An explicit
logging.dirconfig value must still win over the new default. - Remove
bin/andlogs/*.logfromInferGitignoreContentinconfig/gitignore.go(nothing writes them to the project dir anymore).
Acceptance Criteria
- Fresh run with no config downloads the gateway binary to
~/.infer/bin/and writes gateway and CLI logs under~/.infer/logs/; nothing is written to./.infer/binor./.infer/logs. - Explicit
logging.dirconfig is still honored; the daemon-specific home fallback inConfigureDaemonLogging()is removed as redundant. -
bin/andlogs/*.logentries are removed from the seeded project gitignore, and related docs/dead code are updated. -
task precommit:runpasses.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Aug 30, 2026
@infer Can you work on this? use /ponytail:ponytail /go /go-concurrency /cobra-viper
inference-gateway-maintainer commentedon Aug 30, 2026
Model:
ollama_cloud/glm-5.3-flash· View JobTodos
Pull Request
#1129
✅ Infer Result: Success
All done and verified. Final state: clean tree, branch pushed, PR open and ready for review.
Summary
Implemented issue #1123 - moved the machine-scoped gateway binary and log defaults from the project dir to the home dir, finishing the job started by #1128's conversations slice. PR: #1129 (ready for review,
fix/issue-1123@e8a7f17, 11 files).What changed:
config/config.go: deleted the project-relativeDefaultLogsPathconst and addedDefaultLogsDir()mirroring the existingTelemetryDir()pattern (resolves~/.infer/logs, falls back to a relative path only when$HOMEis unknown).internal/gateway/manager.go:downloadBinary()now targets~/.infer/bin/(one shared copy per machine, staleness check unchanged);configureGatewayOutput()writesgateway-<date>.logunder~/.infer/logs/, honoring an explicitlogging.dir; added a tinyinferHomeDir()helper thatinferRunDir()now reuses - so the whole gateway lifecycle (run/,pids/,bin/,logs/) is home-scoped.internal/platform/logger/logger.go+cmd/runtime/state.go: the empty-LogDirfallbacks useconfig.DefaultLogsDir(); the daemon-only home override inConfigureDaemonLogging()is deleted as redundant (it now just sets the daemon prefix + stdout).logging.dir/INFER_LOGGING_DIRstill win everywhere.config/gitignore.go:bin/andlogs/*.logremoved from the seeded project.gitignore.config/logs_dir_test.go: new tests pinning the~/.infer/logsdefault (hermetic$HOME) and the gitignore removal.directory-structure.md,configuration-reference.md,a2a-connections.md,mcp-integration.md) plus a[DOCS]tracking ticket in the docs repo ([DOCS] CLI gateway binary and logs now default to the home dir docs#602).Checks:
task precommit:runpassed (mod:tidy, fmt, lint:imports, golangci-lint 0 issues, markdownlint); affected-package tests pass; working tree clean; PR #1129 open and ready for review; Roadmap board item set to QA; docs follow-up: inference-gateway/docs#602. No migration, per the issue - old project-local.infer/binand.infer/logsare simply orphaned.All 9 todos complete. Final summary of the work on issue #1123:
What was done
PR: #1129 -
refactor(gateway): default gateway binary and logs to the home dir(fix/issue-1123@e8a7f17, 11 files, ready for review)internal/gateway/manager.go):downloadBinary()now targets~/.infer/bin/- one shared copy per machine instead of a re-download per project; the staleness check is unchanged.internal/gateway/manager.go):configureGatewayOutput()writesgateway-<date>.logunder~/.infer/logs/, honoring an explicitlogging.dir. Added a smallinferHomeDir()helper thatinferRunDir()now reuses, so the whole gateway lifecycle (run/,pids/,bin/,logs/) is home-scoped.config/config.go,logger/logger.go,cmd/runtime/state.go): project-relativeDefaultLogsPathconst replaced withDefaultLogsDir()(mirrors the existingTelemetryDir()pattern); the daemon-only home override inConfigureDaemonLogging()is deleted as redundant. Explicitlogging.dir/INFER_LOGGING_DIRstill wins everywhere.config/gitignore.go):bin/andlogs/*.logentries removed since nothing writes them to the project dir anymore.config/logs_dir_test.gopins the~/.infer/logsdefault (hermetic$HOME) and the gitignore removal;cmd/runtime/state_test.gocomment updated.directory-structure.md(logs/ + bin/ moved to the userspace~/.infertree),configuration-reference.md, and the a2a/mcp troubleshooting snippets updated.Verification:
task precommit:runpassed (mod:tidy, fmt, lint:imports, golangci-lint 0 issues, markdownlint); affected-package tests pass; tree clean and pushed; PR open and ready for review; Roadmap board set to QA; docs follow-up filed at inference-gateway/docs#602. No migration, per the issue - old project-local.infer/binand.infer/logsare simply orphaned.Model:
ollama_cloud/glm-5.3-flash· Exit Code:0· Duration: 10m 41sTokens: 7,956,472 in · 34,328 out · 7,990,800 total (62 requests)
Tool calls: 101 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
inference-gateway-releaser commentedon Aug 30, 2026
🎉 This issue has been resolved in version 0.185.0 🎉
The release is available on:
Your semantic-release bot 📦🚀