Repository navigation
feat: hearth options, manifest plugin and manifest diff - #2
Merged
Merged
Conversation
Onboard the repository to the frostyard baseline (core ADR-0071, rows B1 to B19) and add the first part of hearth (core ADR-0085): - proto/frostyard/hearth/v1/options.proto: hearth_rpc (51370), hearth_selector (51371) and hearth_event (51372), in the in-house range 51370 to 51379 until the Protobuf global extension registry grants a number. - internal/model: the shared app model and its generation rules. - cmd/protoc-gen-hearth-manifest: writes manifest.json, valid against schema/manifest-v1.json; golden and failure fixtures. - cmd/hearth: hearth manifest diff OLD NEW and hearth manifest validate. - buf, protoc-gen-go, golangci-lint and svu pinned in mise.lock; local plugins only; make gen-check regenerates and fails on a diff. - A Go gate replaces the template's Node scripts (ADR-0005), with an import-boundary test, and a docs site (core ADR-0070, ADR-0084).
… optional A selector inside a map value or a repeated message has no single value for the permission check, so generation now refuses it instead of skipping it or recording it as singular. The manifest plugin declares FEATURE_PROTO3_OPTIONAL, without which protoc and buf refuse it for a file with a proto3 optional field; the e2e proto now has an optional field. The manifest guide leaves OLD absent when the default branch has no manifest. Both guards have a correction record (core ADR-0081).
…e fail closed The selector walk's cycle guard now keys on the message and whether the path is inside a map or a repeated field, so a recursive repeated or map field no longer hides a selector. The documented gate recipe checks that the base commit exists and tests the manifest path with git cat-file, so only an absent manifest at an existing base skips the comparison. Both guards have a correction record (core ADR-0081).
git cat-file -e also fails when the path exists but its object cannot be read (a partial clone), which skipped the comparison. The recipe now looks the path up with git ls-tree on the verified base: only a lookup that succeeds and prints no entry leaves OLD absent; a failed lookup or git show stops the gate.
bketelsen
approved these changes
Nov 16, 2026
This was referenced Nov 16, 2026
Merged
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
The first PR of hearth, the toolkit that frostyard/core ADR-0085 records. It onboards the repository to core's repository baseline (rows B1 to B19) and adds the options, the manifest plugin, the manifest schema and the compatibility check. The permission runtime, the lodge adapter, the MCP plugin and the events plugin come in later phases (docs/plans/0001-roadmap.md).
proto/frostyard/hearth/v1/options.protodefinesMethodOptions.hearth_rpc(51370),FieldOptions.hearth_selector(51371) andMessageOptions.hearth_event(51372). The numbers 51370 to 51379 are in-house until the Protobuf global extension registry grants a number.buf lint(STANDARD) passes.internal/model): builds the app model that every plugin shares, and fails generation on: an RPC with nohearth_rpc, no permission, a wrong app prefix, no effect or an emptyexpose; an agent RPC that streams or carriesgoogle.protobuf.Anyor a map of messages; a selector field that is not a singular string; a duplicate tool name or event type; a bad example; an event whose read permission is scoped by a selector that its topic does not carry.cmd/protoc-gen-hearth-manifest): writesmanifest.jsonin canonical JSON and validates it againstschema/manifest-v1.json(JSON Schema 2020-12) before it writes it. Golden tests compile the fixtures in memory with protocompile (docs/specs/manifest.md).cmd/hearth,manifest.Diff):hearth manifest diff OLD NEWexits 1 on a breaking change (removed operation, tool or event; changed permission, effect, selector or topic; changed app) unless NEW's version is the next major (for0.y.z, the next minor), 0 when OLD is absent or nothing breaks, 2 on an unreadable or invalid manifest.mise.tomlandmise.lock(checksums for 4 platforms); local plugins only;buf.lockhas no dependency (descriptor.proto is built into buf).make gen-checkregeneratesgen/andtestdata/e2e/gen/into a temp dir and fails on a diff.internal/workflowcheck(symlinks, corrections in core's canonical form, risk paths with rules B and C, Dependabot, pinned actions, buf config),internal/repocheck(links, docs index, private hosts, and the import boundary: no lodge, other frostyard, bketelsen or Pi module), andinternal/cmd/corrections-base.docs/org-adrs.md, a docs site in core ADR-0070's layout (site/,make site,.github/workflows/site.yml), README of kindtool,AGENTS.md,SECURITY.md,policies/agent-governance.json.Risk tier
Level:
level:L1. Risk tier: 3. This PR adds the risk list itself and every path in it. The L1 paths it touches, and why the change is safe:mise.toml,mise.lock: new pins of buf, protoc-gen-go, golangci-lint and svu, each from the aqua registry with a checksum per platform; Node is gone. CI installs exactly these.go.mod,go.sum: the module's first dependencies (protobuf, protocompile, jsonschema, yaml), from the Go checksum database;make vulncheckreports 0 reachable vulnerabilities.buf.yaml,buf.lock,buf.gen.yaml: local plugins only, no dependency, no remote BSR plugin (a test fails on a remote plugin or a dependency without a digest).proto/frostyard/hearth/v1/options.proto,internal/model/**: new; they declare and check permissions but grant nothing at runtime yet. Each refusal rule has a failure fixture..svu.yml: new; the tag rulev[0-9]*withv0: true. No release workflow exists.The L2 paths (
.github/**,policies/**,Makefile, the gate's tests, the manifest plugin,manifest/,schema/) are new or rewritten for the Go gate. Every action stays pinned to a full SHA, every workflow haspermissions: {}at the top, and every checkout setspersist-credentials: false.Docs housekeeping
TEMPLATE.mddocs/README.mdVerification
make ci BASE=origin/maingreen before the first push (verify, gen-check, race, cross, corrections-base)make sitebuilds in strict modescripts/check-corrections.mjs --root .:ok corrections: 8 records; core'scheck-readme.mjs:ok README.md (tool, 289 words)# vX.Y.Z,permissions: {}, andpersist-credentials: falseTestReadPermissionOnTopicandTestFail/read-permission-not-on-topicfail; a file that importsgithub.com/frostyard/lodge/kit/manifestfailsTestImportBoundary; 1 byte added totestdata/e2e/gen/manifest.jsonfailsmake gen-check; a missingbuf.lockfails the buf test; a non-canonical correction record fails the corrections test.Cross-review
Coder model:
deepseek/deepseek-flash. Reviewer:openai/gpt-6.1-sol, read-only, base4e2c50e7a1fef405418b92979ec5b105085c256f.go.sumand deleted template files excluded)65114ab685e05252abbd0f5abe7485de988d3273FEATURE_PROTO3_OPTIONAL, (3, low) the guide made an empty OLD file73c8f1ae2ce0d8551c8fa762f3a53839d7d58dfc619085dd5db7029a91dc5dd7bdf29e753713f17fgit cat-file -efailure taken as absenta880a27f8b5cbe592879b6a54a5987f1f8055e2dGuards: the fixtures
selector-in-map-value,selector-in-repeated-message,selector-in-recursive-repeated,TestSelectorInsideCompound,TestProto3Optional(and anoptionalfield intestdata/e2e/proto, whichmake gen-checkruns through a realbuf generate), theAGENTS.mdrule "A gate recipe fails closed", and 4 records in.memory/corrections/2026-11-15-pr-2-*.json.Revert tests: without the read-permission rule,
TestReadPermissionOnTopicandTestFail/read-permission-not-on-topicfail (scratch worktree at65114ab); without the compound-path rule,TestSelectorInsideCompound/a_map_value_message,/a_repeated_message_field,TestFail/selector-in-map-valueandTestFail/selector-in-repeated-messagefail; with the old cycle guard,TestSelectorInsideCompound/a_recursive_repeated_message,/a_recursive_map_value_messageandTestFail/selector-in-recursive-repeatedfail; without the feature flag,TestProto3Optionalfails.