Skip to content

feat: tldr-style page contribution, publish & sync pipeline#1

Merged
UnbreakableMJ merged 3 commits into
mainfrom
feat/catalog-contribution-and-sync
Jun 22, 2026
Merged

feat: tldr-style page contribution, publish & sync pipeline#1
UnbreakableMJ merged 3 commits into
mainfrom
feat/catalog-contribution-and-sync

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

Adds the producer + contribution + sync half of the Loran catalog pipeline (the part PRD NG-09 deferred), and closes a latent gap where loran update downloaded pages nothing ever read. Companion content repo: Spacecraft-Software/loran-pages (private, scaffolded separately).

What's here (3 commits)

  • fix(index)build_layered_index_with_overlay now folds the on-disk upstream tree $XDG_DATA_HOME/loran/pages/ (written by loran update) over the bundled core, beneath distro/user overlays. Before this the downloaded catalog was extracted but never surfaced — the update→read loop was open.
  • feat(cli) — opt-in catalog auto-update (off by default; ~/.config/loran/config.toml [update] + LORAN_AUTO_UPDATE/_INTERVAL), best-effort & non-fatal; new global --offline (+ LORAN_OFFLINE); new loran-core::config_home(); loran validate <ROOT> (upstream-strict CI gate for a pages repo); publisher endpoint repointed to the loran-pages GitHub Releases. PUBLISHER_PUBLIC_KEY left as a marked launch TODO.
  • docs(ops)OPERATIONS.md §2 documents the producer/publish flow + a first-launch checklist; rotation sections renumbered §3–§7.

Reuses the existing FetchClient/update_pages/SourceMetaStore/verify_any machinery. No new async, no surprise network on the default path.

Verification

  • Full pre-commit gate green: cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, cargo test --workspace, cargo xtask check-spdx (100 files).
  • New tests: closed-loop proof + full precedence chain (show.rs); validate <ROOT> cases (validate.rs); auto-update non-fatal/offline/default-off (autoupdate.rs).
  • Producer round trip validated locally against the real artifact: build-pages.sh → deterministic pages.tar.gz → extract into a temp XDG home → loran show/list read it.

Launch dependencies (not in this PR)

  • Generate the production minisign keypair, bake the real PUBLISHER_PUBLIC_KEY, add MINISIGN_SECRET_KEY/MINISIGN_PASSWORD to the loran-pages repo (OPERATIONS.md §2.4).
  • Publishing this release is what lets loran-pages CI (cargo install loranloran validate <ROOT>) go green.

🤖 Generated with Claude Code

UnbreakableMJ and others added 3 commits June 22, 2026 22:49
build_layered_index_with_overlay now folds the on-disk upstream tree at
$XDG_DATA_HOME/loran/pages/ (written by `loran update`) over the bundled
core, by name, beneath the distro/user overlays. Previously the read
verbs only consulted the compiled-in bundled pages plus overlays, so a
freshly downloaded catalog was extracted but never surfaced — the
update→read loop was open.

Tests: a download-only tool now resolves via `loran show`, and the full
precedence chain (bundled < downloaded upstream < user overlay) is
locked.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: UnbreakableMJ <Mohamed.Hammad@SpacecraftSoftware.org>
Client side of the tldr-pages-style contribution + sync pipeline:

- Opt-in auto-update: read verbs refresh a stale upstream catalog before
  building the index (off by default). Configured via
  ~/.config/loran/config.toml [update] auto_update / auto_update_interval,
  with LORAN_AUTO_UPDATE / _INTERVAL env overrides. Best-effort and
  non-fatal — a failed refresh falls back to the cached/bundled catalog.
- New global --offline (and LORAN_OFFLINE) suppresses network access.
- New loran-core::config_home() (XDG_CONFIG_HOME-aware on every platform).
- loran validate <ROOT> validates an arbitrary tree upstream-strict — the
  CI gate for a pages repo; exits 2 on a non-directory path.
- Repoint the publisher endpoint to the loran-pages GitHub Releases
  (releases/latest/download/...); PUBLISHER_PUBLIC_KEY left as a marked
  launch TODO.

Reuses the existing FetchClient / update_pages / SourceMetaStore /
verify_any machinery; no new async, no new runtime network on the default
path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: UnbreakableMJ <Mohamed.Hammad@SpacecraftSoftware.org>
Add OPERATIONS.md §2 "Producing & publishing the pages tarball" — the
loran-pages build-pages.sh / publish.yml flow, signing-key location, the
release cadence, and a first-launch checklist (generate the real
keypair, bake PUBLISHER_PUBLIC_KEY, cut a coordinated Loran release).
Renumber the rotation sections to §3-§7 and update cross-references.
Resolves the gap where the runbook covered key rotation but not the
day-to-day build/sign/publish that feeds `loran update`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: UnbreakableMJ <Mohamed.Hammad@SpacecraftSoftware.org>
@UnbreakableMJ UnbreakableMJ merged commit 07b1de3 into main Jun 22, 2026
5 checks passed
@UnbreakableMJ UnbreakableMJ deleted the feat/catalog-contribution-and-sync branch June 22, 2026 20:13
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