Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 25 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,22 @@ jobs:
exit 0
fi
BASE=$(echo "$OUTPUT" | jq -r .baseVersion)
# Defer (don't fail) while the anchor is catching up to a fresh stable.
# Right after a stable promotion, pre.json's anchor still trails the
# just-shipped stable until main-reset advances it (a cross-repo PR +
# Copybara round-trip — minutes). Any mirror push landing in that window
# computes BASE == the fresh stable. Cutting it would regress `@latest`;
# hard-failing pages on a transient, self-healing condition. Skip this
# cut instead — a later push re-cuts automatically once the anchor leads.
# A base strictly BEHIND the stable is NOT this transient window; that is
# left to the Guard step below to hard-fail. fetch-depth:0 has all tags.
LATEST_STABLE_TAG=$(git tag --list 'v*' --sort=-v:refname \
| grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n1 || true)
if [[ -n "$LATEST_STABLE_TAG" && "$BASE" == "${LATEST_STABLE_TAG#v}" ]]; then
echo "::warning::Beta base ${BASE} equals the latest stable ${LATEST_STABLE_TAG#v} — pre.json's anchor has not been advanced by main-reset yet. Deferring this beta cut; it re-cuts automatically once the anchor leads."
echo "skip=true" >> "$GITHUB_OUTPUT"
exit 0
fi
BUMP=$(echo "$OUTPUT" | jq -r .maxBumpType)
COUNT=$(echo "$OUTPUT" | jq -r .pendingCount)
NOTES_B64=$(echo "$OUTPUT" | jq -r .releaseNotes | base64 | tr -d '\n')
Expand All @@ -211,12 +227,13 @@ jobs:
} >> "$GITHUB_OUTPUT"
echo "Computed: base=$BASE bump=$BUMP pending=$COUNT"

# Anchor-drift guard: the computed beta base MUST strictly lead the
# latest published stable. After a stable promotion, pre.json's anchor
# is stale until main-reset advances it; until then compute-next-beta
# derives a base equal to (or behind) the stable just shipped, which
# would cut a `-beta.N` that is semver-BEHIND `@latest`. Fail loud with
# the recovery action rather than publishing a regressed beta. Uses the
# Anchor-drift backstop: the computed beta base must not be BEHIND the
# latest published stable. The common post-promotion case (base EQUAL to
# the fresh stable, anchor not yet advanced by main-reset) is now handled
# upstream in compute-beta as a deferred skip, so run_beta is only 'true'
# here when base != stable. A base strictly BEHIND stable is genuine anchor
# drift — not the transient window — and would cut a `-beta.N` that is
# semver-BEHIND `@latest`; fail loud with the recovery action. Uses the
# latest stable tag (no network) — fetch-depth:0 has all tags locally.
- name: Guard - beta base must lead the latest stable
if: steps.compute-beta.outputs.run_beta == 'true'
Expand All @@ -232,9 +249,8 @@ jobs:
fi
STABLE="${LATEST_STABLE_TAG#v}"
TOP=$(printf '%s\n%s\n' "$BASE_VERSION" "$STABLE" | sort -V | tail -n1)
if [[ "$BASE_VERSION" == "$STABLE" || "$TOP" != "$BASE_VERSION" ]]; then
echo "::error::Computed beta base ${BASE_VERSION} does not lead the latest stable ${STABLE}."
echo "::error::pre.json's anchor is stale — a stable was promoted but main-reset has not advanced the base."
if [[ "$TOP" != "$BASE_VERSION" ]]; then
echo "::error::Computed beta base ${BASE_VERSION} is BEHIND the latest stable ${STABLE} — genuine anchor drift, not the transient post-promotion window (base==stable is deferred upstream)."
echo "::error::Run public-open-knowledge-main-reset.yml with stable_version=${STABLE} on agents-private, then re-cut."
exit 1
fi
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# OpenKnowledge
# Open Knowledge

OpenKnowledge is a markdown-powered document editor with integrations for Claude, Codex, and Cursor.
Open Knowledge is a local-first knowledge base for teams that want docs, help-center content, SOPs, and agent-facing knowledge to live in one structured editing system.

The project includes a desktop app, web app, server, CLI, shared core packages, and docs site. It uses Bun workspaces and Turbo for builds.

## Install

Expand Down