Skip to content

Packaging fixes and the module path, so a fresh reader finds what the README claims - #215

Merged
scttfrdmn merged 3 commits into
mainfrom
peer-review-prep
Aug 2, 2026
Merged

scttfrdmn merged 3 commits into
mainfrom
peer-review-prep

Conversation

@scttfrdmn

Copy link
Copy Markdown
Owner

Two commits, ahead of showing the project to a peer. Everything here is something a fresh reader hits before reaching a Go file.

fc1e3f7 — the module path (#213)

go.mod declared module github.com/objectfs/objectfs. The code is at github.com/scttfrdmn/objectfs. Go resolves an import path by fetching that path, so the module was not importable under the name it gave for itself.

Worse than a typo: github.com/objectfs/objectfs is a real repository owned by someone else — an unrelated Python project from 2017, 28 stars, last pushed 2019, in a single-repo organisation created the same day. Anyone who read the import paths here and went looking for the source landed on a stranger's abandoned filesystem. It is also why pkg.go.dev had nothing to index and the Go Reference badge rendered empty.

154 files: go.mod, 132 Go files, the goimports local-prefixes setting, the Dockerfile image-source label, and the repository URLs in the Python and JavaScript SDK manifests — those last were pointing contributors at the wrong project.

Verified by resolution, not grep, since resolution was the failure: an external consumer module importing github.com/scttfrdmn/objectfs/pkg/types resolves and runs.

Breaking import-path change, technically. Nothing could have depended on the old path — it was never fetchable.

93aa797 — eight packaging items

Two were broken in a way that exits 0:

  • scripts/setup-hooks.sh, the first command CONTRIBUTING.md tells a contributor to run, installed nothing on any current macOS or Debian host and reported success. pip3 install fails with PEP 668's externally-managed-environment inside an if/elif condition, so set -euo pipefail never saw it and the brew branch that would have worked was never reached. Four more defects in the same script, including a gosec module path that 404s and a golangci-lint pin that cannot parse this repo's own config.
  • .github/dependabot.yml labelled every PR automerge while that label did not exist. Dependabot drops unknown labels silently; every approve and merge step was gated on it. 46 PRs opened, 0 ever merged.

The Dependabot ticket's premise was wrong twice over. The cargoship failure was not a credential problem — proxy.golang.org had no .mod for the pinned version, Go fell through to direct git, and git rendered the proxy's 404 as could not read Username for 'https://github.com'. An authentication message for something that was not an authentication failure, which is what sent the previous diagnosis chasing a secret that was never missing. Resolved upstream.

Fixing only the label would have converted a silent no-op into a red X on every dependency PR: auto-merge was disabled on the repository, and the workflow's check-regexp matched 2 of 9 checks. Three independent defects, one symptom. Which checks must pass now lives in branch protection, where it also governs human PRs and cannot drift from a regexp.

Also: three badges reporting unknown / retired / empty; four make warnings on every invocation including make help; a docker-compose.yml that was not valid YAML; two documents describing an objectfs-windows.exe that does not exist; three npm/maven ecosystems added so the 8 open Dependabot alerts have something that can act on them.

pre-commit run --all-files now completes, which it could not — the pretty-format-yaml hook crashed importing pkg_resources. Repairing that surfaced a conflict worth knowing about: check-yaml is PyYAML/1.1 and rejects a bare URL in a flow sequence, pretty-format-yaml is ruamel/1.2 and permits it, so quoting to satisfy one makes the other unquote, forever. Block form is the answer.

The golangci-lint pre-commit hook is scoped to --new-from-merge-base, matching CI. It previously ran the whole repository and blocked on 64 findings the committer did not introduce — a hook that cannot pass on a clean checkout is a hook that teaches --no-verify.

Verification

go build · go vet · golangci-lint run --new-from-merge-base all clean. go test -race -count=1 ./... — 32 packages, 0 failures. All pre-commit hooks pass on both commits.

Deliberately not done

  • The Go Reference badge stays off. It should return only after a tag is published under the corrected path and pkg.go.dev has indexed it. Not something to assert in advance.
  • .golangci.yml is excluded from pretty-format-yaml. The formatter dedents its block sequences and unquotes its path:/text: regexes — valid YAML either way, but it pushes every trailing comment out of alignment with the entry it annotates, and those comments are the recorded reason each linter is on or off.
  • A pre-existing markdownlint backlog (MD013 line length, MD029 list numbering, MD051 TOC anchors) in 7 files this branch does not substantively touch, and 64 whole-repo golangci-lint findings. Both pre-exist on clean main; reformatting unrelated documents is not this branch's job. Worth its own issue.

Closes #213.

Eight items, none of them code. The project is about to be read by someone
fresh, and every one of these is something they would hit before reaching a
Go file.

Two were broken in a way that exits 0. `scripts/setup-hooks.sh` — the first
command CONTRIBUTING.md tells a contributor to run — installed nothing on any
current macOS or Debian host and reported success, because `pip3 install`
fails with PEP 668's externally-managed-environment inside an if/elif
condition, so `set -euo pipefail` never saw it and the `brew` branch that
would have worked was never reached. And `.github/dependabot.yml` labelled
every PR `automerge` while that label did not exist; Dependabot drops unknown
labels silently, every approve and merge step was gated on it, and the result
was 46 PRs opened and 0 ever merged.

The Dependabot ticket's premise was wrong twice over. The cargoship failure
was not a credential problem — proxy.golang.org had no .mod for the pinned
version, Go fell through to direct git, and git rendered the proxy's 404 as
"could not read Username for 'https://github.com'". An authentication message
for something that was not an authentication failure, which is what sent the
previous diagnosis after a secret that was never missing. It is resolved
upstream. Fixing only the label would have converted a silent no-op into a red
X on every dependency PR, because auto-merge was disabled on the repository
and the workflow's check-regexp matched 2 of 9 checks. Which checks must pass
now lives in branch protection, where it also governs human PRs.

The rest: three badges that reported "unknown", "retired", and empty; a
Makefile that printed four warnings on every invocation including `make help`;
a docker-compose.yml that was not valid YAML; two documents describing an
objectfs-windows.exe that does not exist.

`pre-commit run --all-files` now completes, which it could not: the
pretty-format-yaml hook crashed importing pkg_resources. Repairing it surfaced
a conflict worth leaving a note about — check-yaml is PyYAML/1.1 and rejects a
bare URL in a flow sequence, pretty-format-yaml is ruamel/1.2 and permits it,
so quoting to satisfy one makes the other unquote and the two never converge.
Block form is the answer.

The golangci-lint pre-commit hook is scoped to `--new-from-merge-base`, the
same gate CI applies. It previously ran the whole repository and blocked on 64
findings the committer did not introduce. A hook that cannot pass on a clean
checkout is a hook that teaches --no-verify.
go.mod said `module github.com/objectfs/objectfs`. The code is at
github.com/scttfrdmn/objectfs. Go resolves an import path by fetching that
path, so the module was not importable under the name it gave for itself:
`go get github.com/scttfrdmn/objectfs` failed on the mismatch, and the
declared path was never fetchable because nothing has ever been published
there.

Worse than a typo. github.com/objectfs/objectfs is a real repository owned by
someone else — an unrelated Python project from 2017, 28 stars, last pushed in
2019, in a single-repo organisation created the same day. Anyone who read the
import paths in this repo and went looking for the source landed on a
stranger's abandoned filesystem, and that is also why pkg.go.dev had nothing
to index and the Go Reference badge rendered empty.

154 files: go.mod, 132 Go files, the goimports local-prefixes setting, the
Dockerfile image-source label, and the repository URLs in the Python and
JavaScript SDK manifests, which pointed contributors at the wrong project.

Verified by building an external consumer module that imports
github.com/scttfrdmn/objectfs/pkg/types and runs, rather than by grepping for
the string — the failure mode here was resolution, and only a resolver can
confirm resolution. Full suite passes with -race across 32 packages; build,
vet, and the scoped lint gate are clean.

The rename also moved `scttfrdmn` past `aws` alphabetically, so goimports
regrouped one import block, and it dragged five docs files and one
.golangci.yml line into the commit's hook scope for the first time. The docs
changes are blank-line-only (MD031/MD032). .golangci.yml is now excluded from
pretty-format-yaml, which dedents its block sequences and unquotes its
regexes, breaking the comment alignment that carries the reason each linter is
enabled.
The rename broke this gate in the most misleading way available. Every package
reported "no floor set (add to .coverage-floors to gate them)" and the job
failed with "at least one package is below its floor" — naming, between those
two lines, nothing at all.

The prefix the gate strips to make floors repo-relative was a literal
`github.com/objectfs/objectfs`. Once it stopped matching, every measured
package kept its full import path while every floor stayed repo-relative, and
the two sets no longer intersected. Nothing was below its floor; nothing had a
floor. A gate that quietly stops matching anything is worse than one that
fails, because "no floor set" reads as a missing entry rather than as a broken
gate.

The rename could not have caught it by search either: inside the awk program
the path was written with escaped separators, `github\.com\/objectfs\/objectfs`,
so a grep for the real path found nothing. That is the actual lesson, and why
this reads the value from go.mod instead of restating it — one authority, the
same file the compiler reads.

Stripped with index/substr rather than sub, because the module path is data
here and sub would read its dots as metacharacters.

Verified by reproducing before fixing: the gate at HEAD exits 1 against a
freshly measured profile, this one exits 0 with 30 packages at or above their
floors and the five unlisted ones exactly the five .coverage-floors documents
as deliberately absent. Confirmed still non-vacuous — a floor planted above
measurement fails, and a floor for a package the profile does not mention
fails as a stale entry, which is the check that would have caught this had the
break not taken every match down at once.
@scttfrdmn
scttfrdmn merged commit d9e1b70 into main Aug 2, 2026
22 checks passed
@scttfrdmn
scttfrdmn deleted the peer-review-prep branch August 2, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

go.mod declares github.com/objectfs/objectfs — the module is not installable, and that path resolves to an unrelated 2019 project

1 participant