Skip to content

advance live-docs on a release, and track it from a packaging workspace - #3877

Merged
dr-bonez merged 6 commits into
masterfrom
feat/pin-workspace-to-sdk-release
Sep 3, 2026
Merged

advance live-docs on a release, and track it from a packaging workspace#3877
dr-bonez merged 6 commits into
masterfrom
feat/pin-workspace-to-sdk-release

Conversation

@MattDHill

@MattDHill MattDHill commented Aug 31, 2026

Copy link
Copy Markdown
Member

Problem

A packaging workspace cloned master. master carries the SDK that hasn't shipped: its projects/start-sdk is 2.0.10 while every published package pins @start9labs/start-sdk 2.0.9. So the guide a packager reads, the template init-package scaffolds from, and the SDK source they grep all describe an SDK npm install cannot resolve — and the local guide disagrees with docs.start9.com.

live-docs is the branch that should answer this. It doesn't yet, because nothing has ever advanced its code: it was branched off master's tip in #3652 on 2026-08-10 and only projects/<project>/docs has moved since. Its projects/start-sdk/lib is still that day's in-progress 2.0.10 (5 files / 170 lines of post-v2.0.9 work), and shared-libs/, .github/ and the repo root have not moved a single file in three weeks.

Change

docs-sync-on-tag.yml now advances live-docs to the release, not just its book. It takes the tagged tree whole, then restores every other projects/* to the release it is on. A tag therefore speaks for its own project, the shared libraries beneath it, and the repo root — and for nothing another product owns.

  • projects/start-docs (shared site tree, versions.conf included) rides along only with a product that ships a book. A bookless release — start-cli, start-registry — now refreshes its own project and the shared tree instead of being skipped whole, and docs-deploy.yml's paths filter is what keeps it from firing a needless deploy.
  • Nothing moves backwards, judged per tree. A product's own tree is compared against that product's earlier syncs; the shared trees (shared-libs/, the root, projects/start-docs/) against every product's. So a deb release, which tags the commit alpha built and is routinely behind a tag cut before it, still advances its own project while the shared trees stay where the newer release put them. A tag behind its own product's last release publishes its book alone, or nothing if it has none. Every earlier sync is consulted, not the newest, because syncs land out of ancestry order.
  • [skip-backport] is unchanged and load-bearing — none of the newly-synced paths can bounce onto master.

s9pk init-workspace clones live-docs. git pull --ff-only stays the session-start sync, so there's no new command; a workspace now picks up corrections to published pages the moment they go live, and a release brings that product's whole tree with it.

live-docs-guard.yml fails a PR into live-docs that changes anything but a published book. The branch now carries code, and only the tag sync may write it — a PR that carried code would put a tree there that no release produced, and docs-backport.yml would push it onto master unattended, unreviewed as a code change. Nothing gated PRs into that branch before. It takes edited alongside its live-docs branch filter, so a PR retargeted onto live-docs is checked at once rather than at its next push, and it is registered with check-pr-retarget-workflows.py as a direct listener, like conflict-markers.

The predicate is a rule (projects/<product>/docs/, projects/start-docs/) rather than a mirror of docs-deploy.yml's paths, so a new product's book is covered the moment it exists. It rejects one path under docs/: the package template, which init-package reads out of the workspace's checkout at scaffold time rather than from the binary — so a merge there would change what every new package is built from at once, without facing manage-release.sh pre-check start-sdk's gate on its SDK pin.

An s9pk command says when start-cli itself is behind. start-cli installs outside the workspace, and the two halves drift differently: on Debian the installer adds an apt repo and apt upgrade carries it forward, while on macOS and every other Linux it drops a binary in ~/.local/bin with no update path the guide ever mentioned. Since projects/start-cli on live-docs only moves on a start-cli tag, its manifest names exactly the version a packager should be on — so the check is a file read against the version baked in at build time. Printed once per process, silent on anything unreadable, and hung off the workspace lookups s9pk work already does (signing, init-package) so it fires where a stale binary would bite.

Verification

Sync logic, against a synthetic repo: two products, a with a book and b without, live-docs branched at C0, master C0 → C1 → C2 → C2b → C3, tags applied in the order below.

tag own tree shared-libs/ + root projects/start-docs other products
a/v1 at C2 → C2 → C2 → C2 held at C0
b/v1 at C1 (behind a/v1, no earlier b) → C1 held at C2 held at C2 held
b/v0 at C0 (behind b/v1) nothing published held held held
a/v0 at C0 (behind a/v1) book → C0, code held at C2 held held held
b/v2 at C3 (ahead of everything) → C3 → C3 held, bookless held
a/v2 at C2b (ahead of a/v1, behind b/v2) → C2b held at C3 held held
a/v9 off master refused
a/v2 again no commit

The same harness against the previous revision of this branch: b/v1 and b/v0 failed the job on the book-only path, and a/v2 rolled shared-libs/ and the root back to C2b.

Guard predicate, eight cases: book pages, versions.conf, book.toml and a stray docs/*.md pass; shared-libs/, projects/start-sdk/lib/, root AGENTS.md, and package-template/ fail, including when mixed into an otherwise-clean docs PR.

Not covered

The tree live-docs inherited on 2026-08-10 is not repaired here — each project converges at its own next tag. A one-off reset of live-docs to per-project release state is a separate change against a protected branch.

Docs

environment-setup.md, agent-context.md, workflow.md, cli-reference.md, the root and start-docs/start-sdk AGENTS.md release and branch descriptions, and the unreleased start-cli 2.0.0 changelog.

🤖 Generated with Claude Code

@MattDHill
MattDHill force-pushed the feat/pin-workspace-to-sdk-release branch from 279ef3c to 76f8845 Compare August 31, 2026 23:11
@MattDHill MattDHill added the repo Repository maintenance label Aug 31, 2026
@MattDHill MattDHill changed the title pin the packaging workspace to the released SDK advance live-docs on a release, and track it from a packaging workspace Aug 31, 2026
@MattDHill MattDHill added start-docs Improvements or additions to documentation StartOS labels Sep 1, 2026
MattDHill and others added 4 commits September 2, 2026 20:08
A packaging workspace cloned `master`, which carries the SDK that has not
shipped: today its `projects/start-sdk` is 2.0.10 while every published package
pins `@start9labs/start-sdk` 2.0.9. The guide, the package template and the SDK
source a packager reads therefore ran ahead of what `npm install` resolves, and
the local copy of the guide disagreed with docs.start9.com.

`live-docs` is the branch that should answer this — it is what is published —
but nothing has ever advanced its code. It was branched off master's tip on
2026-08-10 (#3652) and only `projects/<p>/docs` has moved since, so its
`projects/start-sdk/lib` is still that day's in-progress 2.0.10, and
`shared-libs/`, `.github/` and the repo root are all three weeks stale and
drifting.

docs-sync-on-tag now takes the tagged tree whole and puts every *other*
`projects/*` back on the release it is on. A tag advances its own project, the
shared libraries beneath it, and the repo root; it speaks for nothing another
product owns. `projects/start-docs` rides along only with a product that ships
a book, so a bookless release still refreshes the tree without triggering a
site deploy. The stale-tag guard now covers the whole tree rather than the site
alone: a backfilled tag still publishes its book and nothing else.

`init-workspace` then clones `live-docs`, so `git pull --ff-only` stays the
session-start sync and a workspace gets published-guide corrections the moment
they go live, rather than at the next release.

This does not repair the tree live-docs inherited on 2026-08-10; each project
converges at its own next tag.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
live-docs now carries published code as well as published books, and nothing
gated a pull request into it. A PR touching code would put a tree there that no
release produced, and docs-backport pushes whatever merges into live-docs onto
master unattended — so it would land on master unreviewed as a code change.

The predicate is a rule rather than a mirror of docs-deploy's paths, so a new
product's book is covered the moment it exists. The package template is the one
thing under docs/ that it rejects: `s9pk init-package` scaffolds from it, and
`manage-release.sh pre-check start-sdk` verifies its SDK pin against the release
being cut, which an edit landing on live-docs would never face.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
start-cli installs outside the workspace, so nothing tied it to the guide the
workspace carries. On Debian the installer adds an apt repo and `apt upgrade`
carries it forward; on macOS and every other Linux it drops a binary in
~/.local/bin with no update path, and the guide never said to re-run the
installer. Those packagers drift indefinitely against a guide that keeps
advancing.

The checkout tracks published releases and `projects/start-cli` only moves on a
start-cli tag, so its manifest names exactly the version a packager should be
running. Comparing it to the version baked in at build time is a file read with
no network, printed once per process, and silent on anything unreadable.

It rides on the workspace lookups s9pk work already does — signing (pack,
publish, edit) and init-package — so it fires where a stale binary would bite
and nowhere else.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@MattDHill
MattDHill force-pushed the feat/pin-workspace-to-sdk-release branch from 4449e23 to 53d5fe5 Compare September 3, 2026 02:08
MattDHill and others added 2 commits September 2, 2026 20:31
The rollback guard compared every tag against the newest sync of any
product, but deb releases tag the commit alpha built, which is routinely
behind a tag cut before it. Such a release was judged stale and never
advanced its own tree; a bookless one crashed on the book-only path. The
watermark was also read only from commits touching projects/start-docs,
which a bookless sync no longer touches, so an older tag arriving after
one rolled shared-libs and the root back.

Two watermarks now. A product's own tree is behind only if an earlier
release of the same product was synced from a descendant of the tagged
commit. The shared trees are behind if any release was, and then stay
where the newer release put them. Every earlier sync is consulted, not
the newest, because syncs land out of ancestry order.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
check-pr-retarget-workflows.py audits every workflow with a pull_request
trigger, and the guard was not registered. It is a direct listener like
conflict-markers rather than a retarget-called target: its verdict depends
on the base, and the branch filter is evaluated against the new base, so
taking `edited` is what checks a PR moved onto live-docs before its next
push.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@dr-bonez
dr-bonez merged commit 02e44cc into master Sep 3, 2026
41 checks passed
@dr-bonez
dr-bonez deleted the feat/pin-workspace-to-sdk-release branch September 3, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

repo Repository maintenance start-cli start-docs Improvements or additions to documentation StartOS StartSDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants