Skip to content

feat: say how many tags were skipped when no_tags fires on a tagged repo - #95

Merged
lesnik512 merged 1 commit into
mainfrom
feat/no-tags-count
Oct 4, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
feat/no-tags-count

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Closes #94.

When the forge lists tags but none is SemVer-form, the no_tags reason now says so instead of reading as if the repo were tagless:

None of the repo's 3 tags is SemVer-form (1.2.0 or v1.2.0); create an initial tag such as 0.1.0 (or v0.1.0 for v-prefixed tags) on a default-branch commit.

With no tags at all the message is unchanged. The Rich terminal message follows the same pattern.

Decisions (from the triage grilling on #94):

  • Count only, never tag names. Tag names are repo-supplied text, and JsonOutput.emit writes reason unredacted. Quoting them would need per-field redaction and would undercut the audit pinned in test: pin RunResult's fields so a new one forces a redaction audit #92. A number keeps reason semvertag-controlled.
  • Status stays no_tags, exit stays 0. Failing CI on upgrade for repos whose only tags are floating majors (v1) or PEP 440 would be worse than the silent green run. The status tokens are a frozen contract.
  • The count lives on the internal NoTags outcome (skipped_tag_count, required, so every producer states it), not on RunResult. Wire fields and schema_version are unchanged.
  • Docs: a Troubleshooting entry in both provider guides listing the ignored forms (V1.2.0, release-1.2.0, 0.9.0rc1, floating v1). No ADR, no glossary change.

The seed advice is now a constant in both _outcome.py and _output.py; ADR-0002 keeps the wire and terminal renderings split, and the existing "edit both" comment covers it.

Tests: the use case with a stub provider reports the count (0 and 3); to_run_result and RichOutput.emit render both wordings and the singular.

Verified with just lint-ci, just test-ci (499 passed, 100% coverage), just adr-check and just docs-build.

@lesnik512
lesnik512 merged commit d333e65 into main Oct 4, 2026
14 checks passed
@lesnik512
lesnik512 deleted the feat/no-tags-count branch October 4, 2026 09:43
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.

Say why no_tags fired when the repo has tags but none parse

1 participant