You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ban Every Version Literal in the Four Instruction Documents and Catch Abbreviated SHAs - #1813
This settles one end state for the fleet, which the maintainer chose. AGENTS.md, GOVERNANCE.md, CODESTYLE.md, and WORKFLOW.md carry no three-part version and no commit SHA, full or abbreviated. That covers four kinds of literal, because no check can tell them apart:
Kind
Written instead as
a pin's value
its mechanism ("SHA-pinned to a hub release")
an illustrative example
a placeholder (1.0.N)
a minimum version
the name of the manifest or skill that holds the number
a fixed constant
a description ("the all-zero placeholder version")
A two-part language minimum, such as a Python minor, stays. It is how such a rule is stated.
Rule text: GOVERNANCE.md "References", comment-and-doc-style, and its carried-doc-references.md item 3 state exactly what the audit enforces.
Audit:spec/audit.py also flags an abbreviated SHA of 7 to 12 characters mixing digits and letters, as a standalone token. Selftest cases cover both directions: an abbreviated SHA and a worked example are flagged, while a placeholder, a hex color, a hex constant, an all-letter word, and an identifier suffix are not.
Docs: AUDIT.md and spec/fidelity-model.md describe the widened scan.
This follows up #1809, which banned only a pin's value. A fleet scan found worked examples, minimum-version floors, and constants in the same files. Downstream fixes follow, one PR per affected repository.
Verification
audit.py --selftest passes, and the hub's four files scan clean.
build_dist.py --check, prose_lint.py --diff origin/develop --allow-comments, docker_lint.py (7 linters), and the test_prose_lint and test_build_dist suites pass.
The local strict review ran two edit rounds. The last pass raised 3 findings, which are answered in this PR's first fix commit.
…ted SHAs
Settles one end state for the fleet: AGENTS.md, GOVERNANCE.md,
CODESTYLE.md, and WORKFLOW.md carry no version literal and no commit SHA,
whether a pin's value, an example, a minimum version, or a fixed
constant, since a check cannot tell them apart. Each is written as its
mechanism, a placeholder, or the name of the manifest that holds it.
The audit now also flags an abbreviated SHA of 7 to 12 characters
mixing digits and letters, with selftest cases for both directions.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Answers the strict pass: the rule names the four files the audit scans
and a three-part version or commit SHA, leaving a two-part language
minimum as the way such a rule is stated, so no rule text claims more
than the check reads. The reference item scopes itself the same way, the
comment-and-doc-style paragraph on bare commit references names the new
scan, the abbreviated-SHA pattern ignores identifier suffixes, and the
comments describe the widened scope.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Answers the pre-push strict review: the version ban moves out of the
reference-ban opening into its own paragraph after the carve-outs,
which neither lifts, so the surfaces test reads only the surfaces list,
and an abbreviated SHA after a hyphen, as in a sha- image tag, is
flagged again while an identifier suffix stays clean.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Updates the fleet documentation and audit logic so the four instruction documents (AGENTS.md, GOVERNANCE.md, CODESTYLE.md, WORKFLOW.md) avoid copying any three-part version literals and any commit SHA (full or abbreviated), and so the audit can detect those literals in carried prose.
Changes:
Expand spec/audit.py’s version-literal scan to flag abbreviated SHAs (in addition to three-part versions and full 40-hex SHAs), with corresponding selftests.
Update governance and audit documentation to describe the broader “no version literal / SHA literal” rule and its rationale.
Propagate the updated rule text into the distributed skill copies and source digest.
File
Description
spec/fidelity-model.md
Updates fidelity documentation to reflect the broadened version-literal / SHA scan behavior.
spec/audit.py
Extends the version-literal detector regex and expands selftests to cover new literal categories.
GOVERNANCE.md
Broadens the “References” rule to ban three-part versions and full/abbrev SHAs in the four instruction docs.
AUDIT.md
Updates audit documentation to describe the widened literal scan and its new abbreviated-SHA coverage.
.github/skills/comment-and-doc-style/SKILL.md
Updates distributed skill text to reflect the broadened literal ban (generated copy).
Answers Copilot on #1813: the abbreviated-SHA branch now matches either
case, as the full-SHA branch does, with a selftest case.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟡 Changes recommended
The abbreviated-SHA regex currently misses uppercase short SHAs and the newly edited skill/reference prose is hard-wrapped despite the repo’s “one logical paragraph per line” convention.
Get a fresh assessment by requesting another Copilot review.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The DRIFT finding message in spec/audit.py still uses the narrower pre-change wording and should be updated to match the expanded abbreviated-SHA and version-literal scope.
Update DRIFT wording to reflect broader version literal checks
spec/audit.py:2684
The DRIFT finding message still says the file “names a three-part version or a commit SHA”, but the scan now flags a broader “version literal” set including abbreviated SHAs; the user-facing wording should match the expanded rule so the remediation guidance is accurate.
Answers Copilot's out-of-thread finding on #1813: the drift message
names the abbreviated SHAs the scan now flags.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Update DRIFT wording to reflect broader version literal checks (spec/audit.py)
Fixed in e90c5fc: the finding now says "a three-part version or a commit SHA, full or abbreviated". The two hard-wrap threads are declined in-thread, and the tree-wide mismatch behind them is filed as #1814.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🔵 Needs a closer look
The abbreviated-SHA regex currently allows a #-prefixed abbreviated SHA (e.g. #f3b4cc9) to bypass detection, and the selftest suite should cover (and/or enforce) the intended behavior for that case.
The abbreviated-SHA branch intentionally excludes tokens preceded by '#', which means a commit abbreviation can slip through the scan if written as #f3b4cc9 (common Markdown shorthand). If the rule is meant to ban commit SHAs regardless of a leading '#', add a dedicated '#'-prefixed abbreviated-SHA branch that does not overlap with 8-hex CSS colors.
Add selftest for #-prefixed abbreviated SHA
spec/audit.py:3976
The selftest suite does not cover a '#'-prefixed abbreviated SHA (e.g. #f3b4cc9), which currently is not matched by VERSION_LITERAL due to the leading '#'. Add a selftest case so the intended behavior is locked in (and to prevent regressions if the regex is adjusted).
Answers Copilot's out-of-thread findings on #1813 by adding the selftest
case that pins the intended behavior: a hash introduces an issue or pull
request number on GitHub, never a commit, so the scan leaves it alone.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Match #-prefixed abbreviated SHAs too (spec/audit.py)
Declining. On GitHub a leading # introduces an issue or pull request number, and a commit is referenced bare or as owner/repo@sha, so #f3b4cc9 is not a commit-reference form. The # exclusion also keeps hex colors out. The two SHA forms that do occur, bare and sha- prefixed, are both flagged.
Add selftest for #-prefixed abbreviated SHA (spec/audit.py)
Done in c309a94: "a hash-prefixed hex token is not a SHA" pins the intended behavior, using the same token that the abbreviated-SHA case flags when it is bare.
The reason will be displayed to describe this comment to others. Learn more.
Copilot review overview
🟢 Approval recommended
The audit logic, selftests, and documentation updates are consistent with the stated end state and introduce no evident correctness or maintenance issues in the reviewed changes.
…rship to Main (#1827)
Promotes `develop` to `main`.
## Carried
- #1806: adds the unattended handoff loop and the attended resume
procedure.
- #1807: renames three skills and states which skill wins each shared
trigger.
- #1809: names a pin by its mechanism rather than its value, and audits
for copies.
- #1808: leads every choice with a recommendation and closes every
session in order.
- #1813: bans every version literal in the four instruction documents
and catches abbreviated SHAs, following #1809.
- #1820: refuses a coverage marker indented into a code block, per
#1725.
- #1823: states that the hub commits audit reports and that a downstream
session resyncs itself. This covers the Fleet Bootstrap section, the
host fleet block, `RESYNC.md`, `AUDIT.md`, `check-this-repo`, and
`resync-a-repo`, and settles #1822. The Fleet Bootstrap section is
byte-locked, so every carrier reports drift on it until its next resync.
- #1825: strips a tilde or unclosed fence before reading review
coverage, per #1821.
Closes#1725Closes#1821Closes#1822
🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commentsPermits the comment lines the pull request adds or edits, which the prose gate otherwise refuses
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This settles one end state for the fleet, which the maintainer chose.
AGENTS.md,GOVERNANCE.md,CODESTYLE.md, andWORKFLOW.mdcarry no three-part version and no commit SHA, full or abbreviated. That covers four kinds of literal, because no check can tell them apart:1.0.N)A two-part language minimum, such as a Python minor, stays. It is how such a rule is stated.
comment-and-doc-style, and itscarried-doc-references.mditem 3 state exactly what the audit enforces.spec/audit.pyalso flags an abbreviated SHA of 7 to 12 characters mixing digits and letters, as a standalone token. Selftest cases cover both directions: an abbreviated SHA and a worked example are flagged, while a placeholder, a hex color, a hex constant, an all-letter word, and an identifier suffix are not.This follows up #1809, which banned only a pin's value. A fleet scan found worked examples, minimum-version floors, and constants in the same files. Downstream fixes follow, one PR per affected repository.
Verification
audit.py --selftestpasses, and the hub's four files scan clean.build_dist.py --check,prose_lint.py --diff origin/develop --allow-comments,docker_lint.py(7 linters), and thetest_prose_lintandtest_build_distsuites pass.🤖 Generated with Claude Code