feat(wasteland): configurable upstream — read from mayor/wasteland.json#3501
Open
pratham-bhatnagar wants to merge 1 commit intogastownhall:mainfrom
Open
feat(wasteland): configurable upstream — read from mayor/wasteland.json#3501pratham-bhatnagar wants to merge 1 commit intogastownhall:mainfrom
pratham-bhatnagar wants to merge 1 commit intogastownhall:mainfrom
Conversation
…ad of hardcoding hop/wl-commons Currently all wasteland read commands (browse, stamps, show, charsheet, scorekeeper) hardcode 'hop/wl-commons' as the upstream database. This makes it impossible to use a private wasteland with a different name. Changes: - wasteland.ResolveDBName() derives Dolt DB name from config ForkDB field - wl_browse, wl_stamps: check config local dir before clone-then-discard - wl_show: read upstream from config in fallback clone path - wl_charsheet, wl_scorekeeper: use NewWLCommonsWithDB with resolved name - wl_claim, wl_stamp, wl_done: use resolved DB name for existence check - QueryCSV/QueryJSON exported for server-side query execution - DB-parameterized helpers for QueryStampsForSubject, QueryBadges, QueryAllSubjects, UpsertLeaderboard All changes are backward-compatible: when no wasteland config exists, the default hop/wl-commons behavior is preserved.
pratham-bhatnagar
pushed a commit
to masti-ai/gascity
that referenced
this pull request
Apr 2, 2026
…effort estimation, self-evolving knowledge Generic production pack demonstrating: - Private wasteland federation with bidirectional sync - Deterministic effort estimation (trivial/small/medium/large/epic) - Self-evolving knowledge base (6h cron evolution) - 10 agent roles, governance rules with wasteland federation enforcement - External contributor onboarding flow - Smart internal-vs-external work filter in polecat formula All project-specific details replaced with placeholders. Requires: gastownhall/gastown#3501 (configurable wasteland upstream) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Author
|
Updated implementation rebased on latest upstream (9f962c4). All changes on masti-ai/gastown main branch. 12 wl command files patched — browse, show, stamps, charsheet, scorekeeper, claim, done, stamp, post all read from local Dolt server via wasteland.json config. Zero DoltHub cloning. Binary tested and installed. |
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.
Summary
All wasteland read commands (
browse,stamps,show,charsheet,scorekeeper) hardcodehop/wl-commonsas the upstream database. This makes it impossible to use a private or custom wasteland federation.This PR reads the upstream configuration from
mayor/wasteland.json(already saved bygt wl join) instead of hardcoding, with full backward compatibility.Changes
Core Infrastructure
internal/wasteland/wasteland.goResolveDBName(townRoot)— derives Dolt database name from configForkDBfield (hyphens → underscores). Falls back to"wl_commons".internal/doltserver/wl_commons.goNewWLCommonsWithDB(townRoot, dbName)— store constructor with custom database nameDBName()accessor onWLCommonsQueryCSV()andQueryJSON()for server-side query executioninternal/doltserver/wl_charsheet.goQueryStampsForSubject,QueryBadges,QueryAllSubjects,UpsertLeaderboardinto wrapper + DB-parameterized implementationsCommand Updates
wl_browse.gowl_stamps.gowl_show.gowl_charsheet.goResolveDBName()+NewWLCommonsWithDB()wl_scorekeeper.gowl_claim.go,wl_stamp.go,wl_done.goResolution Order (read commands)
Backward Compatibility
hop/wl-commonsWLCommonsDBconstant unchangedgt wl join,gt wl post,gt wl syncUse Case
Anyone running
gt wl join <custom-upstream>expects allgt wlcommands to work with their configured upstream. Currently onlyjoin,post,claim,done, andsyncrespect the config — read commands ignore it.Test Plan
gt wl join <custom/db>saves config correctlygt wl browsereads from local fork (no DoltHub clone)gt wl show <id>queries through Dolt server when DB registeredgt wl stamps <handle>works with custom DB namegt wl charsheetresolves custom DB from configgt wl scorekeeper --jsonuses resolved databasehop/wl-commonswith no configNotes
Submitted by @pratham-bhatnagar. We run a Gas Town with a private wasteland and discovered these hardcoded paths while setting up federation. Happy to iterate on the implementation.
🤖 Generated with Claude Code