@mcptoolshop/housekeeping 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
3
3
  All notable changes to this project are recorded here.
4
4
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
+ ## [1.6.1] - 2026-12-05
7
+
8
+ ### Fixed
9
+
10
+ - `WF_NO_PATHS_FILTER` no longer fires on a `push:` trigger gated to tags alone
11
+ (`on: { push: { tags: [v*] } }` with no `branches:`), the shape of a tag-push
12
+ release workflow. Its tag patterns already narrow the trigger, and a `paths:`
13
+ filter there would stop the release from firing at all — a tag push carries no
14
+ changed file a paths filter can match. A push that also fires on a branch
15
+ (with or without tags), a bare `on: push`, and `pull_request` (which has no
16
+ tag form) are still flagged. `WF_NO_CONCURRENCY` and `WF_NO_DISPATCH` are
17
+ unchanged and still hold a tag-only release to the same concurrency and
18
+ manual-dispatch rules.
19
+
20
+ ### Changed
21
+
22
+ - The Atlas engine pin moves from 1.27.0 to 1.28.0: the export (`ATLAS_PIN`),
23
+ the regenerated map, and the CI `atlas check` move together, as
24
+ `rules/atlas-map.md` asks.
25
+
6
26
  ## [1.6.0] - 2026-12-05
7
27
 
8
28
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcptoolshop/housekeeping",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Operational-health warehouse for a GitHub organization: CI, issues, PRs, releases, Actions cost and repo hygiene, collected into SQLite and audited against written rules.",
5
5
  "keywords": [
6
6
  "github",
package/src/load.mjs CHANGED
@@ -9,7 +9,7 @@ import { parse as parseYaml } from 'yaml';
9
9
  import {
10
10
  editsWorkflowFiles, prCreateWithDefaultToken, auditSteps,
11
11
  pagesDeployJobs, jobEnvironment, jobRunsOnDefaultBranch, atlasCheckPins,
12
- resolveFailedStep, scheduleGaps,
12
+ resolveFailedStep, scheduleGaps, isTagOnlyPush,
13
13
  } from './workflow-risks.mjs';
14
14
  import { safeJson } from './collect.mjs';
15
15
  import { reconcileRepos } from './cost.mjs';
@@ -132,12 +132,17 @@ export function inspectWorkflow(text, path, defaultBranch = null, atlasEnv = nul
132
132
  out.on_triggers = triggers.join(',');
133
133
  out.has_workflow_dispatch = bool(triggers.includes('workflow_dispatch'));
134
134
 
135
- // "paths-gated" only means anything for push/pull_request triggers.
135
+ // "paths-gated" only means anything for push/pull_request triggers. A push
136
+ // that fires on tags alone (isTagOnlyPush) is already narrowed by its tag
137
+ // patterns and takes no paths filter -- one would stop its tag releases from
138
+ // firing -- so it is not counted as an ungated push. pull_request has no tag
139
+ // form, so it always counts.
136
140
  if (on && typeof on === 'object' && !Array.isArray(on)) {
137
- const gated = ['push', 'pull_request'].filter(t => on[t] && typeof on[t] === 'object');
138
- const anyPushLike = ['push', 'pull_request'].some(t => t in on);
141
+ const pushLike = ['push', 'pull_request'].filter(
142
+ t => t in on && !(t === 'push' && isTagOnlyPush(on.push)));
143
+ const gated = pushLike.filter(t => on[t] && typeof on[t] === 'object');
139
144
  out.has_paths_filter = bool(
140
- !anyPushLike || gated.some(t => on[t]['paths'] || on[t]['paths-ignore'])
145
+ pushLike.length === 0 || gated.some(t => on[t]['paths'] || on[t]['paths-ignore'])
141
146
  );
142
147
  } else {
143
148
  // `on: push` bare form is by definition ungated.
@@ -263,6 +263,23 @@ export function filterMatches(patterns, branch) {
263
263
  return unknown ? null : 0;
264
264
  }
265
265
 
266
+ /**
267
+ * A `push:` trigger that fires on tags alone: it declares `tags`/`tags-ignore`
268
+ * and neither `branches` nor `branches-ignore`, so GitHub starts it only for a
269
+ * tag push and never for a branch push. A bare `push:` (null, `true`, or an
270
+ * empty map) fires on every branch and is NOT this.
271
+ *
272
+ * Such a trigger is already narrowed by its tag patterns, so the paths rule has
273
+ * nothing to say about it: a `paths:` filter would stop its tag releases from
274
+ * firing at all -- paths is a change filter and a tag push carries no changed
275
+ * file it can read -- which is why a tag-only push is not an ungated push.
276
+ */
277
+ export function isTagOnlyPush(push) {
278
+ if (push == null || push === true || typeof push !== 'object' || Array.isArray(push)) return false;
279
+ if ('branches' in push || 'branches-ignore' in push) return false;
280
+ return 'tags' in push || 'tags-ignore' in push;
281
+ }
282
+
266
283
  /**
267
284
  * Can a push to `branch` start this workflow? 1, 0 or null.
268
285
  *
@@ -274,9 +291,7 @@ export function filterMatches(patterns, branch) {
274
291
  export function pushAdmitsBranch(push, branch) {
275
292
  if (push == null || push === true || typeof push !== 'object' || Array.isArray(push)) return 1;
276
293
  const hasBranches = 'branches' in push, hasIgnore = 'branches-ignore' in push;
277
- if (!hasBranches && !hasIgnore) {
278
- return ('tags' in push || 'tags-ignore' in push) ? 0 : 1;
279
- }
294
+ if (!hasBranches && !hasIgnore) return isTagOnlyPush(push) ? 0 : 1;
280
295
  if (hasBranches) return filterMatches(push.branches, branch);
281
296
  const ignored = filterMatches(push['branches-ignore'], branch);
282
297
  return ignored === null ? null : ignored === 1 ? 0 : 1;