Re-sync verbatim-carry artifacts from template - #448
Merged
Conversation
Full-replace the carried governance/orchestration artifacts from ptr727/ProjectTemplate, adapting only documented placeholders and removing prior downstream comment accretion. AGENTS.md - Pull Request Title and Commit Message Conventions: restore the template's verbatim example set (was localized to Nx product names). - Git and Commit Rules, PR Review Etiquette: already verbatim. CODESTYLE.md - General: restore verbatim (re-add the ruff/pyright/uv casing example and the pyproject.toml analyzer-scope example that had been trimmed). - .NET: documented adaptations only (CreateMatrix/CreateMatrixTests project list, Husky.Net clean-compile/tooling, InternalsVisibleTo, Husky.Net Run task label). Workflows - get-version-task.yml, run-periodic-codegen-pull-request.yml: full verbatim replace (pin actions to SHAs, drop the github.ref checkout fallback, fix the codegen concurrency group to be workflow-only, and stagger periodic codegen to 04:00 UTC after the weekly publish). - merge-bot-pull-request.yml: full replace - switch to pull_request_target, add the merge-upstream-version job, restore terse comments; keep the Dependabot-advanced fetch-metadata pin (v3.1.0). - run-codegen-pull-request-task.yml: re-sync the orchestration shell (terse comments, action pins) keeping the CreateMatrix codegen command, the dotnet husky install step, and no NINJA_API_KEY.
There was a problem hiding this comment.
Pull request overview
This PR re-syncs NxWitness’s verbatim-carry governance/style docs and GitHub Actions orchestration workflows from ptr727/ProjectTemplate via full replacements, keeping only documented NxWitness-specific adaptations and removing accumulated downstream edits.
Changes:
- Restore carried sections in
AGENTS.mdandCODESTYLE.mdto match the template (with documented .NET-specific adaptations kept). - Re-sync CodeGen and versioning workflows (cron/concurrency behavior, action SHA pins, and comments), preserving NxWitness-specific CodeGen command/tooling steps.
- Re-sync merge-bot workflow to the template model (including
pull_request_targetand an added upstream-version auto-merge job).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| CODESTYLE.md | Re-sync General section content and suppression-scope example text to template wording. |
| AGENTS.md | Restore template’s verbatim PR title/commit example set in the carried section. |
| .github/workflows/run-periodic-codegen-pull-request.yml | Adjust schedule time and concurrency grouping to avoid races on fixed codegen branches. |
| .github/workflows/run-codegen-pull-request-task.yml | Re-sync orchestration/pins and tighten comments while preserving NxWitness CodeGen steps. |
| .github/workflows/merge-bot-pull-request.yml | Switch to pull_request_target, add upstream-version auto-merge job, and re-sync template behavior/comments. |
| .github/workflows/get-version-task.yml | Pin checkout/setup-dotnet by SHA, accept optional ref input, and restore template notes around NBGV usage. |
Re-pull the upstream fix (ptr727/ProjectTemplate#206): pull_request_target makes github.ref the base branch, so the group serialized all bot PRs against a base. Key on github.event.pull_request.number for per-PR scoping.
Re-carry genericized CODESTYLE.md (drop Python section, .NET-only); re-carry enriched publish-docker-readme-task.yml (get-repos job + manifest/manifest-jq/transform-artifact inputs); rewire publish-release.yml docker-readme to pass manifest + manifest-jq instead of a bespoke get-repos job. Pin .husky/pre-commit to LF. Update AGENTS.md adaptations. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Re-carry the whole genericized CODESTYLE.md (the Python section was dropped under the old droppable-section model; carry-whole keeps it inert). Normalize build-datebadge-task.yml back to CRLF per the YAML policy (EOL-only).
Re-carry the now-portable CODESTYLE.md and the contract-fixed publish-docker-readme-task.yml (manifest-gated checkout) from the template. Add missing --yes to NxBase autoremove so cleanup runs non-interactively. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Copilot-flagged fix only touched NxBase; the identical non-interactive 'apt-get autoremove --purge' (no --yes) was in 11 sibling Dockerfiles and would prompt/fail when there is anything to remove. Apply --yes consistently. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Nothing in this repo produces upstream-version-main/develop branches (no check-upstream-version-task.yml); upstream NX tracking goes through codegen, which merge-codegen handles. Remove the orphan merge-upstream-version job and document the omission, matching the subset-adaptation pattern (a repo prunes bot jobs for mechanisms it doesn't use). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot stopped reviewing on behalf of
ptr727 due to an error
June 25, 2026 02:00
Per the upstream decision (issue #208): the SHA-pin rule applies to build-layer leaves too. Dependabot bumps SHA pins (updates SHA + version comment), so this keeps one supply-chain rule with no loss of automation. Pin checkout v7.0.0, setup-dotnet v5.3.0, docker setup-qemu v4.1.0 / setup-buildx v4.1.0 / login v4.2.0 / build-push v7.2.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per the upstream decision (issue #208): use registry-tag layer caches (docker.io/ptr727/<repo>:buildcache-<branch>) instead of type=gha to avoid the 10 GB Actions cache on this multi-image repo. cache-from pulls the develop+main buildcache tags (and the base image's own tag); cache-to pushes the current branch's buildcache when publishing; all best-effort (ignore-error=true). Update the AGENTS build-layer note (SHA-pinned actions + registry cache). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Product is not unique per image repo (NxGo and NxGo-LSIO both Product=nxgo but publish to ptr727/nxgo vs ptr727/nxgo-lsio), so the prior buildcache-<branch> tag collided across matrix rows (last-writer-wins). Derive cache_repo from the image's own first tag in the tagsargs step and key the registry cache on it. (issue #209) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Leftover wording from before the type=gha -> type=registry migration; the branch input now selects the registry buildcache tag, not a GHA cache scope. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot stopped reviewing on behalf of
ptr727 due to an error
June 25, 2026 03:01
- .gitattributes: header now distinguishes editorconfig editor guidance from git's own LF enforcement
- CODESTYLE.md: .NET/Python intros made conditional ("any ... project(s)")
- AGENTS.md: publishing step now covers an opted-in publish-on-merge trigger
- build-datebadge-task.yml: BYOB pinned to v1.3.0 SHA 24f4642 (was floating # v1)
ptr727
added a commit
to ptr727/ProjectTemplate
that referenced
this pull request
Jun 25, 2026
Surfaced by Copilot during the NxWitness re-sync ([#448](ptr727/NxWitness#448)) — a real regression from the `pull_request_target` switch (#201). Under `pull_request_target`, `github.ref` resolves to the **base branch**, so the merge-bot concurrency group `…-${{ github.ref }}` serialized *every* bot PR against a base into one queue — delaying auto-merge/disable when multiple Dependabot/codegen PRs are open. Keying on `github.event.pull_request.number` restores per-PR scoping (a PR's events still process in arrival order; different PRs run concurrently). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ptr727
added a commit
that referenced
this pull request
Jun 25, 2026
Promote `develop` to `main` for the 2.14 release. ## Included - **Fix LSIO PUID/PGID permission race (#450)** — the `init-nx-permissions` chown sweep now depends on the base `init-adduser` oneshot, so it runs after the PUID/PGID remap instead of racing it (which could leave `/config` and `/media` owned by the wrong user and break media writes). Also extracts the installer download and LSIO `abc` rename into shell scripts, hardens the rename against upstream `init-adduser` changes, and makes codegen emit LF Dockerfiles. - **Bump version to 2.14 and document the fix (#451)** — `version.json` floor 2.13 -> 2.14, HISTORY.md and README release notes. - **Re-sync verbatim-carry artifacts from template (#448)** — already on develop. Validated on a live Synology server (the #449 reporter's scenario) via the `:develop` tag; the publish run on develop was green across the full matrix. Closes #449. 🤖 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Converge this repo onto ptr727/ProjectTemplate: the carried artifacts (
CODESTYLE.md,AGENTS.md,.github/copilot-instructions.md,.vscode,.gitattributes, and the orchestration-layer workflows) are taken by full-file replacement, and this repo's task list is folded in. Where this repo's multi-image Docker product genuinely cannot use the template shape, the deviation is documented below rather than left as silent drift.What this does
actions/checkout,dorny/paths-filter,softprops/action-gh-release,RubbaBoy/BYOB,peter-evans/dockerhub-description);dotnet/nbgv@masterstays floating to match the template. Repo-owned build-layer leaves keep their owndocker/*pins (see adaptations).github-releasejob inpublish-release.ymlto the template's generic release semantics: tag on the built commit, auto source zip + README + LICENSE, pinnedtarget_commitish, skip-existing guard, and the main-onlyVerify public release versionbackstop.publish-docker-readme-task.ymlandbuild-datebadge-task.ymlverbatim from the template.CODESTYLE.mdwhole - General section plus the per-language .NET and Python sections, with the droppable per-language model intact..gitattributes: Dockerfiles,*.sh, theDocker/s6-overlay/**tree, and.husky/pre-commitare pinned LF; carried workflow YAML stays CRLF to match the template's checked-in form.Validation: actionlint clean, markdownlint 0 errors.
Documented adaptations (for review)
These are the only intentional deviations from the template; everything else is verbatim carry (modulo the line-ending pins above). Sourced from
AGENTS.md-> Template adaptations.publish-release.ymlkeeps abuild-basejob plus separatebuild-main/build-developlegs (calling repo-ownedbuild-base-images-task.ymlandbuild-docker-task.yml) instead of the template's single per-branch matrix, because the sharednx-base/nx-base-lsioimages are built once frommainand reused by both legs (build_base: false) - a fan-out the template matrix can't express.release-asset-*files). This repo ships Docker Hub images as its release artifacts, not binary/package assets, so there is norelease-asset-*download step andfail_on_unmatched_filesis omitted (no files to guard); all other release semantics follow the template.Matrix.json.publish-docker-readme-task.ymlis carried verbatim; because the image set is repo-specific the caller passesmanifest: ./Make/Matrix.json+ amanifest-jqprogram (lowercasedptr727/<image>plus the shared base repos) so the task's ownget-reposjob resolves the list..vscodeBenchmark -> Husky.Net Run task. The carried.vscode/tasks.jsonswaps the template's Benchmark task for a Husky.Net Run task, matching this repo's hook tooling.build-docker-task.yml,build-base-images-task.yml,test-release-task.yml) own theirdocker/*and other action versions and track them via Dependabot.Held for maintainer end-gate review (no auto-merge).