Carry fleet governance baseline from the hub - #16
Conversation
There was a problem hiding this comment.
Pull request overview
This PR carries the fleet governance baseline into PhotoCleaner by introducing the standard CI/CD workflow contract docs, repository self-audit guidance, ruleset/settings payloads, and Dependabot configuration, plus small README adjustments to align with the carried markdownlint configuration.
Changes:
- Add fleet-standard governance documents and manifests (AGENTS.md, WORKFLOW.md, CODESTYLE.md, AUDIT.md, spec/secrets.json, version.json).
- Add repo-config payloads and an apply/check script for settings + branch rulesets (repo-config/*).
- Align markdownlint configuration and adjust README headings to avoid duplicate-heading lint violations.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| WORKFLOW.md | Adds the carried workflow contract and test methodology for GitHub Actions. |
| version.json | Introduces NBGV version floor and default-branch release ref spec. |
| spec/secrets.json | Adds the repo-scoped secrets manifest for audit/baseline validation. |
| repo-config/settings.json | Adds the committed baseline for repo settings applied via API. |
| repo-config/README.md | Documents the repo-config payloads and apply/check usage. |
| repo-config/main.json | Adds the committed main ruleset payload baseline. |
| repo-config/develop.json | Adds the committed develop ruleset payload baseline. |
| repo-config/configure.sh | Adds an apply/check script to enforce and validate settings/rulesets. |
| README.md | Renames update subsections to avoid duplicate headings under stricter MD024. |
| CODESTYLE.md | Re-vendors fleet-style conventions and verification workflow documentation. |
| AUDIT.md | Adds a self-audit procedure for settings/rulesets/secrets drift. |
| AGENTS.md | Carries fleet agent governance rules and PR review contract into the repo. |
| .markdownlint-cli2.jsonc | Replaces the local markdownlint config with the carried baseline settings. |
| .github/dependabot.yml | Adds dual-target Dependabot updates for main and develop. |
Comments suppressed due to low confidence (4)
CODESTYLE.md:54
- These task names use
.NET ...casing, but the actual VS Code tasks are named.Net Build/.Net Format. This makes the documented clean-compile task chain inaccurate.
1. **The `.NET Format` clean-compile task** (see [Clean-Compile Verification][clean-compile-verification])
- The .NET clean-compile is the **`.NET Format`** VS Code task, which chains `CSharpier Format` -> `.NET Build` -> `dotnet format style --verify-no-changes`. These three task definitions are carried verbatim in [`.vscode/tasks.json`][vscode-tasks].
- After any code change it must pass before commit. Run the `.NET Format` task. To run it natively instead, reproduce that task chain from [`.vscode/tasks.json`][vscode-tasks] exactly - `CSharpier Format`, then `.NET Build`, then the `dotnet format style --verify-no-changes --severity=info ...` verify - without dropping or loosening any argument (tasks.json is the canonical command spec). Bare `dotnet format` alone, skipping CSharpier or the build, is not sufficient.
CODESTYLE.md:58
- This claims
.NETprojects enforce<AnalysisMode>All</AnalysisMode>and<TreatWarningsAsErrors>true</TreatWarningsAsErrors>, but the repo's.csprojfiles currently do not set either property. The doc should either reflect current project settings or the projects should be updated to match this policy.
2. **Analyzer configuration**
- `<EnableNETAnalyzers>true</EnableNETAnalyzers>` with `<AnalysisLevel>latest-all</AnalysisLevel>` and `<AnalysisMode>All</AnalysisMode>` (full analyzer set enabled)
- `<TreatWarningsAsErrors>true</TreatWarningsAsErrors>` - any diagnostic surfaced as a warning fails the build, so it must be fixed or deliberately suppressed, not left to accumulate (see [Analyzer Diagnostics and Suppressions][analyzer-diagnostics-and-suppressions])
CODESTYLE.md:70
- The task list uses
.NET ...labels, but.vscode/tasks.jsondefines.Net Buildand.Net Format. This mismatch makes it harder for contributors (and agents) to run the intended tasks.
- `.NET Build`: Build with diagnostic verbosity *(clean-compile)*
- `CSharpier Format`: Auto-format code with CSharpier *(clean-compile)*
- `.NET Format`: Run CSharpier and build, then verify formatting and style with `--verify-no-changes` *(clean-compile; the task to run after edits)*
CODESTYLE.md:294
- This forbids all native xUnit asserts, but the repo uses
Assert.Skip(...)in tests to skip when external tools are unavailable. The rule should carve outAssert.Skipas an allowed exception so the guidance matches the codebase's existing test strategy.
1. **Framework**: **xUnit v3 or later** (the `xunit.v3` package, never the legacy v2 `xunit` package) with **AwesomeAssertions** for every assertion; native xUnit asserts (`Assert.Equal`, `Assert.True`, ...) are not allowed - use the fluent `.Should()` API
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| gh api --method PUT "repos/$repo/rulesets/$id" --input "$file" >/dev/null | ||
| else | ||
| echo "Creating ruleset '$rname' on $repo" | ||
| gh api --method POST "repos/$repo/rulesets" --input "$file" >/dev/null |
There was a problem hiding this comment.
Declined: repo-config/configure.sh is a verbatim carry of the fleet canonical (spec/files.json marks it fidelity: verbatim), so modifying it downstream would be flagged by the fleet audit as locally modified fixed content. The AGENTS.md write-safety rule governs agent-issued ad-hoc mutations, not hub-owned scripts (which run under set -Eeuo pipefail, so a failed API write still aborts loudly via exit code). The suppression concern is being raised at the hub as part of the current feedback round; if the canonical changes, the next carry picks it up.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## develop #16 +/- ##
========================================
Coverage 44.96% 44.96% ========================================
Files 25 25 Lines 3398 3398 Branches 259 259 ========================================
Hits 1528 1528 Misses 1824 1824 Partials 46 46 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading. Please reload this page.
* Carry fleet governance baseline from the hub Re-vendor the fleet governance files from the hub's main branch (issue #14, governance-carry step): - AGENTS.md: all carried sections; Repository Boundaries and Write Safety, Git and Commit Rules, and Verification Discipline are byte-identical to the hub canonical. Intent sections adapted: hub-only references removed, merge-bot/codegen machinery reduced to current state, Release Model condensed to the downstream shape, examples localized. - CODESTYLE.md: hub canonical, whole; Python section dropped (N/A), InternalsVisibleTo names set to this repo's projects. Covers #13. - WORKFLOW.md, .markdownlint-cli2.jsonc, repo-config/develop.json, repo-config/main.json, repo-config/settings.json, repo-config/README.md, repo-config/configure.sh: verbatim carries. - AUDIT.md, spec/secrets.json: repo-scoped self-audit adaptations (App pair both stores, CODECOV_TOKEN in Actions; no publish mechanisms until the release pipeline lands). - version.json: NBGV hub-style, version floor 1.0. - .github/dependabot.yml: nuget + github-actions, dual-target main + develop, daily, grouped. - README.md: Update subsections renamed to unique headings (the verbatim markdownlint config no longer carries the local MD024 siblings_only exception). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Match HISTORY.md header and description to README.md README.md and HISTORY.md share the same title and one-line description; record that rule in AGENTS.md Repository Details. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Address Copilot review: casing, MD033 claim, cspell source, indent - Rename VS Code task labels and their references to official .NET casing (.NET Build, .NET Format, .NET Tool Update, .NET Outdated Upgrade) in tasks.json, launch.json, and husky task-runner.json; Husky.Net keeps its official product name. - CODESTYLE.md: MD013 is the deliberately disabled markdownlint rule; MD033 stays enabled per the carried config. - Move the workspace cSpell.words list into the shared cspell.json (single source of truth) and drop entries with no occurrence in tracked files; delete the workspace block. - version.json: reindent tabs to 4 spaces per .editorconfig. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Carve out dynamic test skipping from the xUnit assert ban Assert.Skip / Assert.SkipWhen are control flow, not assertions, and AwesomeAssertions has no skip API, so they stay native. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Reindent repo-config/settings.json to 4 spaces per .editorconfig The self-audit and configure.sh read it through jq, so indentation is not load-bearing; the intent-fidelity carry conforms to the repo's editorconfig like version.json. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Refresh hub canonicals and fold CLAUDE.md into AGENTS.md Round-2 canonical refresh (issue #14): the hub adopted the round-1 feedback, so the carried copies return to parity. - CODESTYLE.md: re-vendor from the refreshed hub canonical (adopted MD033 fix and dynamic-skip carve-out, new Central Build and Package Configuration section); repo adaptations re-applied (InternalsVisibleTo names, Python section dropped, local vscode-tasks link). - AGENTS.md: Verification Discipline re-vendored byte-identical, gaining the never-edit-an-active-code-workspace rule; add the pre-commit verification-set bullet to Repository Details. - repo-config/configure.sh: re-vendor verbatim; the new stdout-suppression rationale supersedes the declined PR #16 thread. - .github/copilot-instructions.md: re-vendor the hub canonical with owner/repo substituted, adding the Commit Messages and Pull Request Titles section and the GitHub Copilot Review Runbook; the project architecture content stays as additional sections. - Remove CLAUDE.md: its content is covered by AGENTS.md, CODESTYLE.md, and tasks.json (the canonical command spec). version.json, repo-config/settings.json, and the HISTORY.md opening are already at parity and are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Clarify the MD033 note: comments permitted, elements flagged Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Governance-carry step of the hub convergence (#14); the CODESTYLE.md re-vendor covers the scope of #13. Per the carried release model, closing keywords belong on the develop -> main promotion PR, so none are used here.
Verification
🤖 Generated with Claude Code