Skip to content

chore: bring the repository to core's baseline (ADR-0071) - #49

Merged
bketelsen merged 2 commits into
mainfrom
irulan/baseline
Nov 6, 2026
Merged

bketelsen merged 2 commits into
mainfrom
irulan/baseline

Conversation

@frostyard-machines

@frostyard-machines frostyard-machines commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Brings lodge to core's repository baseline (frostyard/core ADR-0071, docs/specs/repository-baseline.md, rows B1 to B17), as bketelsen/truenas-mcp#52, frostyard/frostmail#170 and frostyard/frostnotes#131 do for theirs. lodge already had most of it: AGENTS.md with 3 of its 4 links, the docs shape, the gate triad, pinned actions, .svu.yml, MIT and the corrections inbox. This PR adds what was missing, guards it with Go tests in internal/workflowcheck (which make verify runs), and rewrites the README to core's README standard (ADR-0072, row B17). The test file is frostnotes#131's, with lodge's governed paths.

This PR changes no product code and no behaviour: git diff origin/main --stat -- '*.go' go.mod go.sum kit cmd client ui shell packaging dev Makefile mise.toml mise.lock lists only internal/workflowcheck/ (1 new _test.go file and its doc.go comment). The kit, the client and the UI package are unchanged, so the apps that pin them (frostnotes, frostmail, frostread, Porter) are not touched.

  • B1: .cursorrules is a new relative symlink to AGENTS.md, beside CLAUDE.md, GEMINI.md and .github/copilot-instructions.md. .claude/skills already links to .agents/skills/, whose TEMPLATE/SKILL.md is byte-identical to bketelsen/agentic-template.
  • B6: .github/risk-paths.json (27 entries) and the caller .github/workflows/risk-paths.yml, byte-identical to the template's (core's reusable workflow at 1b02a12, the latest commit of that workflow; permissions: {}). The label risk:high now exists in this repository.
  • B7: .github/pull_request_template.md: frostnotes' version, with lodge's gates in Verification (make check, the nsl frontend checks, make race/cross, make deb, make vulncheck, and the apps that pin the libraries).
  • B13: .github/dependabot.yml: github-actions, gomod (/, /kit) and npm (/client, /ui, /shell), weekly and grouped, with ci:/build: prefixes so that svu reads them as patches.
  • B14: SECURITY.md: private vulnerability reporting at https://github.com/frostyard/lodge/security; only the latest release of each series (vX.Y.Z, kit/, client/, ui/) gets fixes. Private vulnerability reporting is on (gh api repos/frostyard/lodge/private-vulnerability-reporting gives enabled: true).
  • B17: README.md in the service kind (below).
  • Guard: internal/workflowcheck/baseline_test.go checks B1 (the 4 links are relative and resolve to AGENTS.md; .claude/skills), B2 (each corrections line follows core's check-corrections.mjs rules), B6 (strict parse, core's glob validator and matcher, each why names a category of core's risk-paths spec, every workflow and the release, credential, auth, socket-admission and migration paths exist and are listed, and no glob is stale) and B13 (each go.mod, package.json, Cargo.toml or Dockerfile has its Dependabot entry).
  • AGENTS.md gets a "Repository baseline" section, the new link, and 2 corrections: Dependabot now exists, and make ci runs ui-check too. docs/org-adrs.md lists the core ADRs that bind the repository now (0011, 0012, 0018, 0019, 0053, 0058, 0068, 0070, 0071, 0072, 0073 added).

Not copied: the template's Node gate

As in frostmail#170 and frostnotes#131, scripts/check-template.mjs is not copied: lodge runs no Node on the host (AGENTS.md, Gates), and make verify is a host gate that make bump also runs. internal/repocheck already checks the docs' links and index in Go. The baseline rows do not ask for it. I ran core's own scripts at origin/main on the new files, in an nsl machine: node scripts/check-risk-paths.mjs --root <worktree> --caller .github/workflows/risk-paths.yml gives ok risk_paths: 27 entries, and node scripts/check-corrections.mjs --root <worktree> gives ok corrections: 3 lines.

README (B17)

Kind: service (core's README spec lists lodge under it). Checker, from core at origin/main (node .agents/skills/frostyard-readme/scripts/check-readme.mjs), in an nsl machine:

Before (--ref origin/main):

FAIL R1 expected exactly 1 "<!-- readme-kind: <kind> -->" line, found 0 (none)
FAIL R3 the top block has 276 words (at most 130), without the marker, images, badges and headings
FAIL R4 expected exactly 1 "**Status:**" line in the top block, found 0 (none)
FAIL R5 expected exactly 1 "**Documentation:**" line in the top block, found 0 (none)
FAIL R10 there is no Where to go next section
FAIL R12 there are 5 dates in YYYY-MM-DD form outside fenced code (at most 2)

After: ok README.md (service, 503 words).

Old part Verdict Where
Lead ("A tailnet-only web shell…") kept Lead, with who it is for and where it runs
5 bullets (only process on the network, apps behind it, agent tokens, untrusted bytes, inference) kept What it does, each with a link to its spec or design
"Apps build on the Go kit… The contract… is app-contract.md" kept What it does (the libraries) and Interface
Status paragraph (tags, dates, which apps run) dropped, a copy The tags and dates are in AGENTS.md (Status, Releases and dependencies) and the roadmap; the status line keeps "pre-release" and the apps that run behind it
Develop (requirements and 4 make targets) kept Develop: mise install, make check, make ci; make help lists the rest (vulncheck, build)
License kept Where to go next
(new) Interface added The routes of docs/specs/lodge-http.md, Routes
(new) Deploy added The release path and packaging/README.md, the runbook (install, update, roll back, release)

Inventory

Every file that is not product code, with its verdict.

File or group Verdict Why
AGENTS.md keep, edited The canonical file. Adds .cursorrules, the baseline in the Map line of internal/workflowcheck, a "Repository baseline" section, and corrects the Dependabot and make ci lines
CLAUDE.md, GEMINI.md, .github/copilot-instructions.md keep Relative symlinks to AGENTS.md
.cursorrules add B1 symlink
.claude/skills, .agents/skills/TEMPLATE/SKILL.md keep The skills alias (ADR-0029); the template is byte-identical to agentic-template
.agents/skills/new-lodge-app/ keep lodge's own skill (scaffold a new app), tested by internal/scaffoldcheck; its packaging templates are in risk-paths.json
.memory/corrections.jsonl keep, appended 1 line from lodge#47's review, plus 2 from this PR's review fixes; now guarded by TestCorrectionsInbox
docs/README.md, docs/adr/ (20 + template), docs/design/ (1 + template), docs/specs/ (6 + template), docs/plans/ (1 + template) keep Already the ADR-0025 shape, indexed; internal/repocheck checks the links and the index
docs/org-adrs.md keep, edited Lists the binding core ADRs (B3)
README.md keep, rewritten B17 (above)
client/README.md, client/CHANGELOG.md, ui/README.md, ui/CHANGELOG.md, shell/README.md keep The packages' own pages; the changelogs carry their tags
LICENSE (MIT) keep B10
SECURITY.md add B14
.github/pull_request_template.md add B7
.github/dependabot.yml add B13
.github/risk-paths.json, .github/workflows/risk-paths.yml add B6
.github/workflows/{ci,release}.yml keep Unchanged; B5 is met and TestWorkflowsFollowADR0021 holds it
Makefile, mise.toml, mise.lock, .svu.yml, .golangci.yml, .gitignore keep Unchanged; B4, B8, B11 are met
dev/ (nsl/provision.sh, e2e.sh, fakeapp/) keep Development tooling that AGENTS.md and make use. provision.sh runs as root: listed in risk-paths.json
packaging/ keep Release and install files and their runbook; listed in risk-paths.json

Counts: 7 new files (1 of them a symlink; 1 a test file), 5 edited (AGENTS.md, README.md, docs/org-adrs.md, internal/workflowcheck/doc.go, .memory/corrections.jsonl), 0 moved, 0 deleted. lodge has none of the framework trees that B16 names (docs/superpowers/, .planning/, .cursor/, .gaai/, yeti/, cairn/, docs/agents/).

Baseline rows

Row Status Evidence or reason
B1 Instruction surface done 4 relative symlinks to AGENTS.md; TestInstructionAliases
B2 Corrections inbox met 3 valid lines; TestCorrectionsInbox, TestCorrectionProblems follow core's line rules
B3 Docs shape met docs/README.md, the 4 categories with TEMPLATE.md, docs/org-adrs.md linked from the index; org-adrs.md brought up to date
B4 Make gate and tool pins met verify, check, ci (ci: verify race cross client-check ui-check shell-check); mise.toml, mise.lock
B5 Pinned, least-privilege actions met Every uses: is a 40-character SHA with a version comment; top-level permissions: {}; persist-credentials: false; TestWorkflowsFollowADR0021. The new caller follows it
B6 Risk paths done 27 entries: governance (the list, workflows, Makefile, mise pins, internal/{workflowcheck,repocheck,packagecheck}), publication (release.yml, .svu.yml, the .deb, its check and install.sh, the system unit, sysusers.d and tmpfiles.d entries, the app unit templates in packaging/app-template/ and the new-lodge-app skill), update verification (dev/nsl/provision.sh, root), secrets and credentials (internal/{codexauth,copilotauth}, the inference layer's provider keys and socket), auth (MCP tokens, tailnet, WhoIs, allow-lists, sessions, the gateway's route checks, headers, proxy and files, the agent and control sockets, the app socket uid check, the daemon's wiring in cmd/lodge/main.go, the development build's fixed identity and its release guard, the kit's socket peer check, private JSON-RPC socket, socket-rule checks, MCP session binding, manifest and netguard), secrets and credentials also cmd/lodgectl/login.go, destructive operations (internal/store/store.go, internal/store/migrations/**); TestRiskPaths, TestMissingPaths, TestWhyCategory, TestValidGlob, TestMatchGlob
B7 PR template done Has ## Risk tier
B8 svu versions met .svu.yml, no .svu.yaml; make bump tags svu next
B9 Tool documentation site follow-up A separate PR (core ADR-0070, the frostyard-docs-site skill)
B10 License met MIT (gh api … .license.spdx_id = MIT)
B11 Go toolchain met go 1.27.1 (toolchain go1.27.3), golangci-lint = "2.15.0", as the frostyard-go-repo skill's Fleet toolchain names; no other pin. No bump PR is due
B12 CI entry met Separate jobs, as the row allows (core ADR-0073): ci.yml runs on pull_request each prerequisite of ci: as make verify, make race, make cross, make client-check, make ui-check and make shell-check (the frontends with IN_NSL='sh -c'); the ci recipe has no commands
B13 Dependabot done 6 entries; TestDependabotCoversManifests
B14 Security policy done SECURITY.md links /security; private vulnerability reporting is on
B15 No CODEOWNERS met None
B16 No leftover framework trees met None; .claude/ holds only skills
B17 README done Core's checker prints ok README.md (service, 503 words)

Follow-ups: B9 (docs site), in a separate PR. No B11 bump is due.

Risk tier

Risk tier: 3. The PR adds a workflow and the risk-path list. The base has no .github/risk-paths.json, so the label workflow does not run on this PR. These paths match the new list:

  • .github/risk-paths.json: the new list. Core's validator passes it.
  • .github/workflows/risk-paths.yml (also .github/workflows/**): a byte-identical copy of the template caller. It runs on pull_request_target with permissions: {} at the top and contents: read, pull-requests: write for the job, calls core's reusable workflow at a full SHA, and checks out no code.
  • internal/workflowcheck/**: 1 new test file and the package comment. Tests only; no existing test changes.
  • .memory/corrections.jsonl is not on the list; it gets 2 appended lines.

No other workflow, the Makefile, the mise pins, or any packaging, credential, auth or kit file changes.

Docs housekeeping

  • No new doc under docs/; docs/org-adrs.md stays indexed
  • Conformance alias added as a symlink; the canonical AGENTS.md is edited instead

Verification

  • make check: exit 0 (tidy, vet with and without e2e, gofmt, golangci-lint 2.15.0 0 issues. in both modules, all tests)
  • go test -count=1 -v -run 'TestInstructionAliases|TestCorrection|TestRiskPaths|TestMatchGlob|TestValidGlob|TestWhyCategory|TestDependabot' ./internal/workflowcheck/: pass; the tests log 3 corrections lines, 27 globs; 68 required paths listed; 316 files searched, 5 manifests, 6 Dependabot entries
  • Each guard fails on purpose (scratch worktree at 93a6ccc, restored after each case and removed with git worktree remove; go test -count=1 -run <test> ./internal/workflowcheck/):
    1. internal/tokens/** removed: internal/tokens/tokens.go is a release, secrets, auth or governance path; .github/risk-paths.json must list it.
    2. A glob nothing/here/** added: glob "nothing/here/**" matches no file in the repository.
    3. A member extra added to the list: unknown object member name "extra".
    4. The /kit gomod entry removed: kit/go.mod has no Dependabot entry (package-ecosystem gomod, directory /kit).
    5. .cursorrules as a copy: .cursorrules is not a symlink; as an absolute link: links to the absolute path … it must be relative.
    6. A sixth member in the corrections line: line 1: unknown key(s): extra.
    7. headers dropped from the gateway glob: internal/gateway/headers.go is a release, secrets, auth or governance path; ….
    8. A why of security:: it must start with 1 of the categories … and a colon.
    9. .github/workflows/risk-paths.yml deleted: .github/workflows/risk-paths.yml is missing; the repository must have it, and .github/risk-paths.json must list it.
  • Revert test of the review fixes (scratch worktree at fd04642, restored and removed with git worktree remove after): with .github/risk-paths.json of 93a6ccc and the new tests kept, TestRiskPaths fails on the 7 newly required paths (cmd/lodge/main.go, cmd/lodgectl/login.go, kit/jsonrpc/listen_linux.go, kit/jsonrpc/listen_other.go, kit/kittest/kittest.go, kit/kittest/rules.go, internal/store/store.go); with the caller deleted, it fails with … is missing; with the test file of 93a6ccc and the caller deleted, it passed (the gap the fix closes).
  • Core's check-risk-paths.mjs, check-corrections.mjs and check-readme.mjs at origin/main pass (nsl)
  • git diff origin/main -- '*.go' go.mod go.sum shows only internal/workflowcheck/
  • CI green

Cross-review

  • Coder: Claude Opus (github-copilot/claude-opus-5.5). Reviewer: openai/gpt-6.1-sol. Base 0e9057f.
  • Initial review of 93a6ccc (all 11 files, 1 batch): Not ready, 2 blocking points. Fixed in fd04642, each with its guard and 1 line in .memory/corrections.jsonl:
    1. The risk list missed 4 security-relevant files (cmd/lodge/main.go, cmd/lodgectl/login.go, kit/jsonrpc/listen_linux.go, internal/store/store.go): listed, with listen_other.go and kit/kittest/{kittest,rules}.go, which a grep for peer checks, file modes, credentials and migrations also found; governedPaths requires all 7.
    2. A missing required path still matched a wide glob (.github/workflows/** matched a deleted caller): missingPaths and TestMissingPaths now require each path to exist.
  • Re-review 1 of fd04642: Ready, Blocking: none.

Add the files of core's repository baseline (frostyard/core ADR-0071,
docs/specs/repository-baseline.md) that lodge lacked: the .cursorrules
alias, the risk-path list and its caller (ADR-0068), the PR template,
Dependabot, SECURITY.md, and a README in the service kind of core's
README spec (ADR-0072). internal/workflowcheck now checks the files of
rows B1, B2, B6 and B13. No product code changes.
…emaining auth, credential and migration files

A required path that is missing still matched a wide glob such as
.github/workflows/**, so the guard passed without the caller. The list
now also covers lodge's daemon wiring, lodgectl's provider login, the
kit's private JSON-RPC socket and socket-rule checks, and the store's
migration runner.
@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants