8000 feat(server): run without Sub2API when only the collector pushes by InfinityPacer · Pull Request #14 · InfinityPacer/meterleaf · GitHub
[go: up one dir, main page]

Skip to content

feat(server): run without Sub2API when only the collector pushes - #14

Merged
InfinityPacer merged 2 commits into
mainfrom
feat/optional-sub2api
Sep 26, 2026
Merged

InfinityPacer merged 2 commits into
mainfrom
feat/optional-sub2api

Conversation

@InfinityPacer
Copy link
Copy Markdown
Owner

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, and compose.yaml required it, so the collector could not be used on its own.

Behavior

  • Live mode now needs SUB2API_DATABASE_URL or METERLEAF_INGEST_KEYS. With neither, startup fails with a clear message. An empty value passed by Compose counts as unset.
  • Without Sub2API no pull sync runs. /api/sync reports unavailable, so the sync control is hidden, and pushed batches appear in reports after the background refresh.
  • Report reads and refreshes no longer wait for a pull sync status when none is configured. A configured source whose status cannot be read still rejects cold reads.
  • README, the deployment guide and the collector guide describe both sources, the ingest key flow, and that editing .env needs docker compose up -d because restart keeps 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 build and docker compose config -q with SUB2API_DATABASE_URL unset pass.
  • End to end: started src/server/main.ts with only METERLEAF_INGEST_KEYS, pushed this machine's Claude Code history with an isolated collector config. /api/sync returned {"unavailable":true}, POST /api/sync returned 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

InfinityPacer and others added 2 commits September 27, 2026 02:02
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>
@InfinityPacer
InfinityPacer merged commit b34b64b into main Sep 26, 2026
2 checks passed
@InfinityPacer
InfinityPacer deleted the feat/optional-sub2api branch September 26, 2026 18:08
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.

1 participant

0