Skip to content

fix: guard make bump on main, refuse -C for components, shorten README - #510

Merged
bketelsen merged 2 commits into
mainfrom
lucilla/sweep-504-505-508
Nov 13, 2026
Merged

bketelsen merged 2 commits into
mainfrom
lucilla/sweep-504-505-508

Conversation

@frostyard-machines

Copy link
Copy Markdown
Contributor

Summary

Fixes 3 sweep findings.

  • sweep: make bump tags without checking that HEAD is main (core ADR-0012) #504: make bump releases main only (core ADR-0012: "requires a clean tree on main"). The new target make bump-main-check fails unless the current branch is main and HEAD equals origin/main after git fetch origin main. Another branch, a detached HEAD, an unpushed commit, and a HEAD behind the remote all fail with a message. bump runs it right after svu-version-check, so it fails fast. It runs it again after the clean-tree check and before $(SVU) next, because the build, test and lint steps are long.
  • sweep: updex components accepts -C/--definitions and silently ignores it #508: updex components refuses -C/--definitions. A definitions override is 1 flat directory that bypasses component discovery, so it has no components. An empty list would look like "this host has no components". Before this change, the command listed the host's components without a warning. Client.Components now returns components cannot be combined with a definitions override (--definitions): a definitions directory has no components. The catalog commands (catalogRepos) and --component with -C (loadDomain) already refuse the flag the same way. To honour the flag in another way, -C would need a new meaning (a root for discovery). That is a change of the flag's contract, so this PR does not do it.
  • sweep: updex/baseline-B17 README fails the README standard (no kind marker, 5067 words) #505: the README follows the core README spec (kind tool, 564 words, from 5067). The CLI manual moves without rewording to the new spec page docs/specs/cli-reference.md, which is indexed in docs/README.md. Content that already had a page is linked instead of copied: the .catalog keys, the search roots and the signature policy are in config-reference.md, and erofs-utils and packaging are in packaging-and-maintainers.md. Facts that only the README had move into those pages: the signature trade-off, the v2.0.0 to v2.0.2 upgrade notes, and that a vacuum which cannot read the state "deletes nothing and warns". ## Security is dropped, because SECURITY.md holds it (linked in Where to go next). The documentation line links docs/README.md, because the tool has no docs site yet (sweep: updex/baseline-B9 no tool documentation site (site/, site.yml, Pages) #507).

Things that pointed at the old README now point at the new page:

  • TestE2E_GlobalFlagsAreDocumentedInREADME is renamed to …InCLIReference and reads the ### Global flags table of docs/specs/cli-reference.md. It still fails when a global flag has no row: I checked this by removing the --verbose row.
  • The no catalogs configured error text.
  • The packaging-and-maintainers.md and overview.md links.
  • A link-only repair in ADR-0018 (core ADR-0033).
  • The AGENTS.md docs list, which now names the CLI reference as the user-facing reference.

The prose in ADR-0014 still says "the README documents this migration" (lines 83 and 87). It is an accepted ADR, so only link-only changes are allowed there. The facts it refers to are now in config-reference.md.

Fixes #504
Fixes #505
Fixes #508

Checks

  • make fmt
  • make ci passes: ==> CI gate passed (run with umask 0022; under umask 0077 3 file-mode tests fail on the host, with or without this change)
  • go test ./cmd/updex ./tests/e2e/... green
  • New behavior has focused tests: TestMakefileBumpRecipeChecksMain, TestBumpMainCheckBehaviour (5 cases in a temporary repository with a bare origin), TestClient_Components_RefusesDefinitionsOverride, TestRunComponents_RefusesDefinitionsOverride
  • README checker (core .agents/skills/frostyard-readme/scripts/check-readme.mjs at core origin/main): ok README.md (tool, 564 words); before: 12 FAIL lines (R1, R4, R5, R8 x6, R9, R10, R11)

Risk tier

  • Tier 1: Low
  • Tier 2: Moderate
  • Tier 3: High
  • Tier 4: Critical

Rationale: this PR touches 2 paths that .github/risk-paths.json lists at level L1, so it gets risk:high:

  • Makefile ({Makefile,mise.toml,mise.lock}, release-and-publication). Why it is safe: the change only adds a check that can make make bump stop. The recipe still runs the same steps in the same order, and nothing in it tags or pushes in a new way. The check reads git state and runs git fetch origin main, which is read-only for the working tree. CI never runs bump. TestBumpMainCheckBehaviour runs the real recipe against a temporary bare origin.
  • updex/catalog.go (updex/{features,catalog,…}.go, installation-and-update). Why it is safe: the only change is the text in parentheses of the no catalogs configured error, which now names docs/specs/cli-reference.md and no longer names a README section that is gone. No logic changes, and no test pins that part of the text.

