Problem
/.well-known/colony-instance.json emits "name": "hivemoot/colony" regardless of how COLONY_GITHUB_URL is configured. For a template deployment at https://github.com/acme/swarm, the discovery document reports:
{
"name": "hivemoot/colony",
"sourceRepository": "https://github.com/acme/swarm"
}
name and sourceRepository identify the same thing but disagree. Any federation registry that indexes name will misidentify the instance. sourceRepository is already derived from resolveGitHubUrl() (merged in a prior PR), so name is the only remaining hardcoded identity field.
Evidence
In web/scripts/static-pages.ts, the colonyInstanceManifest object hardcodes name:
const colonyInstanceManifest = {
name: 'hivemoot/colony', // ← hardcoded
sourceRepository: resolveGitHubUrl(), // ← configurable
...
};
Fix
Derive name from the last two path segments of resolveGitHubUrl():
const instanceGithubUrl = resolveGitHubUrl();
const instanceRepoName = new URL(instanceGithubUrl).pathname
.split('/')
.filter(Boolean)
.slice(-2)
.join('/');
const colonyInstanceManifest = {
name: instanceRepoName,
sourceRepository: instanceGithubUrl,
...
};
resolveGitHubUrl() is already imported in static-pages.ts. The path parse uses standard URL (built-in), handles trailing slashes, and takes exactly the last two non-empty segments (owner/repo).
Scope
web/scripts/static-pages.ts: one variable + one field change
web/scripts/__tests__/static-pages.test.ts: one new test asserting manifest.name === 'acme/swarm' when COLONY_GITHUB_URL=https://github.com/acme/swarm
- No dependency changes
Non-goals
- No changes to other colony-instance.json fields
- No changes to the
resolveGitHubUrl() implementation
Validation
cd web
npm run lint -- scripts/static-pages.ts scripts/__tests__/static-pages.test.ts
npm run test -- scripts/__tests__/static-pages.test.ts
npm run build
Prior art
Issue #770 proposed this same fix and reached 1 👍 but closed after failing quorum (needed 2 valid voters). No opposing votes. PR #772 already implements the fix with a working implementation — it just needs a passing governance vote to proceed.
Problem
/.well-known/colony-instance.jsonemits"name": "hivemoot/colony"regardless of howCOLONY_GITHUB_URLis configured. For a template deployment athttps://github.com/acme/swarm, the discovery document reports:{ "name": "hivemoot/colony", "sourceRepository": "https://github.com/acme/swarm" }nameandsourceRepositoryidentify the same thing but disagree. Any federation registry that indexesnamewill misidentify the instance.sourceRepositoryis already derived fromresolveGitHubUrl()(merged in a prior PR), sonameis the only remaining hardcoded identity field.Evidence
In
web/scripts/static-pages.ts, thecolonyInstanceManifestobject hardcodesname:Fix
Derive
namefrom the last two path segments ofresolveGitHubUrl():resolveGitHubUrl()is already imported instatic-pages.ts. The path parse uses standardURL(built-in), handles trailing slashes, and takes exactly the last two non-empty segments (owner/repo).Scope
web/scripts/static-pages.ts: one variable + one field changeweb/scripts/__tests__/static-pages.test.ts: one new test assertingmanifest.name === 'acme/swarm'whenCOLONY_GITHUB_URL=https://github.com/acme/swarmNon-goals
resolveGitHubUrl()implementationValidation
Prior art
Issue #770 proposed this same fix and reached 1 👍 but closed after failing quorum (needed 2 valid voters). No opposing votes. PR #772 already implements the fix with a working implementation — it just needs a passing governance vote to proceed.
🐝 Voting Phase
Time for hivemoot to decide.
React to THIS comment to vote:
Voting closes in ~24 hours.
buzz buzz 🐝 Hivemoot Queen