Repository navigation
chore: bring repogen to core's repository baseline (ADR-0071) - #89
Merged
Merged
Conversation
Meets rows B1 to B17 of frostyard/core docs/specs/repository-baseline.md, except B9 (docs site) and B11 (Go 1.27), which follow in their own PRs. No product code changes. - mise.toml and mise.lock pin golangci-lint 2.15.0, node and svu (ADR-0043). - Makefile: the gate triad verify, check and ci (ADR-0044), lint at the mise pin, vuln, test-race, build-cross, and bump with svu. - .svu.yml keeps svu on v0.x: the upstream fork's v1.0.x tags made 'svu next' answer v2.0.0. - ci.yml (renamed from test.yml) runs 'make ci' in 1 job. - release.yml: permissions move from the top level to the job; checkouts keep no credentials (ADR-0021). - .github/risk-paths.json and the risk-paths caller (ADR-0068). - PR template Risk tier section (ADR-0019); SECURITY.md (ADR-0040). - README to the README spec, kind tool (ADR-0072); its guides move to docs/guides/, which the docs gate now indexes and link-checks. - internal/baseline: contract tests for the rows the tree can show.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
… errors, fix guide examples Cross-review of #89 found 3 blocking points: - apk and pacman generators write signatures but matched no risk glob; - make bump printed success after a failed git tag; - Debian and sysext examples in docs/guides lacked --codename or --base-url. Guards: B6 must-match paths, TestRepositoryBaselineB8BumpStopsOnFailure, an AGENTS.md rule for command examples, and 3 corrections lines. The B5 test now also requires a top-level permissions key and scans .yaml files.
The fixture env drops every GIT_* variable and MAKEFLAGS, uses an empty global git config, no system config and no hooks, so git cannot reach another repository through GIT_DIR, GIT_WORK_TREE or GIT_INDEX_FILE. TestBumpFixtureIgnoresInheritedGitEnvironment points those variables at a decoy repository and checks that it stays unchanged.
GNU make reads the files that MAKEFILES names before the fixture's own Makefile, so an inherited value could add a prerequisite to bump. TestBumpFixtureIgnoresInheritedMakefiles injects one that writes a marker outside the fixture and checks that the marker never appears.
This was referenced Nov 6, 2026
bketelsen
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR brings repogen to frostyard/core's repository baseline (ADR-0071, spec, rows B1 to B17). It follows the same pattern as bketelsen/truenas-mcp#52, frostyard/core#205 and frostyard/updex#492. repogen had no agent-framework tree left, but 9 rows were open: B4, B5, B6, B7, B8, B12, B14 and B17 (B3 needed only
org-adrs.mdlines).mise.tomlandmise.lock(go fromgo.mod, golangci-lint2.15.0, node24.22.2, svu3.4.1; 7 platforms with checksums). The Makefile now hasverify(tidy diff, vet, gofmt check, lint, docs gate, unit tests; it writes nothing),check(fmt+verify) andci(verify,vuln,test-race,test-packages-docker,test-integration,build-cross).make lintnow requires the pinned golangci-lint and fails when the tool is missing.frostyard-go-reposkill's Fleet toolchain table. It reports0 issueson this tree with no code change. Go itself stays at1.26.0/toolchain go1.26.10: the Go 1.27 bump is the B11 follow-up..svu.ymlwithtag.pattern: "v0.*". The tagsv1.0.0tov1.0.4come from the upstream forkralt/repogen, andv1.0.0tov1.0.3are ancestors ofmain. Without the pattern,svu nextanswersv2.0.0; with it,v0.7.3.make bumprunssvu next, refuses an answer that is notv0.x, and creates the annotated tag locally. A maintainer pushes it..github/workflows/test.yml→ci.yml, 1 jobmake ci. The old steps are all insidemake ci, in the same order: lint, govulncheckv1.9.0, race tests withcoverage.txt,make test-packages-docker,make test-integration, docs gate. The codecov upload stays. The separateDocs integrityjob is gone becausemake ciruns the docs gate. No ruleset requires a status check here (gh api repos/frostyard/repogen/rules/branches/mainlists none), so the job names can change.release.ymltop levelpermissions: {}, andcontents: writeon its only jobgoreleaser; its checkout and the CI checkout setpersist-credentials: false. GoReleaser publishes throughGITHUB_TOKENin its env, not through the git credentials..github/risk-paths.json(16 globs: governance, release and publication, the action and its scripts, signing (signer, deb Release, apk and pacman generators), the sysext and CLI verification code, the release contract tests) and.github/workflows/risk-paths.yml(core's caller, pinned at1b02a129). The labelrisk:highwas created for it. Core'svalidateRiskPathsreturns{"ok":true}for the list.## Risk tiersection in the PR template; the Checks list namesmake checkandmake ci.SECURITY.md: only the latestv0.xrelease gets fixes (todayv0.7.2). Reports go through https://github.com/frostyard/repogen/security; private vulnerability reporting is on (gh api repos/frostyard/repogen/private-vulnerability-reporting→{"enabled":true}). The fork notes and the scope are in the file.tool. Core's checker printsok README.md (tool, 416 words). Its content moves to 4 guides indocs/guides/(map below).scripts/check-docs.mjsnow indexes and link-checksdocs/guides/, and also link-checksRELEASING.md,SECURITY.mdanddocs/org-adrs.md(checked: 30 docs, 286 links, 9 symlinks).docs/org-adrs.mdadds core ADR-0012 (svu), 0019, 0040, 0043, 0044, 0053, 0068, 0070, 0071, 0072, 0073.internal/baseline/repository_baseline_test.go, a test-only package with 1 test per row the tree can show (B1 to B8, B10, B12 to B17). It reads the committed tree throughgit ls-files, and has fixture tables for the checkout-credentials scan (9 cases), the risk glob matcher (20 cases) andmissingEcosystems(5 cases).AGENTS.md(latest releasev0.7.2, the snosi pinb5dccc7, the svu rule, the gate targets,risk:high, the README rule),RELEASING.md(make ci,svu,make bump),docs/design/ci-cd.md,docs/design/quality-loop.md,test/README.md,.claude/session-summary.md.No product change:
git diff origin/main --stat -- '*.go' ':!*_test.go' go.mod go.sum .goreleaser.yml .github/actions 'scripts/*.sh'is empty. The only Go file is the new_test.go.A note on the fork: GitHub still lists repogen as a fork of
ralt/repogen(fork: true). The spec defines a code repository as "not a fork", and its fork exemption is meant for forks that follow their upstream (hotedge, Logomenu, incus). repogen does not follow its upstream: its code, releases and consumers are its own. This PR therefore holds it to every row.Inventory
Every path that is not product code:
AGENTS.md;CLAUDE.md,GEMINI.md,.cursorrules,CONTRIBUTING.md,.github/copilot-instructions.md(symlinks).claude/settings.json,.claude/skills→.agents/skills.claude/session-summary.md.agents/skills/(3 synced skills).memory/README.md,.memory/corrections.jsonlcheck-corrections.mjs→ok corrections: 17 lines.docs/README.md,docs/{adr,design,specs,plans}/withTEMPLATE.mddocs/plans/0001-frostyard-production-publisher.mddocs/org-adrs.mddocs/quality.md,docs/metrics.md,docs/review-rubric.md(symlinks)docs/guides/{usage,client-setup,publish-to-r2,development}.mdREADME.mdMakefile,.golangci.yml,.goreleaser.yml,.editorconfig,.gitignore,.coverage-thresholds.json.gitignore(coverage.txt) changed.golangci.ymland.goreleaser.ymlnot changed.mise.toml,mise.lock,.svu.yml.github/workflows/test.ymlci.yml, rewrite.github/workflows/release.yml.github/workflows/risk-paths.yml,.github/risk-paths.json.github/pull_request_template.md.github/dependabot.ymlgomod,github-actions(root and/.github/actions/*); no other manifest..github/actions/publish-to-r2/.github/ISSUE_TEMPLATE/,.github/prompts/scripts/*.shscripts/check-docs.mjsdocs/guides/and 3 more files (stricter only).RELEASING.mdmake bump.SECURITY.mdLICENSEtest/README.md,test/e2e/README.md,test/build-test-packages.sh,test/fixtures/test/README.mdupdated.internal/releaseasset/internal/baseline/Counts: 0 framework trees, 1 renamed, 11 added, 14 changed, 0 deleted.
Old README → new place: Supported package types, the RPM note, Features, Installation, Usage (basic, Debian publication, Debian
generaterequirements, incremental mode with the S3 examples, signing, configuration options), GPG key setup, Examples, Troubleshooting →docs/guides/usage.md(adds the missing--html-indexflag, and the--base-urltext asrepogen generate --helpgives it). Generated repository structures, Repository structure details, See also →docs/guides/client-setup.md. GitHub Action →docs/guides/publish-to-r2.md. Testing, Contributing, "Integration tests fail" →docs/guides/development.md. Dropped: the example CI YAML (unpinned actions, Go 1.23; untrue for this repository), "For Maintainers" and "CI/CD Workflows" (a copy ofRELEASING.mdanddocs/design/ci-cd.md), "License" (the README linksLICENSE). Acknowledgments → READMECredits.Baseline rows
AGENTS.md100644; 4 aliases 120000 →AGENTS.md. New test.verify,check,ci(cirunsverify);mise.toml,mise.lock. New test.uses:SHA-pinned with a version comment; top level{}orcontents: read; every checkoutpersist-credentials: false. New test with fixtures..svu.yml,make bump, action, scripts and all signing code (signer, deb, apk, pacman, sysext) covered. New test with glob fixtures.## Risk tier. New test..svu.yml(patternv0.*),make bumpruns$(SVU) nextunderset -e. Tests pin the pattern and runmake bumpin an isolated temporary repository.docs/but no site. A separate PR addssite/with thefrostyard-docs-siteskill, movesdocs/guides/there, and points the README's documentation line athttps://frostyard.github.io/repogen/(it linksdocs/README.mduntil the site exists).gh api repos/frostyard/repogen/license→MIT. New test.go 1.26.0/toolchain go1.26.10; the fleet is Go 1.27. golangci-lint is already at the fleet's 2.15.0 (above). A Go bump can change behavior: separate PR.ci.ymlrunsmake cion pull requests. New test.missingEcosystemstable.SECURITY.md; private vulnerability reporting on. New test..claude/holds the 3 allowed names. New test (committed tree).tool, 416 words, checkerok. New test (marker, word count, no tree drawing).Follow-ups: B9 docs site PR; B11 Go 1.27 PR.
Risk tier
Rationale:
risk:high. The base has no.github/risk-paths.jsonyet, so the caller does not run on this PR; the label was added by hand. Core'smatchFileswith the new list matches these changed paths. Why each change is safe:.github/workflows/release.yml(glob.github/workflows/release.yml,.github/workflows/**): thecontents: writegrant moves from the top level to the only job, so the job's token does not change. The checkout addspersist-credentials: false; GoReleaser usesGITHUB_TOKENfromenv, and the job pushes nothing with git. The action SHAs and GoReleaserv2.18.1do not change (TestRepositoryReleaseContractHasOnePinnedPublisherAndVerifiedConsumerstill passes)..github/workflows/ci.yml(renamed fromtest.yml;.github/workflows/**):contents: read, no secret. The same checks run throughmake ci. The newjdx/mise-actionstep uses the SHA that updex's CI already uses..github/workflows/risk-paths.yml,.github/risk-paths.json(governance globs): the agentic-template caller with the sameon, permissions and core SHA (only the header comment differs),pull_request_target, checks out nothing.Makefile,mise.toml,mise.lock: new gate targets andbump;build,test-*,install,fmtrecipes do not change.bumponly creates a local tag, does not push, and stops on the first failed command (TestRepositoryBaselineB8BumpStopsOnFailure)..svu.yml: new; it decides the next version.svu next→v0.7.3(correct: 2deps:commits sincev0.7.2).The tag release cannot run on a PR, so the release permission move is shown by the contract tests, not by a release run. The next tag shows it.
Docs housekeeping
docs/README.md(the 4 guides; guides take noTEMPLATE.md)Verification
make verify(mise tools): exit 0; golangci-lint 2.15.00 issues; docs gatechecked: 30 docs, 286 links, 9 symlinks; every packageok;git status --porcelainempty after it.make vuln: 0 vulnerabilities.make test-race,make build-cross: exit 0.make test-packages-dockerandmake test-integrationneed Docker: CI runs them.svu next→v0.7.3; without.svu.yml→v2.0.0.scripts/install-release.sh --github-release v0.7.2 b5dccc7fe10f40d55d34b092cf7ed92dd1473c26 amd64 <tmp>→installed 0.7.2 b5dccc7…(the README's Install command, to a temporary path).check-readme.mjs→ok README.md (tool, 416 words).tag.pattern→TestRepositoryBaselineB8SvuConfigfails; heading renamed →TestRepositoryBaselineB7RiskTierSectionfails;release.ymltop levelcontents: write→TestRepositoryBaselineB5WorkflowHardeningfails;persist-credentials: falseremoved fromci.yml→ B5 fails.git grep -n 'test\.yml' -- ':!docs/adr' ':!.agents'prints nothing.Cross-review
Coder:
deepseek/deepseek-flash(small edits byclaude-opus-5.5). Reviewer:openai/gpt-6.1-sol. Base714adf4919f1fe7e74ea36237acf2a6398e52584throughout.64433c3, all 27 paths in 2 batches;mise.lockchecked for versions and checksums only): Not ready, 3 blockers. All accepted and fixed infeb56ac:internal/generator/{apk,pacman}/generator.go; both paths in the B6 must-match list.make bumpprinted "tagged" after a failedgit tag→ the recipe runs underset -e;TestRepositoryBaselineB8BumpStopsOnFailureruns it with a fake svu (existing tag, av2.0.0answer, a failingsvu next, the success path).docs/guides/(moved from the old README) lacked--codename/--base-url→ fixed;AGENTS.mdrule that everyrepogen generateexample must run as written.Non-blocking, fixed: the B5 test now requires a top-level
permissions:key and scans.yaml(TestWorkflowIssues, 6 fixtures). Guards: 3 lines in.memory/corrections.jsonl.feb56ac): the 3 blockers resolved; 1 new blocker: the bump fixture inheritedGIT_*variables, so an inheritedGIT_DIRcould send its git commands to another repository. Fixed in15aa64a: the fixture env drops everyGIT_*, uses an empty global config, no system config, no hooks;TestBumpFixtureIgnoresInheritedGitEnvironmentpointsGIT_DIR,GIT_WORK_TREE,GIT_INDEX_FILEat a decoy repository and checks it stays unchanged. Low, fixed: the cause in the new corrections line.15aa64a): 1 blocker: an inheritedMAKEFILEScould add a prerequisite to the fixture'sbump. Fixed in51b9751:MAKEFILESandGNUMAKEFLAGSdropped;TestBumpFixtureIgnoresInheritedMakefilesinjects a makefile that writes a marker outside the fixture and checks it never appears.51b975164b8e84084c516973a4c7b01365599b4b): Ready, Blocking: none.Revert tests (scratch worktrees from the PR head, each removed after):
Makefileand oldrisk-paths.json→TestRepositoryBaselineB6RiskPathsfails (internal/generator/apk/generator.go matches no risk glob, same for pacman) andTestRepositoryBaselineB8BumpStopsOnFailurefails (a failed bump must not report a tag: tagged v0.0.1);TestBumpFixtureIgnoresInheritedGitEnvironmentfails (git add Makefile mise.toml: exit status 128, the fixture's git ran in the decoy);MAKEFILESkept →TestBumpFixtureIgnoresInheritedMakefilesfails (an inherited MAKEFILES ran a step outside the fixture).