These components are published to media.library.caltech.edu because that
bucket already existed for other purposes, not because it was set up for them.
They ride along in a shared space, under a prefix, alongside unrelated content.
A bucket for embeddable assets, separate from whatever else that one holds, is
worth doing on its own. It also happens to be the moment several other problems
become cheap to fix, all of which get more expensive the longer they wait.
1. Consumers cannot pin a version
https://media.library.caltech.edu/cl-webcomponents/footer-global.js
No version in the path. A site embedding that gets whatever was published
last, with no way to ask for a specific release and no warning when it
changes. The only way to discover what you are running is to read the
version export out of the bundle — and that export was wrong for thirteen
months, reporting 0.0.12 while the project was at 0.0.16, until #48.
This is the one that is genuinely hard to retrofit. Adding versioned paths to
the existing layout means either breaking every URL already in use or serving
two schemes indefinitely. Doing it as part of a move costs nothing extra.
A scheme worth copying is the one caltechlibrary/workflows uses for its
actions: an exact version that never changes, plus a moving major tag for
callers who want fixes automatically.
/cl-web-components/0.0.17/footer-global.js pinned, immutable
/cl-web-components/v0/footer-global.js moves with each release
Consumers choose which contract they want.
Which surfaces a problem with the version number itself. codemeta.json
says 0.0.16. Under SemVer a 0.x.y version means explicitly no stability
promise — anything may change at any time. These components are in production
on Caltech Library sites, so that is not what we mean.
It matters here rather than being pedantry: a moving v0 tag has nothing to
move within. The whole point of a major tag is "keep giving me fixes that
will not break me," and 0.x makes no such offer. There is no compatible line
to track.
The reason not to have released 1.0.0 before was that the delivery mechanism
could not keep the promise — with unversioned paths, consumers cannot pin, so
declaring stability is meaningless. This proposal removes that objection.
Versioned paths and a 1.0.0 release are the same conversation.
2. The bucket is named after its public hostname
That makes AWS_BUCKET_NAME a secret that protects nothing — the hostname is
public and appears in dozens of files here — while breaking output that
legitimately contains the same string. GitHub masks a secret's value
wherever it appears, so public-base-url, which is a plain literal in the
workflow and not a secret at all, renders in the publish job summary as:
BASE_URL: https://***/cl-webcomponents/
Every link in that summary is unclickable. A bucket name that is not the
hostname makes the secret meaningful and the summary useful, at the same time.
3. The prefix is missing a dash
cl-webcomponents, where every other spelling of the project name has one:
200 media.library.caltech.edu/cl-webcomponents/footer-global.js
404 media.library.caltech.edu/cl-web-components/footer-global.js
Correcting it on the current bucket means migrating objects or running two
paths in parallel. On a new bucket it is simply the name we choose.
4. Two hosts serve the same components
software.library.caltech.edu is the GitHub Pages custom domain, rebuilt on
every push. media.library.caltech.edu is S3, updated on release. They served
different versions of the same files for over a year, and the documentation is
split between them:
| Referenced in this repo |
Count |
media.library.caltech.edu/cl-webcomponents/ |
8 |
software.library.caltech.edu/CL-web-components/ |
4 |
software.library.caltech.edu/CL-web-compents/ — typo, 404 |
1 |
That last one is in INSTALL.md, inside the copy-paste import statement, so
anyone following the install instructions gets a 404.
A move is the natural moment to decide which host is canonical for embedding
and make every reference agree.
5. Related: rename the repository to cl-web-components
The project is spelled at least three ways today — CL-web-components as the
repository, cl-webcomponents as the bucket prefix, cl-web-components in
prose and in the npm-style name. If the prefix is being fixed anyway, the
repository name is the other half of the same inconsistency, and lowercase
matches every other spelling.
Separable from the bucket work, but it belongs in the same conversation because
it changes URLs at the same time.
What it affects:
- The documentation site URL changes, from
software.library.caltech.edu/CL-web-components/ to
.../cl-web-components/. This is the real cost — every documented link and
every bookmark. GitHub redirects the repository URL, but the Pages path
follows the repository name.
build-pandoc's site-base defaults to /<repo>/, so the built pages
follow automatically. No workflow change needed.
- Page titles change, since
project defaults to the repository name.
codemeta.json and CITATION.cff carry the repository URL.
- Existing clones keep working — GitHub redirects the old name — but anyone
with a remote pointing at the old URL should update it.
What has to change together
- 13 component URLs in this repository — docs, demo pages,
INSTALL.md
.github/workflows/publish-to-s3.yml — prefix and public-base-url
caltechlibrary/workflows, pandoc/page.tmpl line 16 — loads
footer-global.js from the CDN, so this reaches every Caltech Library
documentation site using the shared build, not just this project
- the Caltech Library logo, served from
media.library.caltech.edu/assets/ by
the same template — same bucket, and possibly a different owner
- any consumer outside these two repositories, which we have not surveyed
Decisions needed
- Hostname.
assets.library.caltech.edu has been suggested.
- Bucket name, deliberately not the hostname.
- Path scheme. Exact versions only, moving major only, or both.
- Whether the current path keeps serving, and for how long. Nothing forces
a cutover if both can run during a transition.
- Who owns the
assets/ prefix the logo is served from.
- Whether
software.library.caltech.edu should keep serving components at
all, or go back to being only the documentation site.
- Whether to release
1.0.0 alongside versioned paths, and whether to
rename the repository. Both are separable; both change URLs, so doing them
apart means disrupting links twice.
Not in scope
The documentation site's own hostname. This is about where embeddable assets
live, not where docs are published.
These components are published to
media.library.caltech.edubecause thatbucket already existed for other purposes, not because it was set up for them.
They ride along in a shared space, under a prefix, alongside unrelated content.
A bucket for embeddable assets, separate from whatever else that one holds, is
worth doing on its own. It also happens to be the moment several other problems
become cheap to fix, all of which get more expensive the longer they wait.
1. Consumers cannot pin a version
No version in the path. A site embedding that gets whatever was published
last, with no way to ask for a specific release and no warning when it
changes. The only way to discover what you are running is to read the
versionexport out of the bundle — and that export was wrong for thirteenmonths, reporting
0.0.12while the project was at0.0.16, until #48.This is the one that is genuinely hard to retrofit. Adding versioned paths to
the existing layout means either breaking every URL already in use or serving
two schemes indefinitely. Doing it as part of a move costs nothing extra.
A scheme worth copying is the one
caltechlibrary/workflowsuses for itsactions: an exact version that never changes, plus a moving major tag for
callers who want fixes automatically.
Consumers choose which contract they want.
Which surfaces a problem with the version number itself.
codemeta.jsonsays
0.0.16. Under SemVer a0.x.yversion means explicitly no stabilitypromise — anything may change at any time. These components are in production
on Caltech Library sites, so that is not what we mean.
It matters here rather than being pedantry: a moving
v0tag has nothing tomove within. The whole point of a major tag is "keep giving me fixes that
will not break me," and
0.xmakes no such offer. There is no compatible lineto track.
The reason not to have released
1.0.0before was that the delivery mechanismcould not keep the promise — with unversioned paths, consumers cannot pin, so
declaring stability is meaningless. This proposal removes that objection.
Versioned paths and a
1.0.0release are the same conversation.2. The bucket is named after its public hostname
That makes
AWS_BUCKET_NAMEa secret that protects nothing — the hostname ispublic and appears in dozens of files here — while breaking output that
legitimately contains the same string. GitHub masks a secret's value
wherever it appears, so
public-base-url, which is a plain literal in theworkflow and not a secret at all, renders in the publish job summary as:
Every link in that summary is unclickable. A bucket name that is not the
hostname makes the secret meaningful and the summary useful, at the same time.
3. The prefix is missing a dash
cl-webcomponents, where every other spelling of the project name has one:Correcting it on the current bucket means migrating objects or running two
paths in parallel. On a new bucket it is simply the name we choose.
4. Two hosts serve the same components
software.library.caltech.eduis the GitHub Pages custom domain, rebuilt onevery push.
media.library.caltech.eduis S3, updated on release. They serveddifferent versions of the same files for over a year, and the documentation is
split between them:
media.library.caltech.edu/cl-webcomponents/software.library.caltech.edu/CL-web-components/software.library.caltech.edu/CL-web-compents/— typo, 404That last one is in
INSTALL.md, inside the copy-paste import statement, soanyone following the install instructions gets a 404.
A move is the natural moment to decide which host is canonical for embedding
and make every reference agree.
5. Related: rename the repository to
cl-web-componentsThe project is spelled at least three ways today —
CL-web-componentsas therepository,
cl-webcomponentsas the bucket prefix,cl-web-componentsinprose and in the npm-style name. If the prefix is being fixed anyway, the
repository name is the other half of the same inconsistency, and lowercase
matches every other spelling.
Separable from the bucket work, but it belongs in the same conversation because
it changes URLs at the same time.
What it affects:
software.library.caltech.edu/CL-web-components/to.../cl-web-components/. This is the real cost — every documented link andevery bookmark. GitHub redirects the repository URL, but the Pages path
follows the repository name.
build-pandoc'ssite-basedefaults to/<repo>/, so the built pagesfollow automatically. No workflow change needed.
projectdefaults to the repository name.codemeta.jsonandCITATION.cffcarry the repository URL.with a remote pointing at the old URL should update it.
What has to change together
INSTALL.md.github/workflows/publish-to-s3.yml—prefixandpublic-base-urlcaltechlibrary/workflows,pandoc/page.tmplline 16 — loadsfooter-global.jsfrom the CDN, so this reaches every Caltech Librarydocumentation site using the shared build, not just this project
media.library.caltech.edu/assets/bythe same template — same bucket, and possibly a different owner
Decisions needed
assets.library.caltech.eduhas been suggested.a cutover if both can run during a transition.
assets/prefix the logo is served from.software.library.caltech.edushould keep serving components atall, or go back to being only the documentation site.
1.0.0alongside versioned paths, and whether torename the repository. Both are separable; both change URLs, so doing them
apart means disrupting links twice.
Not in scope
The documentation site's own hostname. This is about where embeddable assets
live, not where docs are published.