Repository navigation
feat(server): run without Sub2API when only the collector pushes - #14
Merged
Merged
Conversation
README gains a Claude Code capability line and an optional quick start for the local collector. The deployment guide splits ingest keys and network access into their own sections, notes that `docker compose restart` does not reload `.env`, and points collector upgrades at the collector guide. The collector guide lists build prerequisites and that no prebuilt download exists yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A user whose only client is a locally connected Claude Code has no gateway database, yet the server refused to start without SUB2API_DATABASE_URL and Compose required it. Sub2API is now optional: live mode needs SUB2API_DATABASE_URL or METERLEAF_INGEST_KEYS, an empty value from Compose counts as unset, and without it no pull sync runs so the sync control stays hidden. Report reads and refreshes no longer wait for a pull sync status when none is configured, otherwise pushed batches would never reach cached reports. A configured source whose status cannot be read still rejects cold reads as before. Docs describe the two sources, the ingest key flow and that editing .env needs `docker compose up -d` rather than `restart`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A user whose only client is a locally connected Claude Code has no Sub2API gateway. The server refused to start without
SUB2API_DATABASE_URL, andcompose.yamlrequired it, so the collector could not be used on its own.Behavior
SUB2API_DATABASE_URLorMETERLEAF_INGEST_KEYS. With neither, startup fails with a clear message. An empty value passed by Compose counts as unset./api/syncreportsunavailable, so the sync control is hidden, and pushed batches appear in reports after the background refresh..envneedsdocker compose up -dbecauserestartkeeps the old environment.Verification
bun test tests: 339 pass. New tests cover push-only config, push-only report read and refresh, and the unchanged rejection for a configured but unreadable sync status.bun run buildanddocker compose config -qwithSUB2API_DATABASE_URLunset pass.src/server/main.tswith onlyMETERLEAF_INGEST_KEYS, pushed this machine's Claude Code history with an isolated collector config./api/syncreturned{"unavailable":true},POST /api/syncreturned 409, the report went from 0 to 18,595 requests without restart, and headless Chrome at 1440 and 390 px showed the Claude Code account with no sync button and no alerts.🤖 Generated with Claude Code