Export the loaded manifest type as Manifest (closes #236) #238

Merged
clawbot merged 1 commits from issue-236-export-manifest-type into next 2026-10-21 13:12:21 +02:00
Collaborator

Package mfer handed out a loaded manifest as the unexported type manifest. Without a name for that type, a program that imports the library could not keep a loaded manifest in a struct field or pass one to its own functions. As approved in #236 (comment), the type is now exported as Manifest with its fields kept private. Its existing methods (Files, Signer, CreatedAt, String) are its API; none were added.

  • NewManifestFromReader and NewManifestFromFile return *Manifest. The two //nolint:revive lines that excused returning an unexported type are removed.
  • The type's doc comment says what it is and no longer refers to the design question in the README. String has a doc comment.
  • The new test mfer/manifest_external_test.go, in package mfer_test, keeps a loaded manifest in a struct field of type *mfer.Manifest, passes it to a function that takes one, and reads it through its methods.

Closes #236

Model: opus-5-5

Package `mfer` handed out a loaded manifest as the unexported type `manifest`. Without a name for that type, a program that imports the library could not keep a loaded manifest in a struct field or pass one to its own functions. As approved in https://git.eeqj.de/sneak/mfer/issues/236#issuecomment-153278, the type is now exported as `Manifest` with its fields kept private. Its existing methods (`Files`, `Signer`, `CreatedAt`, `String`) are its API; none were added. - `NewManifestFromReader` and `NewManifestFromFile` return `*Manifest`. The two `//nolint:revive` lines that excused returning an unexported type are removed. - The type's doc comment says what it is and no longer refers to the design question in the README. `String` has a doc comment. - The new test `mfer/manifest_external_test.go`, in package `mfer_test`, keeps a loaded manifest in a struct field of type `*mfer.Manifest`, passes it to a function that takes one, and reads it through its methods. Closes https://git.eeqj.de/sneak/mfer/issues/236 Model: opus-5-5
clawbot added the needs-review label 2026-10-21 12:16:51 +02:00
clawbot self-assigned this 2026-10-21 12:16:52 +02:00
Author
Collaborator

Review failed.

  • Commit message body of 24487ce: four of its five sentences join two statements with a comma and "so" or "and", for example "..., and the lint suppressions for returning an unexported type are gone" and "..., and String has a doc comment". That repeated shape is the two-clause compound sentence that https://git.eeqj.de/sneak/prompts/src/branch/main/prompts/LLM_PROSE_TELLS.md lists as a tell. Acceptable: give each fact its own sentence, or drop a second clause that adds nothing, for example "NewManifestFromReader and NewManifestFromFile return *Manifest. The two lint suppressions for returning an unexported type are removed." The first sentence and the first bullet of the PR body have the same shape and need the same fix.

Model: opus-5-5

Review failed. - Commit message body of 24487ce: four of its five sentences join two statements with a comma and "so" or "and", for example "..., and the lint suppressions for returning an unexported type are gone" and "..., and String has a doc comment". That repeated shape is the two-clause compound sentence that https://git.eeqj.de/sneak/prompts/src/branch/main/prompts/LLM_PROSE_TELLS.md lists as a tell. Acceptable: give each fact its own sentence, or drop a second clause that adds nothing, for example "NewManifestFromReader and NewManifestFromFile return *Manifest. The two lint suppressions for returning an unexported type are removed." The first sentence and the first bullet of the PR body have the same shape and need the same fix. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-21 12:36:26 +02:00
Author
Collaborator

One more finding for the rework, from the plan's own wording:

  • mfer/manifest.go, the doc comment on Manifest: "or made by Builder to write a new manifest file" reads, to a program using the library, as if Builder hands out a *Manifest; it never does. Acceptable: describe only what a caller gets, a manifest loaded by NewManifestFromFile or NewManifestFromReader, with its fields private and its methods the API.

Model: opus-5-5

One more finding for the rework, from the plan's own wording: - `mfer/manifest.go`, the doc comment on `Manifest`: "or made by Builder to write a new manifest file" reads, to a program using the library, as if `Builder` hands out a `*Manifest`; it never does. Acceptable: describe only what a caller gets, a manifest loaded by `NewManifestFromFile` or `NewManifestFromReader`, with its fields private and its methods the API. Model: opus-5-5
clawbot added 1 commit 2026-10-21 12:51:42 +02:00
Package mfer handed out a loaded manifest as the unexported type
manifest. Without a name for that type, a program using the library
could not keep a loaded manifest in a struct field or pass one to its
own functions. As sneak approved, the type is now exported as Manifest
with its fields kept private. Its existing methods (Files, Signer,
CreatedAt, String) are its whole API.

NewManifestFromReader and NewManifestFromFile return *Manifest. The two
lint suppressions that excused returning an unexported type from them
are removed. The type's doc comment now names the two loaders and drops
the pointer to the settled design question. String gets a doc comment.
A test in package mfer_test uses *mfer.Manifest from outside the
package.

Model: opus-5-5
clawbot force-pushed issue-236-export-manifest-type from 24487ce36a to 417c8d09f9 2026-10-21 12:51:42 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-10-21 12:51:50 +02:00
Author
Collaborator

Rework:

  • #238 (comment): the commit message and the PR body's first sentence and first bullet now give each fact its own sentence.
  • #238 (comment): the doc comment on Manifest now names only the two loaders. The PR body's closing paragraph about Builder is dropped.

Model: opus-5-5

Rework: - https://git.eeqj.de/sneak/mfer/pulls/238#issuecomment-153520: the commit message and the PR body's first sentence and first bullet now give each fact its own sentence. - https://git.eeqj.de/sneak/mfer/pulls/238#issuecomment-153536: the doc comment on `Manifest` now names only the two loaders. The PR body's closing paragraph about `Builder` is dropped. Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit 5a88a52ab2 into next 2026-10-21 13:12:21 +02:00
clawbot deleted branch issue-236-export-manifest-type 2026-10-21 13:12:21 +02:00
Sign in to join this conversation.