Docs housekeeping

  • README.md, docs/design/overview.md, docs/specs/* updated; AGENTS.md updated (make targets, release automation, troubleshooting, components, docs list)
  • New doc docs/specs/cli-reference.md follows docs/specs/TEMPLATE.md and is indexed in docs/README.md
  • Conformance aliases untouched

Verification

  • node scripts/check-docs.mjs green (30 docs, 586 links, 9 symlinks)
  • Checked against the PR review rubric

make bump now fails unless HEAD is main and equals origin/main after a
fetch (core ADR-0012). updex components refuses -C/--definitions, because
a definitions directory has no components. The README follows the core
README spec (kind tool); the CLI manual moves to docs/specs/cli-reference.md.

Fixes #504
Fixes #505
Fixes #508
@github-actions github-actions Bot added documentation Improvements or additions to documentation go Pull requests that update go code level:L1 Read every line risk:high Touches a path in .github/risk-paths.json labels Nov 13, 2026
@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…estore moved facts

Cross-review findings on #510: an explicit fetch refspec so a stale
refs/remotes/origin/main cannot pass the bump guard, every inherited GIT_*
variable dropped from the test git environment, the checksums.txt
attestation fact restored in the CLI reference, and the README minimum-image
summary aligned with the next-boot gate.
@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Cross-review record

  • Reviewer: openai/gpt-6.1-sol. Coder: deepseek/deepseek-flash, with small edits by the author.
  • Base: 688c9b2108083e267bde480d15e0392fc05d1f96.
  • Initial review of head 92227fb: 2 batches (code and tests, then the docs move), all 20 files. Result: Not ready, with 4 blocking findings.
    1. bump-main-check could trust a stale refs/remotes/origin/main when the remote has no fetch refspec.
    2. The test git environment kept inherited GIT_* variables, so a test could write the caller's index.
    3. The CLI reference called the install matrix the whole artifact set and lost the checksums.txt attestation fact.
    4. The README minimum-image summary implied that the host must boot first.
  • Fixes in bc39e32:
    1. An explicit fetch refspec, plus a regression case where a peer clone advances origin and the tracking ref is stale. This case fails with the old fetch line.
    2. Every inherited GIT_* variable is dropped, plus TestIsolatedGitEnvDropsRepositorySelection.
    3. The CLI reference text is corrected.
    4. The README text is corrected.
    • Guards: the tests above, a rule in the AGENTS.md "Documentation" section, and 2 lines in .memory/corrections.jsonl.
  • Re-review 1 of head bc39e3227870d5e7bc8df67e598890b7583f98fa: Ready, Blocking: none. There are no new findings.

Revert test

In a scratch worktree from the PR head, I set Makefile and updex/domain.go back to the base and kept the tests. Then I ran go test ./updex/ ./cmd/updex/ -run 'BumpMain|ChecksMain|RefusesDefinitionsOverride'. These tests fail:

  • TestMakefileBumpRecipeChecksMain
  • TestBumpMainCheckBehaviour: all cases. The 4 refusal cases fail because the expected message is missing.
  • TestClient_Components_RefusesDefinitionsOverride
  • TestRunComponents_RefusesDefinitionsOverride

I removed the scratch worktree afterwards.

Risk paths

Makefile (L1) and updex/catalog.go (L1). The PR body says why each change is safe.

@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 13, 2026
@bketelsen
bketelsen added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit 0f0729e Nov 13, 2026
22 checks passed
@bketelsen
bketelsen deleted the lucilla/sweep-504-505-508 branch November 13, 2026 18:35
bketelsen pushed a commit to frostyard/frostyard-org that referenced this pull request Nov 15, 2026
* docs: follow Updex v2.3.1 in the Updex guide

The v2.3.1 README (frostyard/updex#510) no longer has the sections the
guide deep-linked. Point those links to docs/specs/cli-reference.md and
docs/specs/config-reference.md at v2.3.1, and add short lines for the
suite-switch unit, the other-suite cleanup, and the empty-specifier error
(frostyard/updex#515, #516, #518, #519). check-site.mjs now pins the
v2.3.1 sources and refuses a README deep link.

* docs: state what the other-suite cleanup keeps in the Updex guide

The vacuum keeps the newest image of each other suite, the linked image
and a merged image, and keeps every other-suite image on systemd older
than 258 while the feature is merged (updex v2.3.1 cli-reference, "What
the vacuum keeps"). check-site.mjs asserts both conditions; the record
is .memory/corrections/2026-11-14-pr-126-other-suite-vacuum-claim.json.

---------

Co-authored-by: frostyard-machines <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation go Pull requests that update go code level:L1 Read every line ready-for-human Reviewed, CI green: ready for Brian to review and merge risk:high Touches a path in .github/risk-paths.json

Projects

None yet

2 participants