Skip to content

fix: restore config-free local startup (OPE-91) - #238

Open
aakarim wants to merge 1 commit into
mainfrom
fix/ope-91-local-startup
Open

aakarim wants to merge 1 commit into
mainfrom
fix/ope-91-local-startup

Conversation

@aakarim

@aakarim aakarim commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Linear issue

Fixes OPE-91.

Diagnosis

Without an on-disk openlore.yml, the CLI loaded the tracked embedded production config. It required ./config/lore.json, enabled openlore.sh token/passkey settings, and selected a writable production overlay. Fresh-directory server construction failed with loading auth config: open ./config/lore.json: no such file or directory.

Fix

  • Remove the stock production fallback from assets/config so ordinary builds use existing built-in defaults: SSH 2222, HTTP 8080, MCP /mcp, anonymous reads, read-only substrate.
  • Keep optional custom embedded configs, external-config precedence, and fail-closed behavior for explicitly configured auth files unchanged. Production deployment already selects its external config with --config.
  • Make Railpack cleanup tolerate the absent embedded file, including custom downstream embeddings, and update the bundled setup guide for current/older sources.
  • Add a fresh-directory server regression checking startup and local listener/auth/write defaults.

Verification

All commands ran in the repository Nix development shell.

  • Before fix: go test ./cmd/openlore -run "^TestFreshInstallServer$" -count=1 failed with the exact missing-auth-file error.
  • After fix: go test -race ./cmd/openlore ./internal/config ./assets ./pkg/openlore -count=1 passed (non-short affected suites).
  • go test -race -short ./... passed across the repository.
  • go vet ./... and go build ./... passed.
  • go generate ./docs/... produced no tracked changes; gofmt, git diff --check, and both Railpack JSON parses passed.
  • Built CLI launched as openlore ./docs from a config-free directory: banner reported config: defaults; anonymous HTTP API and session-initialized MCP reads returned the fixture with exit_code 0; SSH read with an unregistered ephemeral key returned the same fixture.
  • Write probe returned exit_code 1, read-only filesystem, and left content unchanged.
  • Explicit --auth pointing to a missing file still exited 1 with a loading-auth-config error.
  • Temporary smoke service, data, key, and binary cleaned up. Container/Docker integration suites and dashboard checks were not run locally; no dashboard code changed. PR CI remains the delivery gate.

Agent thread

Implemented by the scheduled Amp child thread.

Do not merge automatically.

Remove the stock embedded production config so config-free startup does not require openlore.sh auth state. Preserve optional custom embedding and fail-closed explicit auth configuration.

Make deployment cleanup tolerate an absent embedded config, update setup guidance, and cover fresh-directory server construction.

Amp-Thread-ID: https://ampcode.com/threads/T-c5ddd6ba-2734-4020-9636-53e46c684e5e
Co-authored-by: Amp <amp@ampcode.com>
@linear-code

linear-code Bot commented Nov 3, 2026

Copy link
Copy Markdown

OPE-91

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The supplied review evidence identifies no active issues requiring resolution.

No open issues 🎉

What changed in this PR

Restores config-free local startup by removing the bundled production configuration, allowing ordinary builds to use existing defaults without requiring production authentication files.

Changes:

  • Removes the stock embedded config while preserving support for custom embedded and external configs.
  • Makes Railpack cleanup tolerate the missing config and updates the source-build setup guide.
  • Adds a fresh-directory server-construction regression test covering listener, authentication, and read-only defaults.
File Description
railpack.json Makes embedded-config removal tolerate an absent file.
railpack-plan.json Applies the same cleanup change to the build plan.
cmd/​openlore/​main_test.go Tests fresh-directory server construction and local defaults.
assets/​skills/​setup.md Clarifies cleanup and configuration precedence for source builds.
assets/​config/​openlore.yml Deletes the production fallback so ordinary builds use built-in defaults.

Review effort: Balanced

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