Skip to content

docs: runbook for Raft Artifacts mirror publication - #145

Merged
bytemain merged 1 commit into
staging3from
bisheng/raft-artifacts-runbook
Aug 19, 2026
Merged

docs: runbook for Raft Artifacts mirror publication#145
bytemain merged 1 commit into
staging3from
bisheng/raft-artifacts-runbook

Conversation

@bytemain

Copy link
Copy Markdown
Member

@artin asked that the publication process land in the repo so the next mirror is
easier. Tasks #120/#121/#127/#141 each grew a near-duplicate workflow, and the
knowledge that actually matters stayed in chat threads.

Small and self-contained: one document plus one script and its tests. No
workflow, manifest or publication-critical code is touched
, so it cannot
affect any existing receipt.

tools/raft-artifacts/RUNBOOK.md

Written around the traps that cost real CI rounds, not the happy path:

  • The authority serves no directory listing, and a directory URL answers
    200 with a not-browseable notice, not 404 — a check treating "no listing"
    as 404 reads the wrong signal. The file set is derived from module metadata
    and then probed, so record the probe grid: task ci: pin Kuikly writer control plane #141's first inventory
    used a narrow grid and silently missed 5 files.
  • 404 is not the only "absent" signal on Raft — some paths answer 401.
  • Raft serves no maven-metadata.xml, so exact versions only: no ranges, no
    latest, no SNAPSHOT.
  • Carriers must be exactly one commit, or identity-diff fails even when
    everything else is green.
  • expected_sha must be the landed staging3 tip. Squash-merging changes
    the SHA, so the reviewed PR head is not on staging3 and fails closed.
  • Create-only means publish less when unsure, and disclose the superset as
    contract-bound data rather than prose.
  • Mirroring one platform module of a multiplatform root makes that root resolve
    for that platform only — a known limitation to state, not discover.

tools/raft-artifacts/task141_gate_support.py

This existed only on a throwaway gate branch that has since been deleted, so it
was about to be lost. Two commands:

  • stage — materialise a frozen manifest into a local Maven layout, verifying
    every byte, to test a consumer before publishing anything.
  • ohos-test-contract — guards the 1.7.3 trap. Mobile's OHOS leg pins
    kotlinx-coroutines-core:1.8.0-KBA-002, while the non-OHOS build file pins
    1.7.3; copying that version across legs requests a coordinate mirrored
    nowhere and absent from Raft. Exempt while the coordinate is absent, strict
    once present.

Scope honesty: that guard reads a build file, so it enforces nothing until
wired into the CI of the repository that owns that file. The runbook says this
explicitly instead of implying this repo covers Mobile.

Suite is 23/23.

@bytemain
bytemain force-pushed the bisheng/raft-artifacts-runbook branch 2 times, most recently from 8bb69d1 to af9f4c7 Compare August 19, 2026 05:59
artin asked that the publication process land in the repo so the next one is
easier. Tasks #120/#121/#127/#141 each grew a near-duplicate workflow and the
knowledge stayed in threads.

Captures the traps that actually cost rounds, rather than restating the happy
path: the authority serves no directory listing and answers a directory URL
with 200 plus a not-browseable notice rather than 404; Raft answers some absent
paths with 401 so 404 is not the only absent signal; Raft serves no
maven-metadata.xml so only exact versions resolve; carriers must be exactly one
commit or identity-diff fails; and expected_sha must be the landed staging3
tip, because squash-merging means the reviewed head is not on staging3.

Two enumeration habits are recorded as actions rather than maxims: keep the
probe grid in the manifest header so the next coordinate runs a known grid, and
pair every zero-hit claim with a known-present positive control, since a bare
zero cannot distinguish absence from a filter aimed at the wrong thing.

Adds stage_manifest.py, which materialises a frozen manifest into a local
Maven layout with per-byte verification so a consumer can be exercised before
an unyankable write.

It deliberately ships no consumer-side version check. Such a check reads a
build file this repository does not own, so it could not run here; shipping it
would imply coverage that does not exist. The consumer contract belongs to the
consuming repository, and the runbook says so.

The 1.7.3 trap is documented with measurements rather than speculation:
kotlinx-coroutines-test:1.7.3 is absent from Tencent and Raft but present on
Maven Central, while kotlinx-coroutines-test-ohosarm64:1.7.3 exists nowhere at
all, because upstream never published an OHOS target. Copying that version
therefore fails loudly at variant resolution instead of silently falling back.

Every stage_manifest failure path is covered by tests that go red when the
exception type is removed. Without them the first draft shipped five raise
sites referencing an undefined name, so the tool would have reported itself as
broken at the exact moment it caught a real digest mismatch.

Suite is 24/24.

Signed-off-by: BiSheng <raft-mobile-bisheng@mail.build>
@bytemain
bytemain force-pushed the bisheng/raft-artifacts-runbook branch from af9f4c7 to 0469c59 Compare August 19, 2026 06:06
@bytemain
bytemain merged commit 81977c3 into staging3 Aug 19, 2026
14 checks passed
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