The fixture corpus's docs/ never reaches git: .gitignore's docs/ rule is unanchored #73

Open
opened 2026-09-30 11:08:05 -04:00 by jared · 0 comments
Owner

What happens

.gitignore excludes pkgdown's output with docs/. Without a leading slash that
pattern matches a docs/ directory at any depth, so it also excludes
inst/extdata/fixture_corpus/docs/. It has done so since the package skeleton
(f703504): those files have never been tracked.

data-raw/regenerate_fixture_corpus.R writes four reference docs there on purpose
(.copy_docs(): README.md, data_dictionary.md, reader-specification.md,
series_breaks.md), and the fixture's manifest.json points at three of them
(schema.data_dictionary, series_breaks_ref, reader_spec_ref).

What it breaks

  • A fresh clone, CI included, has a fixture whose manifest names files that are not
    there.
  • cog_mirror(include = "docs") against the fixture copies no docs, because
    .mirror_docs() skips a missing doc in a local corpus without a message. No test
    notices; the suite passes either way (1,101 pass, 2 skip on 2026-09-30).
  • The only copy of the current four files is the old Nextcloud folder, which became a
    data home when the repo moved out of Nextcloud on 2026-09-30. Regenerating the
    fixture recreates them from the pipeline's publish tree.

Fix

  1. Anchor the rule: docs/ → /docs/, matching /doc/ and /Meta/ beside it.
  2. Regenerate the fixture, or copy the four files from the data home, and commit them.
    A scan on 2026-09-30 found no hostnames or home paths in them. Main mirrors to
    GitHub, so scan again if they are regenerated first.
  3. Optional: a test that every docs/ path named in the fixture manifest exists, so
    this cannot go quiet again.
## What happens `.gitignore` excludes pkgdown's output with `docs/`. Without a leading slash that pattern matches a `docs/` directory at any depth, so it also excludes `inst/extdata/fixture_corpus/docs/`. It has done so since the package skeleton (f703504): those files have never been tracked. `data-raw/regenerate_fixture_corpus.R` writes four reference docs there on purpose (`.copy_docs()`: `README.md`, `data_dictionary.md`, `reader-specification.md`, `series_breaks.md`), and the fixture's `manifest.json` points at three of them (`schema.data_dictionary`, `series_breaks_ref`, `reader_spec_ref`). ## What it breaks - A fresh clone, CI included, has a fixture whose manifest names files that are not there. - `cog_mirror(include = "docs")` against the fixture copies no docs, because `.mirror_docs()` skips a missing doc in a local corpus without a message. No test notices; the suite passes either way (1,101 pass, 2 skip on 2026-09-30). - The only copy of the current four files is the old Nextcloud folder, which became a data home when the repo moved out of Nextcloud on 2026-09-30. Regenerating the fixture recreates them from the pipeline's publish tree. ## Fix 1. Anchor the rule: `docs/` → `/docs/`, matching `/doc/` and `/Meta/` beside it. 2. Regenerate the fixture, or copy the four files from the data home, and commit them. A scan on 2026-09-30 found no hostnames or home paths in them. Main mirrors to GitHub, so scan again if they are regenerated first. 3. Optional: a test that every `docs/` path named in the fixture manifest exists, so this cannot go quiet again.
jared added the severity/low
ws
corpus
type
defect
labels 2026-09-30 11:08:05 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Civilytics/uscogdata#73