Skip to content

Step 4's COMPILE_CMD and LINT_CMD rows state a site count in prose that nothing checks #152

Description

@dmccoystephenson

Summary

The COMPILE_CMD and LINT_CMD rows of the Step 4 substitution table describe their substitution sites by count rather than by name:

  • COMPILE_CMD (create-dev-loop.md:624): "Substitute the same text in both places it appears (Phase 3 verify block, Phase 8 rebase fence)."
  • LINT_CMD (create-dev-loop.md:626): "Appears in both the Phase 3 verify block and the Phase 8 rebase fence — include or omit it in both".

Both are accurate today (two occurrences each in the template body, verified by counting {{COMPILE_CMD}} and {{LINT_CMD}} tokens between the outer fences). The TEST_CMD row used the same "both places" phrasing until PR #151, and it went stale the moment PR #121 added a third occurrence — the word "both" encodes a count that nothing checks, so a later PR that adds a site has no prompt to revisit the row.

Why it matters

The drift mechanism recorded in #139 is not specific to TEST_CMD: any row that states a site count in prose will silently disagree with the template after an occurrence is added. scripts/check_docs.py verifies that a row exists per placeholder, not that its prose matches the template's occurrence count, so the disagreement passes CI.

Suggested directions

Offered as options for the maintainer:

  1. Drop the count words. Rephrase both rows to "Substitute the same text everywhere {{COMPILE_CMD}} appears (Phase 3 verify block, Phase 8 rebase fence)", matching the TEST_CMD row's form after Enumerate all three TEST_CMD substitution sites in the Step 4 row #151. The parenthetical can still go stale, but the sentence no longer asserts a number that contradicts the template.
  2. Make the count mechanical. Add a check_docs.py case that, for each placeholder, compares the number of occurrences in the template body against a machine-readable annotation on the row (e.g. a trailing <!-- sites: 2 --> comment), with a fixture case in tests/test_check_docs.py that fails when they disagree. This is the only option that catches the class rather than the instances, at the cost of a new convention in the table.

Option 1 is a two-line docs fix; option 2 is a small Stage B / check-expansion cycle. Either is appropriately scoped for one loop cycle.

Research grounding

No RESEARCH.md finding applies. This is a documentation-accuracy observation with no empirical claim behind it.

Provenance

Observed as an out-of-diff finding during the Phase 4 self-review of PR #151, which corrected the TEST_CMD row. Rewording the sibling rows was outside #139's scope.

This issue body was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions