Skip to content

Enforce squash-only merge strategy in GitHub ruleset and workflow - #16

Closed
ptr727 with Copilot wants to merge 5 commits into
developfrom
copilot/sub-pr-15
Closed

Enforce squash-only merge strategy in GitHub ruleset and workflow#16
ptr727 with Copilot wants to merge 5 commits into
developfrom
copilot/sub-pr-15

Conversation

Copilot AI commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

Updated the GitHub configuration and workflow documentation to enforce squash merging for all branches, maintaining a linear history throughout the repository.

Changes:

  • Configured ruleset to only allow Squash merge method (no merge commits or rebase)
  • Updated branching workflow documentation:
    • Feature branches → develop: "Squash and merge" to reduce history size
    • Develop → main: "Squash and merge" to maintain linear history
  • Removed duplicate ruleset configuration entries
  • Removed duplicate "Branching Workflow" and "GitHub Actions Workflow" sections

Configuration:

- Allowed merge methods: `Squash`

This enforces a consistent squash-only merge strategy across all branches, ensuring a clean linear history and eliminating the conflict between ruleset settings and workflow documentation.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

ptr727 and others added 3 commits January 15, 2026 20:43
* Update workspace and README for improved setup instructions and extension recommendations

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>

* Update branding and documentation consistency (#13)

* Branding

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>

* Allow only squash merging

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>

---------

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>

---------

Signed-off-by: Pieter Viljoen <ptr727@users.noreply.github.com>

@ptr727 ptr727 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@copilot implement a change in the workflow that only squash merge is allowed any time

Co-authored-by: ptr727 <2061579+ptr727@users.noreply.github.com>
Copilot AI changed the title [WIP] Update setup instructions and improve documentation Fix merge method conflict in GitHub ruleset configuration Jan 16, 2026
Copilot AI requested a review from ptr727 January 16, 2026 00:00
Co-authored-by: ptr727 <2061579+ptr727@users.noreply.github.com>

Copilot AI commented Jan 16, 2026

Copy link
Copy Markdown
Contributor Author

@copilot implement a change in the workflow that only squash merge is allowed any time

Implemented in commit 953e0c2.

Changes:

  • Ruleset configuration now only allows Squash merge method
  • Updated branching workflow to use "Squash and merge" for all merges, including develop → main
  • This maintains a linear history across all branches

Copilot AI changed the title Fix merge method conflict in GitHub ruleset configuration Enforce squash-only merge strategy in GitHub ruleset and workflow Jan 16, 2026
@ptr727
ptr727 marked this pull request as ready for review January 16, 2026 00:26
Copilot AI review requested due to automatic review settings January 16, 2026 00:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enforces a squash-only merge strategy throughout the repository by updating GitHub ruleset configuration and workflow documentation to ensure consistency and maintain a linear history.

Changes:

  • Removed duplicate ruleset configuration entries in GitHub Project Settings
  • Removed duplicate "Branching Workflow" and "GitHub Actions Workflow" sections
  • Updated branching workflow to use "Squash and merge" from develop to main (previously "Merge commit")
Comments suppressed due to low confidence (2)

README.md:182

  • This line appears to be a duplicate of the line that follows it. The duplicate at line 182 should be removed to maintain consistency with the cleanup performed elsewhere in this PR.
- Create a [NuGet API Key](https://www.nuget.org/account/apikeys).

README.md:194

  • This heading is duplicated at line 192. The duplicate heading at line 194 should be removed to maintain proper document structure.
### GitHub Project Settings

@ptr727

ptr727 commented Jan 16, 2026

Copy link
Copy Markdown
Owner
  • [ ]

@ptr727 ptr727 closed this Jan 16, 2026
@ptr727
ptr727 deleted the copilot/sub-pr-15 branch January 16, 2026 00:55
ptr727 added a commit that referenced this pull request Jul 17, 2026
Fixes #332 (core gap + the six bundled nits from the #330 sweep reviews;
two of the six live in the blessed downstream reference and propagate
via the Vantage-Config carry, not this repo - see below).

## configure.sh: model inference on downstream carries

In a carry the registry is absent, so the no-arg form defaulted to
`release` and then hit the intended fail-safe abort on operational
carries (missing `develop.json`) - arg 2 was effectively mandatory
there. Now the model is inferred from which `develop` payload is carried
(a carry holds exactly its own model's); ambiguous layouts (both or
neither - e.g. a partial copy) abort rather than guess. Also: the model
may be passed as the sole argument (`configure.sh operational`) -
previously arg 1 was always parsed as a repo name (bundled nit,
Utilities #417).

Matrix-tested with the apply path stubbed: infer release, infer
operational, both-present abort (exit 1), neither-present abort (exit
1), explicit arg-2 override, model-as-sole-arg, unknown-model abort. Hub
behavior unchanged (registry present -> registry lookup, as before).
shellcheck + bash -n clean.

## Ruleset snippet hardening (duplicate-name id corruption)

The `id=$(gh api ... select(.name==...).id)` pattern in the README regen
snippet and AUDIT.md section 6 produced a **multiline id** when
duplicate same-name rulesets exist, silently corrupting the follow-up
API path (bundled nit, Utilities #417 + LanguageTags #278). Both
snippets now fetch the list once and enforce **exactly one** ruleset per
name: the regen snippet fails loudly (never regen from a guess); the
audit snippet reports `found N (defect/drift)` and continues - matching
the declared drift semantics. Live-tested read-only against this repo
(develop + main in sync; duplicate simulation counts correctly).

## README wording

Documents the inference fallback and the model-only argument form
(bundled nit, Utilities #417).

## Bundled nits NOT in this PR (with rationale)

- `gh api --input -` portability (MediaTools #19): declined - fleet
standard is current gh; not worth temp-file churn.
- jq-derived secret name lists + `--paginate` in the secrets check
(MediaTools #19, LanguageTags #278, PlexCleaner #854): these live in the
**blessed downstream self-audit reference** (the Vantage-Config carry),
not in hub files - propagated there directly after this merges (the
hub's fleet audit reads `spec/secrets.json` programmatically already).

## Propagation caveat

This re-drifts the five existing carries (Vantage-Config + the four #330
sweep repos) until their next conformance touch; Vantage-Config is
updated immediately after this merges since it is the blessed reference
the queued operational standups (HomeAssistant-Config #16,
ESPHome-Config #46, HomeAutomation-Config #21) will adapt from.

🤖 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 Jul 17, 2026
Reconcile the stale `HomeAssistant-Config` registry `driftNotes` after
the [`#16`](ptr727/HomeAssistant-Config#16)
operational onboarding. Mirrors the `#329` reconciliation for
Vantage-Config.

## What changed

The prior driftNotes described work that is now complete and planned a
`groundTruthBranch` flip that is declined:

- "develop is behind main by 2 commits / fast-forward then flip
groundTruthBranch to develop" - develop is content-ahead; the flip is
**declined** (see below).
- "pending: lint CI" - `test-pull-request.yml` with the `Check pull
request workflow status job` required check is live.
- "pending: dispatch-only source-release scaffolding (version.json +
publish-release.yml)" - both present.

Replaced with a completed-onboarding summary: baseline carried
(repo-config operational, `AUDIT.md`, `spec/secrets.json`, App-signed
Dependabot merge-bot) and promoted `develop -> main` via
HomeAssistant-Config PR `#17`. Self-audit verified in sync (settings,
both rulesets, `CODEGEN_APP_*` present in both stores).

## groundTruthBranch stays `main` (deliberate)

Kept `groundTruthBranch: main`, **not** flipped to `develop`. develop is
the working branch (direct signed commits); main is the promoted stable
snapshot the audit should target. This is a deliberate divergence from
the other operational repos (Vantage-Config / ESPHome-Config /
HomeAutomation-Config use `develop`); the broader convention question is
raised in #340.

## Findings note (context, see #341)

The `#16` audit block was stale: the `CODEGEN_APP_*` secrets were
already present in both stores and develop was already ahead of main.
Only the `repo-config/... absent` LETTER finding was real, and it is now
cleared on `main` by PR `#17`.

Validation: `jq` parses clean, `spec/validate.py` -> "21 cataloged, 0
backlog repos classify cleanly."

🤖 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 Jul 18, 2026
Fixes #341. Both halves are the same failure mode: **a point-in-time
snapshot presented as current state**, so an agent picking it up "fixes"
what is already fixed.

## 1. Freshness signal on every run

`spec/audit.py` now prints:

```text
audit run 2026-07-18T15:11:28Z | hub bd48caf

== HomeAutomation-Config (source-only; operational) @ main@6fadcbe ==
  clean (deterministic checks; the full operational verdict is AUDIT.md's)
...
Findings are a point-in-time snapshot: re-run this audit before acting on them, and quote the
run stamp above in any issue derived from it (AUDIT.md section 8).
```

- a **run stamp** (UTC + the hub commit the ground truth came from), and
- **per repo, the exact commit read** (`@ <branch>@<sha>`) - so a
finding is attributable to a specific state.

`AUDIT.md` section 8 now requires anything derived from a run - a
report, and **especially an onboarding/conformance issue** - to quote
the stamp, and requires the agent picking that issue up to **re-run the
audit and act on the live result, not the pasted findings**. Findings
are evidence for *why* the issue was filed, never a claim about current
state. That is exactly the #16 failure: two of three findings were
already resolved at pickup.

## 2. driftNotes flagged when they outlive the deviation

A `driftNote` records a **current** deviation; once resolved it is
deleted, not left describing finished work. `audit.py` now raises a
drift finding when a repo **audits clean** but a note still asserts
outstanding work (`pending`, `not yet`, `missing`, `behind`, `owed`,
`todo`, `still`, `absent`).

The marker list is deliberately narrow and the check only fires on an
otherwise-clean repo, so a note recording a *permanent* deviation ("no
get-version-task; relies on validate-task") never trips it. Codified as
`setup.driftnotes.current`.

## The check earned its keep immediately

It caught **a stale note I wrote myself** for HomeAutomation-Config
yesterday - `"OWNER TASK OPEN: CODEGEN_APP_CLIENT_ID +
CODEGEN_APP_PRIVATE_KEY not yet set in either secret store"` - which the
owner resolved (I verified the secrets and closed the downstream issue)
but I never reconciled in the registry. Verified both secrets present in
both stores, then removed the note entirely: with conformance complete
it recorded no deviation at all.

**Noise check:** run across the fleet, the heuristic flagged exactly
that one note.

## Validation

`spec/validate.py`, markdownlint, editorconfig-checker clean; `audit.py`
parses and runs; CRLF/LF preserved.

This lands before the fleet-wide audit sweep deliberately - it
determines whether the issues that sweep produces are accurate on
arrival.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to 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.

3 participants