Skip to content

Carry fleet governance baseline from the hub - #16

Merged
ptr727 merged 0 commit into
developfrom
conformance/governance-carry
Jul 23, 2026
Merged

Carry fleet governance baseline from the hub#16
ptr727 merged 0 commit into
developfrom
conformance/governance-carry

Conversation

@ptr727

Copy link
Copy Markdown
Owner

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.

  • Verbatim carries (byte-identical to the hub canonical): WORKFLOW.md, .markdownlint-cli2.jsonc (replaces the hand-modified local copy), repo-config/develop.json, repo-config/main.json, repo-config/settings.json, repo-config/README.md, repo-config/configure.sh.
  • AGENTS.md: all carried sections in hub order. Repository Boundaries and Write Safety, Git and Commit Rules, and Verification Discipline are byte-identical to the hub. The intent sections carry the hub's current text with surgical adaptations: hub-only references removed, repo-specific examples localized, merge-bot/codegen machinery stated at its current (not yet stood up) state, Release Model condensed to the downstream shape that defers workflow mechanics to WORKFLOW.md.
  • CODESTYLE.md: hub canonical, whole file. Python section dropped (no Python in this repo), InternalsVisibleTo placeholders set to PhotoCleanerBenchmarks/PhotoCleanerTests, vscode-tasks reference pointed at ./.vscode/tasks.json, orphaned Python-only reference definitions removed.
  • AUDIT.md + spec/secrets.json: repo-scoped self-audit adaptations (standard downstream shape): settings diff, normalized ruleset diff against the committed payloads, names-only secrets check. Secrets: baseline App pair (both stores) + CODECOV_TOKEN (Actions). No publish mechanisms until the release pipeline lands.
  • version.json: NBGV, hub-style, version floor 1.0.
  • .github/dependabot.yml: nuget + github-actions ecosystems, 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 the old headings depended on.

Verification

  • Verbatim files confirmed byte-identical to the hub with cmp; the three verbatim AGENTS.md sections asserted byte-identical during assembly.
  • markdownlint-cli2 (all .md): 0 issues. cspell (README.md + HISTORY.md): 0 issues. editorconfig-checker: exit 0.
  • Line endings preserved per convention: CRLF for md/json/yml, LF for configure.sh (+x preserved).

🤖 Generated with Claude Code

CopilotAI review requested due to automatic review settings July 23, 2026 15:11

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
FileDescription
WORKFLOW.mdAdds the carried workflow contract and test methodology for GitHub Actions.
version.jsonIntroduces NBGV version floor and default-branch release ref spec.
spec/secrets.jsonAdds the repo-scoped secrets manifest for audit/baseline validation.
repo-config/settings.jsonAdds the committed baseline for repo settings applied via API.
repo-config/README.mdDocuments the repo-config payloads and apply/check usage.
repo-config/main.jsonAdds the committed main ruleset payload baseline.
repo-config/develop.jsonAdds the committed develop ruleset payload baseline.
repo-config/configure.shAdds an apply/check script to enforce and validate settings/rulesets.
README.mdRenames update subsections to avoid duplicate headings under stricter MD024.
CODESTYLE.mdRe-vendors fleet-style conventions and verification workflow documentation.
AUDIT.mdAdds a self-audit procedure for settings/rulesets/secrets drift.
AGENTS.mdCarries fleet agent governance rules and PR review contract into the repo.
.markdownlint-cli2.jsoncReplaces the local markdownlint config with the carried baseline settings.
.github/dependabot.ymlAdds 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 .NET projects enforce <AnalysisMode>All</AnalysisMode> and <TreatWarningsAsErrors>true</TreatWarningsAsErrors>, but the repo's .csproj files 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.json defines .Net Build and .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 out Assert.Skip as 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

Comment threadCODESTYLE.md
Comment threadCODESTYLE.md Outdated
Comment threadCODESTYLE.md
Comment threadversion.json
Comment on lines +107 to +110
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

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Comment threadCODESTYLE.md
Comment threadCODESTYLE.md Outdated

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Comment threadrepo-config/settings.json

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated no new comments.

@codecov

codecovBot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.96%. Comparing base (2129f49) to head (d372ef0).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged this pull request into developJul 23, 2026
6 checks passed
@ptr727
ptr727 deleted the conformance/governance-carry branch July 23, 2026 15:55
ptr727 added a commit that referenced this pull request Aug 3, 2026
* 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>
ptr727 added a commit that referenced this pull request Aug 3, 2026
* 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>
Sign up for freeto 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.

2 participants

@ptr727