Split out of #83 (sneak, 2026-10-19: questions should be one issue each); its other questions are settled there.
Package mfer hands out a loaded manifest as the unexported type manifest, so other programs that use the library cannot name it, store it in a struct field, or pass it to their own functions.
Question for sneak: export it as Manifest, or put an exported interface in front of it?
Recommendation: export the type as Manifest, with its fields kept private. Only its methods become the library's API, which commits to no more than an interface would, and it is the usual Go shape. Either choice is part of the 1.0 API and hard to change after it.
Model: opus-5-5
Split out of https://git.eeqj.de/sneak/mfer/issues/83 (sneak, 2026-10-19: questions should be one issue each); its other questions are settled there.
Package `mfer` hands out a loaded manifest as the unexported type `manifest`, so other programs that use the library cannot name it, store it in a struct field, or pass it to their own functions.
**Question for sneak:** export it as `Manifest`, or put an exported interface in front of it?
**Recommendation:** export the type as `Manifest`, with its fields kept private. Only its methods become the library's API, which commits to no more than an interface would, and it is the usual Go shape. Either choice is part of the 1.0 API and hard to change after it.
Model: opus-5-5
sneak
was assigned by clawbot2026-10-19 03:57:00 +02:00
Recorded: export the loaded manifest type as Manifest, fields private (the recommendation). It is built as one reviewed change on next when an account has room; both worker accounts are at their week limit now (sneak/project-management#37).
Model: opus-5-5
Recorded: export the loaded manifest type as `Manifest`, fields private (the recommendation). It is built as one reviewed change on `next` when an account has room; both worker accounts are at their week limit now (https://git.eeqj.de/sneak/project-management/issues/37).
Model: opus-5-5
sneak
was unassigned by clawbot2026-10-21 06:09:08 +02:00
clawbot
self-assigned this 2026-10-21 06:09:08 +02:00
Plan (implementer's brief), as approved in #236 (comment):
In package mfer (mfer/), rename the type manifest to Manifest and update every use: mfer/manifest.go, mfer/builder.go, mfer/checker.go, mfer/deserialize.go, mfer/serialize.go, and the in-package tests mfer/errmsg_test.go and mfer/manifest_test.go. NewManifestFromReader and NewManifestFromFile return *Manifest. No new package.
Fields stay private. No new exported fields or methods; the existing methods (Files, Signer, CreatedAt, String) are the type's API.
Rewrite the type's doc comment to say what it is (a manifest loaded by NewManifestFromFile or NewManifestFromReader, or made by Builder; its fields are private and its methods are the API) and drop the paragraph about an open design question and "README design question 13". Give String a doc comment.
Remove the two //nolint:revive // unexported-return lines on the loaders in mfer/deserialize.go; they no longer apply.
Add a test in package mfer_test, in the new file mfer/manifest_external_test.go, that names *mfer.Manifest from outside the package: stores a loaded manifest in a struct field of that type and passes it to a function taking *mfer.Manifest, then reads it through its methods. Small and plain; load the manifest from bytes a Builder wrote.
No other changes: no doc or CLI edits beyond comments naming the type.
Done when: the PR on next titled ending (closes #236) has script/cibuild green on a fresh clone and an independent review passed.
Model: opus-5-5
Plan (implementer's brief), as approved in https://git.eeqj.de/sneak/mfer/issues/236#issuecomment-153278:
- In package `mfer` (`mfer/`), rename the type `manifest` to `Manifest` and update every use: `mfer/manifest.go`, `mfer/builder.go`, `mfer/checker.go`, `mfer/deserialize.go`, `mfer/serialize.go`, and the in-package tests `mfer/errmsg_test.go` and `mfer/manifest_test.go`. `NewManifestFromReader` and `NewManifestFromFile` return `*Manifest`. No new package.
- Fields stay private. No new exported fields or methods; the existing methods (`Files`, `Signer`, `CreatedAt`, `String`) are the type's API.
- Rewrite the type's doc comment to say what it is (a manifest loaded by `NewManifestFromFile` or `NewManifestFromReader`, or made by `Builder`; its fields are private and its methods are the API) and drop the paragraph about an open design question and "README design question 13". Give `String` a doc comment.
- Remove the two `//nolint:revive // unexported-return` lines on the loaders in `mfer/deserialize.go`; they no longer apply.
- Add a test in package `mfer_test`, in the new file `mfer/manifest_external_test.go`, that names `*mfer.Manifest` from outside the package: stores a loaded manifest in a struct field of that type and passes it to a function taking `*mfer.Manifest`, then reads it through its methods. Small and plain; load the manifest from bytes a `Builder` wrote.
- No other changes: no doc or CLI edits beyond comments naming the type.
Done when: the PR on `next` titled ending `(closes #236)` has `script/cibuild` green on a fresh clone and an independent review passed.
Model: opus-5-5
Built as planned above in #238: the loaded manifest type is exported as Manifest with its fields private, and the loaders return *Manifest. It waits for review there.
Model: opus-5-5
Built as planned above in https://git.eeqj.de/sneak/mfer/pulls/238: the loaded manifest type is exported as `Manifest` with its fields private, and the loaders return `*Manifest`. It waits for review there.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Split out of #83 (sneak, 2026-10-19: questions should be one issue each); its other questions are settled there.
Package
mferhands out a loaded manifest as the unexported typemanifest, so other programs that use the library cannot name it, store it in a struct field, or pass it to their own functions.Question for sneak: export it as
Manifest, or put an exported interface in front of it?Recommendation: export the type as
Manifest, with its fields kept private. Only its methods become the library's API, which commits to no more than an interface would, and it is the usual Go shape. Either choice is part of the 1.0 API and hard to change after it.Model: opus-5-5
clawbot referenced this issue2026-10-19 20:55:43 +02:00
approved.
Recorded: export the loaded manifest type as
Manifest, fields private (the recommendation). It is built as one reviewed change onnextwhen an account has room; both worker accounts are at their week limit now (sneak/project-management#37).Model: opus-5-5
Plan (implementer's brief), as approved in #236 (comment):
mfer(mfer/), rename the typemanifesttoManifestand update every use:mfer/manifest.go,mfer/builder.go,mfer/checker.go,mfer/deserialize.go,mfer/serialize.go, and the in-package testsmfer/errmsg_test.goandmfer/manifest_test.go.NewManifestFromReaderandNewManifestFromFilereturn*Manifest. No new package.Files,Signer,CreatedAt,String) are the type's API.NewManifestFromFileorNewManifestFromReader, or made byBuilder; its fields are private and its methods are the API) and drop the paragraph about an open design question and "README design question 13". GiveStringa doc comment.//nolint:revive // unexported-returnlines on the loaders inmfer/deserialize.go; they no longer apply.mfer_test, in the new filemfer/manifest_external_test.go, that names*mfer.Manifestfrom outside the package: stores a loaded manifest in a struct field of that type and passes it to a function taking*mfer.Manifest, then reads it through its methods. Small and plain; load the manifest from bytes aBuilderwrote.Done when: the PR on
nexttitled ending(closes #236)hasscript/cibuildgreen on a fresh clone and an independent review passed.Model: opus-5-5
Built as planned above in #238: the loaded manifest type is exported as
Manifestwith its fields private, and the loaders return*Manifest. It waits for review there.Model: opus-5-5