Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 96 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,99 @@ trim_trailing_whitespace = false
# Prefer a [SuppressMessage] attribute, or the owning project's .editorconfig.
# Relax a rule repo-wide here only when it applies to every project, never for a brownfield batch.
dotnet_diagnostic.IDE0055.severity = none
dotnet_diagnostic.IDE0003.severity = warning
dotnet_diagnostic.IDE0007.severity = warning
dotnet_diagnostic.IDE0008.severity = warning
dotnet_diagnostic.IDE0009.severity = warning
dotnet_diagnostic.IDE0011.severity = warning
dotnet_diagnostic.IDE0016.severity = warning
dotnet_diagnostic.IDE0017.severity = warning
dotnet_diagnostic.IDE0018.severity = warning
dotnet_diagnostic.IDE0019.severity = warning
dotnet_diagnostic.IDE0020.severity = warning
dotnet_diagnostic.IDE0021.severity = warning
dotnet_diagnostic.IDE0022.severity = warning
dotnet_diagnostic.IDE0023.severity = warning
dotnet_diagnostic.IDE0024.severity = warning
dotnet_diagnostic.IDE0025.severity = warning
dotnet_diagnostic.IDE0026.severity = warning
dotnet_diagnostic.IDE0027.severity = warning
dotnet_diagnostic.IDE0028.severity = warning
dotnet_diagnostic.IDE0029.severity = warning
dotnet_diagnostic.IDE0030.severity = warning
dotnet_diagnostic.IDE0031.severity = warning
dotnet_diagnostic.IDE0032.severity = warning
dotnet_diagnostic.IDE0033.severity = warning
dotnet_diagnostic.IDE0034.severity = warning
dotnet_diagnostic.IDE0036.severity = warning
dotnet_diagnostic.IDE0037.severity = warning
dotnet_diagnostic.IDE0038.severity = warning
dotnet_diagnostic.IDE0039.severity = warning
dotnet_diagnostic.IDE0040.severity = warning
dotnet_diagnostic.IDE0041.severity = warning
dotnet_diagnostic.IDE0042.severity = warning
dotnet_diagnostic.IDE0044.severity = warning
dotnet_diagnostic.IDE0045.severity = warning
dotnet_diagnostic.IDE0046.severity = warning
dotnet_diagnostic.IDE0047.severity = warning
dotnet_diagnostic.IDE0048.severity = warning
dotnet_diagnostic.IDE0049.severity = warning
dotnet_diagnostic.IDE0053.severity = warning
dotnet_diagnostic.IDE0054.severity = warning
dotnet_diagnostic.IDE0056.severity = warning
dotnet_diagnostic.IDE0057.severity = warning
dotnet_diagnostic.IDE0058.severity = warning
dotnet_diagnostic.IDE0059.severity = warning
dotnet_diagnostic.IDE0060.severity = warning
dotnet_diagnostic.IDE0061.severity = warning
dotnet_diagnostic.IDE0062.severity = warning
dotnet_diagnostic.IDE0063.severity = warning
dotnet_diagnostic.IDE0065.severity = warning
dotnet_diagnostic.IDE0066.severity = warning
dotnet_diagnostic.IDE0070.severity = warning
dotnet_diagnostic.IDE0071.severity = warning
dotnet_diagnostic.IDE0074.severity = warning
dotnet_diagnostic.IDE0075.severity = warning
dotnet_diagnostic.IDE0078.severity = warning
dotnet_diagnostic.IDE0079.severity = warning
dotnet_diagnostic.IDE0083.severity = warning
dotnet_diagnostic.IDE0090.severity = warning
dotnet_diagnostic.IDE0130.severity = warning
dotnet_diagnostic.IDE0150.severity = warning
dotnet_diagnostic.IDE0160.severity = warning
dotnet_diagnostic.IDE0161.severity = warning
dotnet_diagnostic.IDE0170.severity = warning
dotnet_diagnostic.IDE0180.severity = warning
dotnet_diagnostic.IDE0200.severity = warning
dotnet_diagnostic.IDE0210.severity = warning
dotnet_diagnostic.IDE0211.severity = warning
dotnet_diagnostic.IDE0220.severity = warning
dotnet_diagnostic.IDE0230.severity = warning
dotnet_diagnostic.IDE0250.severity = warning
dotnet_diagnostic.IDE0251.severity = warning
dotnet_diagnostic.IDE0260.severity = warning
dotnet_diagnostic.IDE0270.severity = warning
dotnet_diagnostic.IDE0290.severity = warning
dotnet_diagnostic.IDE0300.severity = warning
dotnet_diagnostic.IDE0301.severity = warning
dotnet_diagnostic.IDE0302.severity = warning
dotnet_diagnostic.IDE0303.severity = warning
dotnet_diagnostic.IDE0304.severity = warning
dotnet_diagnostic.IDE0305.severity = warning
dotnet_diagnostic.IDE0306.severity = warning
dotnet_diagnostic.IDE0320.severity = warning
dotnet_diagnostic.IDE0330.severity = warning
dotnet_diagnostic.IDE0340.severity = warning
dotnet_diagnostic.IDE0350.severity = warning
dotnet_diagnostic.IDE1005.severity = warning
dotnet_diagnostic.IDE1006.severity = warning
dotnet_diagnostic.IDE2000.severity = warning
dotnet_diagnostic.IDE2001.severity = warning
dotnet_diagnostic.IDE2002.severity = warning
dotnet_diagnostic.IDE2003.severity = warning
dotnet_diagnostic.IDE2004.severity = warning
dotnet_diagnostic.IDE2005.severity = warning
dotnet_diagnostic.IDE2006.severity = warning
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
Expand Down Expand Up @@ -147,13 +240,13 @@ csharp_using_directive_placement = outside_namespace
dotnet_code_quality_unused_parameters = all
dotnet_hide_advanced_members = false
dotnet_member_insertion_location = with_other_members_of_the_same_kind
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
dotnet_naming_rule.camel_case_for_private_internal_fields.severity = warning
dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
dotnet_naming_rule.static_fields_should_have_prefix.severity = warning
dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
Expand Down
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Do not duplicate rules from `AGENTS.md`, `GOVERNANCE.md`, `CODESTYLE.md`, or `WO

## Commit Messages and Pull Request Titles

Use an imperative subject of at most 72 characters with no trailing period. Use US English and title case with lowercase short bind words. Do not add `Co-Authored-By:` unless requested. Do not put a release-bump magnitude in the title. The full contract is in [GOVERNANCE.md "Pull Request Title and Commit Message Conventions"](../GOVERNANCE.md#pull-request-title-and-commit-message-conventions).
Use an imperative subject of at most 72 characters with no trailing period. The limit measures the authored title, and the `(#N)` suffix a squash merge appends sits outside it. Use US English and title case, lowercasing only the short bind words `.github/skills/comment-and-doc-style/SKILL.md` lists, a list that is exhaustive. A `Co-Authored-By:` line is allowed unless the user disallows it or the repository's rules say otherwise. Never include a link to the agent's session, such as a `Claude-Session:` trailer, which nothing overrides. Do not put a release-bump magnitude in the title. The full contract is in [GOVERNANCE.md "Pull Request Title and Commit Message Conventions"](../GOVERNANCE.md#pull-request-title-and-commit-message-conventions).

## Reviewing Carried Fleet Content

Expand All @@ -27,7 +27,7 @@ For every review:

The review automation is `scripts/pr_review.py`, run from a hub checkout. Use its `status`, `wait`, `attest`, `comment`, and `reply --resolve` commands instead of reconstructing GraphQL queries or copying review identifiers by hand. Use `comment` for a suppressed-finding answer in the pull request conversation. Its status gate verifies the current head, diff coverage, output shape, inline threads, body-only findings, and required checks.

A formal review with no findings is complete only when it covers the current head. It also needs full diff coverage of the change set that head has, stated or read from a file table as below. A round covering the head states it. Where none does, a round covering the head whose own file table names exactly the changed files covers it. That is the reading a round at Balanced review effort gives. Where no round covering the head carries its own table, the newest round that does stands in where its table names exactly the changed files. Either table may leave out an added, modified, renamed, or deleted file with no changed line, such as a binary. That holds while some changed file has one. A table stands in only where no Copilot round on the pull request, on any commit, states partial coverage. So a pull request that ever had a partial round goes to the maintainer. A round reporting partial coverage of the diff blocks the merge, and so does a refusal. So does a head that no coverage statement, file table, or attested local pass covers. So does an output shape the digest notes and nobody has read by hand, an unresolved thread, or a body-only finding. The `pr-review-conduct` Skill's Merge Gate states the promotion cases outside these. Where the review policy hands the head to a local pass, an attested local pass covers it, `coverage=local` in the digest. By default that is a pull request into a branch other than the default. A partial round, a truncated review history, or a refusal on the head still blocks that reading. A refusal saying every changed file is in Copilot's default review exclusions is the exception. So is a policy that waits on no Copilot round, Copilot being off, ungated, or past its cap. There none of them blocks the reading, since no round is coming to settle them. Under the hub's default review policy, a pull request into the default branch, a promotion among them, always carries a Copilot round on its head. A repository's own `.github/agent-policy.json` can move or cap that round, and the digest reports what it decided. Re-run the loop after every fix push. Never infer review completion from `mergeStateStatus: CLEAN`.
[GOVERNANCE.md "PR Review Etiquette"](../GOVERNANCE.md#pr-review-etiquette) states when a review covers the current head and its full diff, and when to re-run the loop. A round reporting partial coverage of the diff blocks the merge, and so does a refusal. So does a head that no coverage statement, file table, or attested local pass covers. The `pr-review-conduct` Skill's Merge Gate states every case that blocks the merge, and the exceptions to the cases named here.

Review effort is user-controlled. The automation observes `Lite`, `Balanced`, or `Max`, including an inherited `Default (<level>)`, and never selects or changes the setting. Effort does not determine coverage or completion. A request can complete without a `copilot_work_started` event, so absence of that event is not a stalled-review verdict. When `wait` returns `PENDING` with `requested=yes`, report the state and rerun `wait` for another bounded interval by default. Read that field as acceptance of the request rather than as delivery of a round. Do not clear the request on that first timeout, because it may still be active. Where a second bounded wait times out as well, read the pending set. In that case, clear it only where no human or team reviewer is requested alongside the bot, and rerun `wait`. That rerun then has nothing outstanding to defer to and requests afresh. Where it finds no reviewer node id to request with, it polls instead and says so on its own auto-request line. The clear replaces that set rather than adding to it, and nothing restores a request it drops. So a stall on a pull request that has a human or team reviewer requested goes to the maintainer. So does one still pending after the wait that follows a clear. That clear is a recovery step the script does not implement, and `docs/pr-reviewer-reference.md`, in the hub checkout the script is run from, carries it. This recovery replaces only the review request and never changes the effort setting. A `wait` ending `REQUEST_NOT_RECORDED`, exit 40, is a different state and takes none of this recovery. The request returned success and left neither a pending reviewer nor a review-request event. That is how an exhausted Copilot allowance has shown itself. So clearing and requesting again does not clear this state, and it goes to the maintainer.

Expand Down
10 changes: 5 additions & 5 deletions AUDIT.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# AUDIT.md

How this repository audits itself against its committed baseline and reports drift. This is the repo-scoped adaptation of the fleet-wide AUDIT.md kept at the fleet hub. The hub's fleet-wide audit remains authoritative. General settings, rulesets, and secret names are hub-hosted ground truth in `repo-config/` and `spec/secrets.json`. They are checked from a hub checkout rather than carried here, per [GOVERNANCE.md "Hub-Hosted Tooling"][governance-hub-hosted-tooling]. The prose authorities are [`GOVERNANCE.md`][governance], [`CODESTYLE.md`][codestyle], and [`WORKFLOW.md`][workflow].
How this repository audits itself against its committed baseline and reports drift. General settings, rulesets, and secret names are hub-hosted ground truth in `repo-config/` and `spec/secrets.json`. They are checked from a hub checkout rather than carried here, per [GOVERNANCE.md "Hub-Hosted Tooling"][governance-hub-hosted-tooling]. The prose authorities are [`GOVERNANCE.md`][governance], [`CODESTYLE.md`][codestyle], and [`WORKFLOW.md`][workflow].

The audit is read-only. It diffs live state against the committed baseline and reports findings, and it never applies changes. The verdict vocabulary is [`WORKFLOW.md`][workflow]'s: **operational / not operational**, **N/A**, **defect**, and the applicable/absent rule.

## Scope

This is a release-model repo: the self-audit covers the `main` and `develop` rulesets, general repository settings, and secret names. Code-project conformance (analyzers, tests, coverage, codegen, and NuGet publishing) is the job of CI and of the hub's fleet-wide audit, not of this self-audit. See [GOVERNANCE.md "Branching Model"][governance-branching-model] for the model this baseline encodes.
This is a `release`-model repository. The self-audit covers the `main` and `develop` rulesets, general repository settings, and secret names. Code-project conformance is the job of CI, not of this self-audit. See [GOVERNANCE.md "Branching Model"][governance-branching-model] for the model this baseline encodes.

## General Settings and Rulesets

Fetch the hub and check out `main`, or `develop` while this repository's registry entry has not yet reached `main`. Run `repo-config/configure.sh check ptr727/LanguageTags release` from that checkout. The command checks the shared settings and the state-dependent ones (`has_discussions` follows visibility, `default_branch` is `main`). It checks Dependabot security features, the fleet label set, and the link to the fleet project. It checks any deployment environment the registry declares, and both the `develop` and `main` rulesets against the hub payloads. It preserves and reports `bypass_actors` without asserting them, since who may bypass a ruleset is a human decision no payload declares. Both modes need project access on the token as well as admin on the repository. That is because the project link is read and written through GraphQL.
Fetch the hub and check out `main`. Check out `develop` instead while this repository's registry entry has not yet reached `main`. Run `repo-config/configure.sh check "ptr727/LanguageTags" "release"` from that checkout. The command checks what `repo-config/configure.sh apply` writes, and the deployment environments the registry declares. It reports each ruleset's `bypass_actors` without asserting them, since who may bypass a ruleset is a human decision no payload declares. The token needs project access as well as admin on the repository, since the command reads the fleet project link through GraphQL.

The result must be exactly two rulesets named `develop` and `main`. A missing ruleset or a divergent payload is a **defect**, and a duplicate or stray ruleset is a **drift finding**.

## Secrets

From the same hub checkout, run `uv run --no-project --script spec/audit.py LanguageTags` and read its secret findings. It resolves the required set from the hub's `spec/secrets.json` plus this repo's registry entry (`publish[]`/`types[]`/`requiredSecrets[]`). It confirms each required name exists (name only, not values) in the stores its mechanism claims. For LanguageTags that is the baseline App pair, `NUGET_USERNAME` for the NuGet OIDC push, and `CODECOV_TOKEN`, all in both the Actions and Dependabot stores. A workflow run triggered by a Dependabot pull request reads the Dependabot store, so a `CODECOV_TOKEN` missing there silently skips the coverage upload. `repo-config/configure.sh check ptr727/LanguageTags release` asserts the same names per store. `repo-config/configure.sh apply ptr727/LanguageTags release` writes each one from the host's `~/.secrets/` directory.
From the same hub checkout, run `uv run --no-project --script spec/audit.py "LanguageTags"` and read its secret findings. It resolves the required set from the hub's `spec/secrets.json` plus this repository's registry entry. It confirms each required name exists in the stores its mechanism claims, by name only and never by value. `repo-config/configure.sh check "ptr727/LanguageTags" "release"` asserts the same names per store. `repo-config/configure.sh apply "ptr727/LanguageTags" "release"` writes each one from the host's `~/.secrets/` directory.

## Verdict and Follow-Up

A missing required item or a divergent payload is a **defect** (not operational). An equivalent outcome in a non-standard form is a **drift finding**. N/A items are excluded, never counted as failures. Surface findings as repository issues, and land fixes as a pull request to `develop` per [GOVERNANCE.md "Branching Model"][governance-branching-model]. To re-apply the whole baseline, run `repo-config/configure.sh apply ptr727/LanguageTags release` from a hub checkout.
A missing required item or a divergent payload is a **defect** (not operational). An equivalent outcome in a non-standard form is a **drift finding**. N/A items are excluded, never counted as failures. Surface findings as repository issues, each naming the hub commit its run read.

<!-- Repo -->

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ C# .NET library for ISO 639-2, ISO 639-3, RFC 5646 / BCP 47 language tags.
### Build Status <!-- omit from toc -->

[![Release Status][releasebuildstatus-shield]][actions-link]\
[![Coverage][coverage-shield]][coverage-link]\
[![Last Commit][lastcommit-shield]][commits-link]

### Releases <!-- omit from toc -->
Expand Down Expand Up @@ -594,6 +595,7 @@ Licensed under the [MIT License][license]\

<!-- Shields -->

[coverage-shield]: https://img.shields.io/codecov/c/github/ptr727/LanguageTags?logo=codecov&label=Coverage
[lastcommit-shield]: https://img.shields.io/github/last-commit/ptr727/LanguageTags?logo=github&label=Last%20Commit
[license-shield]: https://img.shields.io/github/license/ptr727/LanguageTags?label=License
[nugetreleaseversion-shield]: https://img.shields.io/nuget/v/ptr727.LanguageTags?logo=nuget&label=NuGet%20Release
Expand Down Expand Up @@ -646,6 +648,7 @@ Licensed under the [MIT License][license]\
[codecov-link]: https://about.codecov.io/
[coderabbit-link]: https://www.coderabbit.ai/
[contentlanguage-link]: https://www.rfc-editor.org/rfc/rfc9110.html#name-content-language
[coverage-link]: https://app.codecov.io/gh/ptr727/LanguageTags
[csharpier-link]: https://csharpier.com/
[cspell-link]: https://cspell.org
[dansmithlanguagetagssharp-link]: https://github.com/DanSmith/languagetags-sharp
Expand Down
Loading
Loading