Skip to content

Add HTTP and R2 glossary source support - #51

Merged
diogoascarneiro merged 4 commits into
mainfrom
remote-glossary-fetch
Sep 21, 2026
Merged

diogoascarneiro merged 4 commits into
mainfrom
remote-glossary-fetch

Conversation

@diogoascarneiro

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds external glossary sources for shared terminology managed outside the consuming project.

  • Loads one raw YAML glossary per configured locale from HTTPS sources, including private GitHub and GitLab repositories.
  • Loads private R2 objects using S3-compatible credentials.
  • Adds authentication headers, request cancellation, timeouts, size limits, secret redaction, and bounded retries.
  • Logs redacted glossary source locations during dry runs.
  • Preserves content-based glossary hashing and cache invalidation.
  • Extends Astro, CLI, and EmDash configuration and documentation.
  • Adds focused HTTP, R2, configuration, retry, security, and integration tests.

Type of change

  • Bug fix
  • Feature
  • Refactor (no behavior change)
  • Documentation
  • Tests
  • CI / tooling
  • Chore

PolyStella invariants touched

  • None
  • Cache key formula
  • Translation batching / segment grouping
  • Apply-before-PUT cache write order
  • Local cache index isolation
  • Runtime bridge timing
  • URL-rewrite idempotence
  • Provider permanent vs retriable errors
  • R2 key / local path separator handling

The cache-key formula is unchanged. External source identity and credentials are excluded; only normalized glossary content contributes to glossaryHash.

Checklist

  • I have read CONTRIBUTING.md
  • I have added or updated tests, or this change does not need tests
  • I have added a changeset, or this change does not affect the published package
  • I have updated docs, or this change does not affect public behavior
  • pnpm test passes, or I have explained why it was not run
  • pnpm typecheck passes, or I have explained why it was not run
  • Docs checks/builds pass if docs or public APIs changed

AI-generated code disclosure

  • This PR includes AI-generated code - OpenCode (openai/gpt-5.6-sol)

Screenshots / logs / test output

pnpm test
pnpm typecheck
pnpm check:packages
pnpm --filter polystella-docs build

all ran successfully

…mentation

Add HTTP and R2 glossary sources alongside existing file and inline options. Update documentation to cover GitHub/GitLab raw URLs with authentication, private R2 buckets using S3-compatible credentials, and configuration examples. Clarify that glossary changes invalidate the entire corpus for a locale rather than individual pages. Add union variant handling to config reference generator for discriminated glossary sources
@github-actions github-actions Bot added review/needs-review No maintainer review yet area/cli CLI area/config Configuration schema and options area/docs Documentation area/storage R2 cache and local storage area/tests Tests and fixtures area/translation Translation pipeline and providers size/XL 500+ changed lines labels Sep 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Scope check

This PR changes 1,022 lines across 25 files. PolyStella is maintained by a small team, so smaller focused PRs are more likely to be reviewed.

If this scope is intentional, no action is required.

@pkg-pr-new

pkg-pr-new Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/polystella/@cloudflare/polystella-astro@60badf1
npm i https://pkg.pr.new/cloudflare/polystella/@cloudflare/polystella-core@60badf1
npm i https://pkg.pr.new/cloudflare/polystella/@cloudflare/polystella-emdash@60badf1
npm i https://pkg.pr.new/cloudflare/polystella/@cloudflare/polystella@60badf1

commit: 60badf1

@diogoascarneiro diogoascarneiro changed the title docs: add HTTP and R2 glossary source support with comprehensive docu… Add HTTP and R2 glossary source support Sep 21, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
60badf1 2026-09-21T15:01:43.908Z View logs ↗
  • Build: Failed ❌

View logs ↗
d3818a1 2026-09-21T14:23:49.117Z View logs ↗

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
polystella-docs 60badf1 Commit Preview URL

Branch Preview URL
Sep 21 2026, 03:01 PM

@diogoascarneiro
diogoascarneiro merged commit 64622ae into main Sep 21, 2026
17 checks passed
@diogoascarneiro
diogoascarneiro deleted the remote-glossary-fetch branch September 21, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli CLI area/config Configuration schema and options area/docs Documentation area/storage R2 cache and local storage area/tests Tests and fixtures area/translation Translation pipeline and providers review/needs-review No maintainer review yet size/XL 500+ changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant