@1aboveio/engineering-skills 0.1.7 → 0.1.9
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/package.json +2 -2
- package/skills/better-review/SKILL.md +1 -1
- package/skills/better-review/release-check.mjs +3 -1
- package/skills/contributing/SKILL.md +1 -1
- package/skills/contributing/release-check.mjs +3 -1
- package/skills/e2e-test/SKILL.md +1 -1
- package/skills/e2e-test/release-check.mjs +3 -1
- package/skills/engineering-runtime/SKILL.md +1 -1
- package/skills/engineering-runtime/coherence/workflow.json +13 -13
- package/skills/engineering-runtime/release-check.mjs +3 -1
- package/skills/engineering-runtime/scripts/installation-resolver.mjs +191 -0
- package/skills/engineering-runtime/scripts/workflow-coherence.mjs +51 -10
- package/skills/ensure-coverage/SKILL.md +1 -1
- package/skills/ensure-coverage/release-check.mjs +3 -1
- package/skills/golden-path/SKILL.md +1 -1
- package/skills/golden-path/release-check.mjs +3 -1
- package/skills/harness-runtime/SKILL.md +1 -1
- package/skills/harness-runtime/release-check.mjs +3 -1
- package/skills/resolve-issues/SKILL.md +11 -20
- package/skills/resolve-issues/references/delivery-progress.md +63 -0
- package/skills/resolve-issues/references/expire.md +24 -11
- package/skills/resolve-issues/references/implementation.md +9 -1
- package/skills/resolve-issues/references/preflight.md +7 -0
- package/skills/resolve-issues/references/shared-modules.md +27 -0
- package/skills/resolve-issues/references/task-plan.md +12 -5
- package/skills/resolve-issues/release-check.mjs +3 -1
- package/skills/resolve-issues/scripts/active-installation.mjs +32 -0
- package/skills/resolve-issues/scripts/install-hooks.mjs +3 -0
- package/skills/resolve-issues/scripts/rehydrate.mjs +17 -1
- package/skills/resolve-release/SKILL.md +1 -1
- package/skills/resolve-release/release-check.mjs +3 -1
- package/skills/rush-issues/SKILL.md +5 -2
- package/skills/rush-issues/release-check.mjs +3 -1
- package/skills/rush-release/SKILL.md +1 -1
- package/skills/rush-release/release-check.mjs +3 -1
- package/skills/test-quality/SKILL.md +1 -1
- package/skills/test-quality/release-check.mjs +3 -1
- package/skills/better-review/scripts/pr-context.test.mjs +0 -168
- package/skills/better-review/scripts/rereview-scope.test.mjs +0 -587
- package/skills/better-review/scripts/scan-diff.test.mjs +0 -414
- package/skills/better-review/scripts/vendor-sync.test.mjs +0 -96
- package/skills/contributing/scripts/persist-conventions.test.mjs +0 -118
- package/skills/e2e-test/scripts/presentation-checks.test.mjs +0 -106
- package/skills/e2e-test/scripts/presentation-perceivability.test.mjs +0 -117
- package/skills/e2e-test/scripts/presentation-reachability.test.mjs +0 -69
- package/skills/e2e-test/scripts/presentation-render-health.test.mjs +0 -98
- package/skills/e2e-test/scripts/presentation-sweep.test.mjs +0 -71
- package/skills/e2e-test/scripts/presentation-temporal.test.mjs +0 -59
- package/skills/e2e-test/scripts/project-route-manifest.test.mjs +0 -76
- package/skills/engineering-runtime/engineering-runtime.test.mjs +0 -68
- package/skills/engineering-runtime/scripts/invocation-policy.test.mjs +0 -95
- package/skills/engineering-runtime/scripts/main-module.test.mjs +0 -288
- package/skills/engineering-runtime/scripts/required-check-plan.test.mjs +0 -96
- package/skills/ensure-coverage/scripts/adapters/nextjs-inventory.test.mjs +0 -96
- package/skills/ensure-coverage/scripts/check-quarantine-expiry.test.mjs +0 -47
- package/skills/ensure-coverage/scripts/ci-audit.test.mjs +0 -86
- package/skills/ensure-coverage/scripts/coverage-ledger.test.mjs +0 -447
- package/skills/ensure-coverage/scripts/design-parity.test.mjs +0 -552
- package/skills/ensure-coverage/scripts/lint-tests.test.mjs +0 -289
- package/skills/ensure-coverage/scripts/mock-policy-config.test.mjs +0 -119
- package/skills/golden-path/scripts/golden-path.test.mjs +0 -1457
- package/skills/harness-runtime/discover-models.test.mjs +0 -363
- package/skills/harness-runtime/harness-runtime.test.mjs +0 -967
- package/skills/harness-runtime/model-catalog-seed.test.mjs +0 -829
- package/skills/harness-runtime/model-catalog.test.mjs +0 -366
- package/skills/resolve-issues/scripts/cleanup-runs.test.mjs +0 -280
- package/skills/resolve-issues/scripts/dropbox.test.mjs +0 -346
- package/skills/resolve-issues/scripts/findings-reuse.test.mjs +0 -88
- package/skills/resolve-issues/scripts/github-reviews.test.mjs +0 -264
- package/skills/resolve-issues/scripts/install-hooks.test.mjs +0 -79
- package/skills/resolve-issues/scripts/issue-tree.test.mjs +0 -107
- package/skills/resolve-issues/scripts/manual-invocation.test.mjs +0 -14
- package/skills/resolve-issues/scripts/next-actions-capacity.test.mjs +0 -149
- package/skills/resolve-issues/scripts/next-actions.test.mjs +0 -915
- package/skills/resolve-issues/scripts/plan-sync.test.mjs +0 -156
- package/skills/resolve-issues/scripts/preflight-models.test.mjs +0 -448
- package/skills/resolve-issues/scripts/ready-check.test.mjs +0 -217
- package/skills/resolve-issues/scripts/rehydrate.test.mjs +0 -91
- package/skills/resolve-issues/scripts/review-verdict.test.mjs +0 -1060
- package/skills/resolve-issues/scripts/size-check.test.mjs +0 -458
- package/skills/resolve-release/scripts/apply.test.mjs +0 -99
- package/skills/resolve-release/scripts/dark-flags.test.mjs +0 -100
- package/skills/resolve-release/scripts/flow.test.mjs +0 -340
- package/skills/resolve-release/scripts/green-head.test.mjs +0 -101
- package/skills/resolve-release/scripts/npm-version-absence.test.mjs +0 -426
- package/skills/resolve-release/scripts/plan-npm.test.mjs +0 -659
- package/skills/resolve-release/scripts/plan-toml-boundary.test.mjs +0 -317
- package/skills/resolve-release/scripts/plan-uv.test.mjs +0 -291
- package/skills/resolve-release/scripts/plan.test.mjs +0 -428
- package/skills/test-quality/scripts/lint-tests.test.mjs +0 -591
- package/skills/test-quality/scripts/mock-policy-config.test.mjs +0 -119
- package/skills/test-quality/scripts/persist-conventions.test.mjs +0 -104
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { test } from 'node:test'
|
|
2
|
-
import assert from 'node:assert/strict'
|
|
3
|
-
import { threeDotRange, parseNameStatus, parseLog, fastForwardable, isPromotionTarget, isIntegrationBranch, isPromotion, reviewNote, normalizeHeadName } from './pr-context.mjs'
|
|
4
|
-
|
|
5
|
-
test('threeDotRange uses three dots (the merge diff, not two-dot)', () => {
|
|
6
|
-
assert.equal(threeDotRange('abc123'), 'abc123...HEAD')
|
|
7
|
-
assert.equal(threeDotRange('abc', 'feat'), 'abc...feat')
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
test('parseNameStatus handles add/modify/delete and rename', () => {
|
|
11
|
-
const text = ['M\tsrc/a.ts', 'A\tsrc/new.ts', 'D\tsrc/old.ts', 'R100\tsrc/from.ts\tsrc/to.ts'].join('\n')
|
|
12
|
-
assert.deepEqual(parseNameStatus(text), [
|
|
13
|
-
{ status: 'M', path: 'src/a.ts' },
|
|
14
|
-
{ status: 'A', path: 'src/new.ts' },
|
|
15
|
-
{ status: 'D', path: 'src/old.ts' },
|
|
16
|
-
{ status: 'R100', path: 'src/to.ts' },
|
|
17
|
-
])
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
test('parseNameStatus empty → []', () => {
|
|
21
|
-
assert.deepEqual(parseNameStatus(''), [])
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
test('parseLog splits sha + subject', () => {
|
|
25
|
-
const text = '1a2b3c add export\n4d5e6f fix expired coupon'
|
|
26
|
-
assert.deepEqual(parseLog(text), [
|
|
27
|
-
{ sha: '1a2b3c', subject: 'add export' },
|
|
28
|
-
{ sha: '4d5e6f', subject: 'fix expired coupon' },
|
|
29
|
-
])
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
test('fastForwardable: empty = FF possible; non-empty (base has commits head lacks) = not FF', () => {
|
|
33
|
-
assert.equal(fastForwardable([]), true)
|
|
34
|
-
assert.equal(fastForwardable([{ sha: 'h0tf1x', subject: 'hotfix prod' }]), false)
|
|
35
|
-
assert.equal(fastForwardable(undefined), true)
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
test('isPromotionTarget: production branches only (the base half of a promotion)', () => {
|
|
39
|
-
assert.equal(isPromotionTarget('main'), true)
|
|
40
|
-
assert.equal(isPromotionTarget('master'), true)
|
|
41
|
-
assert.equal(isPromotionTarget('production'), true)
|
|
42
|
-
assert.equal(isPromotionTarget('origin/main'), true)
|
|
43
|
-
assert.equal(isPromotionTarget('dev'), false)
|
|
44
|
-
assert.equal(isPromotionTarget('feature/x'), false)
|
|
45
|
-
assert.equal(isPromotionTarget('release/1.2'), false)
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
test('isIntegrationBranch: only integration/release-shaped heads (the head half of a promotion)', () => {
|
|
49
|
-
// integration branches
|
|
50
|
-
assert.equal(isIntegrationBranch('dev'), true)
|
|
51
|
-
assert.equal(isIntegrationBranch('develop'), true)
|
|
52
|
-
assert.equal(isIntegrationBranch('origin/dev'), true)
|
|
53
|
-
assert.equal(isIntegrationBranch('refs/heads/develop'), true)
|
|
54
|
-
// release / hotfix / staging shapes
|
|
55
|
-
assert.equal(isIntegrationBranch('release/1.4'), true)
|
|
56
|
-
assert.equal(isIntegrationBranch('release/2.0.0'), true)
|
|
57
|
-
assert.equal(isIntegrationBranch('hotfix/urgent-fix'), true)
|
|
58
|
-
assert.equal(isIntegrationBranch('staging'), true)
|
|
59
|
-
assert.equal(isIntegrationBranch('staging/eu'), true)
|
|
60
|
-
assert.equal(isIntegrationBranch('origin/release/1.4'), true)
|
|
61
|
-
// ordinary feature branches — NOT integration
|
|
62
|
-
assert.equal(isIntegrationBranch('feature/x'), false)
|
|
63
|
-
assert.equal(isIntegrationBranch('chore/388-doc-code-prose-audit'), false)
|
|
64
|
-
assert.equal(isIntegrationBranch('issue-392-promotion-heuristic'), false)
|
|
65
|
-
assert.equal(isIntegrationBranch('main'), false)
|
|
66
|
-
assert.equal(isIntegrationBranch('develop-tweaks'), false) // not exactly `develop`
|
|
67
|
-
assert.equal(isIntegrationBranch('feature/release-notes'), false) // `release` not its own segment
|
|
68
|
-
// unresolvable head (a bare SHA, or empty) — NOT integration → safe default
|
|
69
|
-
assert.equal(isIntegrationBranch('a1b2c3d'), false)
|
|
70
|
-
assert.equal(isIntegrationBranch(''), false)
|
|
71
|
-
assert.equal(isIntegrationBranch(undefined), false)
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
test('isPromotion: true ONLY when base is production AND head is integration/release-shaped', () => {
|
|
75
|
-
// the ~15x false-positive this fixes: a feature branch → main is NOT a promotion
|
|
76
|
-
assert.equal(isPromotion('main', 'chore/388-doc-code-prose-audit'), false)
|
|
77
|
-
assert.equal(isPromotion('main', 'feature/x'), false)
|
|
78
|
-
assert.equal(isPromotion('main', 'issue-392-promotion-heuristic'), false)
|
|
79
|
-
// genuine promotions: integration/release branch → production
|
|
80
|
-
assert.equal(isPromotion('main', 'dev'), true)
|
|
81
|
-
assert.equal(isPromotion('main', 'release/1.4'), true)
|
|
82
|
-
assert.equal(isPromotion('main', 'hotfix/x'), true)
|
|
83
|
-
assert.equal(isPromotion('master', 'develop'), true)
|
|
84
|
-
assert.equal(isPromotion('origin/main', 'origin/dev'), true)
|
|
85
|
-
// base is not a production branch → never a promotion, even from an integration head
|
|
86
|
-
assert.equal(isPromotion('dev', 'feature/x'), false)
|
|
87
|
-
assert.equal(isPromotion('release/1.4', 'dev'), false)
|
|
88
|
-
// unresolvable head (bare SHA / empty) → false (documented safe default)
|
|
89
|
-
assert.equal(isPromotion('main', 'a1b2c3d'), false)
|
|
90
|
-
assert.equal(isPromotion('main', ''), false)
|
|
91
|
-
assert.equal(isPromotion('main', undefined), false)
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
test('normalizeHeadName strips ONLY known ref prefixes — never an arbitrary leading segment', () => {
|
|
95
|
-
// known ref prefixes → stripped to the bare name
|
|
96
|
-
assert.equal(normalizeHeadName('refs/heads/develop'), 'develop')
|
|
97
|
-
assert.equal(normalizeHeadName('refs/remotes/origin/release/1.4'), 'release/1.4')
|
|
98
|
-
assert.equal(normalizeHeadName('origin/dev'), 'dev')
|
|
99
|
-
assert.equal(normalizeHeadName('origin/release/1.4'), 'release/1.4')
|
|
100
|
-
assert.equal(normalizeHeadName('upstream/staging'), 'staging')
|
|
101
|
-
// NOT a known prefix → left intact (the any-prefix hole this closes)
|
|
102
|
-
assert.equal(normalizeHeadName('jsmith/dev'), 'jsmith/dev')
|
|
103
|
-
assert.equal(normalizeHeadName('feature/release/notes'), 'feature/release/notes')
|
|
104
|
-
assert.equal(normalizeHeadName('team/staging/eu'), 'team/staging/eu')
|
|
105
|
-
// plain names pass through
|
|
106
|
-
assert.equal(normalizeHeadName('dev'), 'dev')
|
|
107
|
-
assert.equal(normalizeHeadName('release/1.4'), 'release/1.4')
|
|
108
|
-
assert.equal(normalizeHeadName(''), '')
|
|
109
|
-
assert.equal(normalizeHeadName(undefined), '')
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
// LEFT-BOUNDARY REGRESSION (issue #392, fix round): the integration/release name must
|
|
113
|
-
// open the branch (after ref-prefix stripping), never be buried under a namespace. A
|
|
114
|
-
// nested-prefix feature branch is an ordinary feature PR, not a promotion — the unsafe
|
|
115
|
-
// direction if mis-classified. Removing the `^`/normalization makes these go RED.
|
|
116
|
-
test('isIntegrationBranch: nested-prefix feature branches are NOT integration (left-boundary hole)', () => {
|
|
117
|
-
// line-79 (release/hotfix/staging path) hole
|
|
118
|
-
assert.equal(isIntegrationBranch('feature/release/notes'), false)
|
|
119
|
-
assert.equal(isIntegrationBranch('feature/hotfix/x'), false)
|
|
120
|
-
assert.equal(isIntegrationBranch('team/staging/eu'), false)
|
|
121
|
-
// line-77 (exact dev/develop/staging) hole
|
|
122
|
-
assert.equal(isIntegrationBranch('jsmith/dev'), false)
|
|
123
|
-
assert.equal(isIntegrationBranch('alice/develop'), false)
|
|
124
|
-
assert.equal(isIntegrationBranch('wip/staging'), false)
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
test('isIntegrationBranch: supported ref prefixes still resolve to TRUE after normalization', () => {
|
|
128
|
-
assert.equal(isIntegrationBranch('origin/dev'), true)
|
|
129
|
-
assert.equal(isIntegrationBranch('refs/heads/develop'), true)
|
|
130
|
-
assert.equal(isIntegrationBranch('refs/remotes/origin/release/1.4'), true)
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
test('isPromotion: nested-prefix feature branches → main are NOT promotions (left-boundary hole)', () => {
|
|
134
|
-
// these all classified promotion=true before the anchor fix (the fail-open direction)
|
|
135
|
-
assert.equal(isPromotion('main', 'feature/release/notes'), false)
|
|
136
|
-
assert.equal(isPromotion('main', 'feature/hotfix/x'), false)
|
|
137
|
-
assert.equal(isPromotion('main', 'team/staging/eu'), false)
|
|
138
|
-
assert.equal(isPromotion('main', 'jsmith/dev'), false)
|
|
139
|
-
assert.equal(isPromotion('main', 'alice/develop'), false)
|
|
140
|
-
assert.equal(isPromotion('main', 'wip/staging'), false)
|
|
141
|
-
// supported prefixes remain genuine promotions
|
|
142
|
-
assert.equal(isPromotion('main', 'refs/heads/develop'), true)
|
|
143
|
-
assert.equal(isPromotion('main', 'refs/remotes/origin/release/1.4'), true)
|
|
144
|
-
})
|
|
145
|
-
|
|
146
|
-
test('reviewNote: PROMOTION + NOT fast-forwardable note still fires for a genuine promotion that is not FF', () => {
|
|
147
|
-
const note = reviewNote({
|
|
148
|
-
promotion: true,
|
|
149
|
-
fastForwardable: false,
|
|
150
|
-
base: 'main',
|
|
151
|
-
head: 'release/1.4',
|
|
152
|
-
commitsOnBaseNotInHead: [{ sha: 'h0tf1x', subject: 'hotfix prod' }],
|
|
153
|
-
})
|
|
154
|
-
assert.match(note, /PROMOTION \+ NOT fast-forwardable/)
|
|
155
|
-
assert.match(note, /main has 1 commit\(s\) not in release\/1\.4/)
|
|
156
|
-
assert.match(note, /HOLD/)
|
|
157
|
-
})
|
|
158
|
-
|
|
159
|
-
test('reviewNote: fast-forwardable promotion → release-readiness note (not a re-review)', () => {
|
|
160
|
-
const note = reviewNote({ promotion: true, fastForwardable: true, base: 'main', head: 'dev', commitsOnBaseNotInHead: [] })
|
|
161
|
-
assert.match(note, /PROMOTION \(fast-forwardable\)/)
|
|
162
|
-
assert.doesNotMatch(note, /NOT fast-forwardable/)
|
|
163
|
-
})
|
|
164
|
-
|
|
165
|
-
test('reviewNote: not a promotion → review the NET diff (the common feature-PR path)', () => {
|
|
166
|
-
const note = reviewNote({ promotion: false, fastForwardable: true, base: 'main', head: 'feature/x', commitsOnBaseNotInHead: [] })
|
|
167
|
-
assert.match(note, /Review the NET diff/)
|
|
168
|
-
})
|