Skip to content

Add a repeatable way to publish chosen self-host apps - #98

Merged
RaviTejaKNTS merged 5 commits into
mainfrom
research/traffic-growth-causes
Nov 2, 2026
Merged

RaviTejaKNTS merged 5 commits into
mainfrom
research/traffic-growth-causes

Conversation

@RaviTejaKNTS

Copy link
Copy Markdown
Collaborator

Adds a supported way to add any chosen app to the self-host apps directory on request. Records only; no new pages or routes.

Why

apply-candidate-review needs candidates to be enriching, but select-candidate-batch could only claim the top N rows by confidence. Publishing one specific app meant raw SQL. The whole-table sync-local-to-prod isn't suitable either: it would push about 5,000 unrelated development differences.

Changes

  • Find: select-candidate-batch --match <name-or-repo> is a read-only lookup of candidates and app rows.
  • Claim chosen rows: --ids or --ids-from <reviewed.json>. One transaction, and it stops if any ID is missing or terminal. Already-enriching rows are accepted, so a re-run is safe. Exact-ID claims accept new rows because a person chose them; top-N behavior is unchanged.
  • Production gate: lib/environment.mjs requires --environment production --confirm stack127-production, including previews, for claim, review, estimates, single-app upsert, and release. Inherited NODE_ENV and DATABASE_URL can't override it. These commands now default to development.
  • Dry runs: candidate-review previews use a read-only transaction.
  • Single-app refresh: --slug on the source-host refresh and install-option refresh. A targeted source-host refresh now fails for a missing app or the wrong host; empty scheduled queues still succeed.
  • Concurrency: dedupe rechecks and locks eligible rows before writing, so it can't overwrite a claimed or published candidate. Claim, review, dedupe, and release use FOR NO KEY UPDATE in ID order.
  • Docs: "Add one app on request" in stack127_docs/self-host-apps-data.md and the enrichment skill, with a warning against sync-local-to-prod.

Production step after merge (from homelab, on the merge commit)

Publish Forgejo, GitLab CE, OneDev, and GlitchTip with scripts/self-host-apps/batches/2026-11-01-forge-error-tracking-*.json: claim preview, claim, review preview, review, estimates preview, estimates, then per-app refreshes. Stop on any failure. Once the review commits, resume at estimates.

Checks

  • npm run quality: 116/116
  • Self-host tests: 54 passed, 7 skipped (they need the development database setting)
  • Race tests run on development: 5/5, including a two-connection test that fails with the old lock
  • Real claim and release on development restored the row counts
  • Homelab has no crontab entry or timer using these commands
  • Sol reviews: several rounds; the last found nothing

🤖 Generated with Claude Code

RaviTejaKNTS and others added 5 commits November 2, 2026 15:03
Claim exact candidates by ID or from a reviewed batch, look up an app by name
or repository, gate production through the shared resolver with a confirm
value, and refresh one app's source-host facts by slug. Document the steps and
warn against sync-local-to-prod for single apps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fresh

Dedupe rechecks and locks eligible rows before writing, so it can't overwrite a
claimed or published candidate. A targeted source refresh now fails for a missing
app or the wrong host. Releasing a claim uses the shared environment gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A status update doesn't change a key, so the claim, review, and dedupe locks
don't need to block foreign-key checks on the row. Adds a two-connection test
that fails with the old lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RaviTejaKNTS
RaviTejaKNTS merged commit 79a10ea into main Nov 2, 2026
7 of 8 checks passed

This branch was previously deployed

1 inactive deployment
production — 59cc352d Deployed Nov 2, 2026 by RaviTejaKNTS via verify-production-build #93
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