@openwop/openwop-conformance 1.144.0 → 1.145.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openwop/openwop-conformance",
3
- "version": "1.144.0",
3
+ "version": "1.145.0",
4
4
  "description": "Production-ready black-box conformance suite for OpenWOP v1.0 compliant servers.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "_comment": "Provenance of this vendored schemas/ copy. See conformance/README.md \u00a7\"Resolving the contract\". Compare against the stamp in your installed @openwop/openwop-conformance to detect a stale hand-copied contract.",
3
- "suiteVersion": "1.144.0",
4
- "corpusCommit": "1aca8bb8ebdfaf23b33283f9c313aacfebfd4f07"
3
+ "suiteVersion": "1.145.0",
4
+ "corpusCommit": "55457606be653cb499906ba6f5960c2fdd62017c"
5
5
  }
@@ -119,3 +119,37 @@ describe('resolveFileRecord classifies a corpus scenario as inapplicable, not bl
119
119
  expect(r.disposition).toBe('executed-pass');
120
120
  });
121
121
  });
122
+
123
+ describe('the published layout is what makes these rows comparable across hosts', () => {
124
+ // Load-bearing and, until now, tested nowhere.
125
+ //
126
+ // A spec-coherence row is `inapplicable` only when V1_DIR is null, and V1_DIR
127
+ // is null only when the layout resolves to `published`. Two peers established
128
+ // by measurement what the code implies: `resolveLayout()` keys off PKG_ROOT,
129
+ // not the consuming repo, so an npm-installed consumer's parent is always
130
+ // `node_modules/@openwop/` — which never contains `schemas/` no matter where
131
+ // the host's checkout sits on disk. Every npm-consuming host therefore gets
132
+ // the same answer, and the dispositions are comparable BY CONSTRUCTION.
133
+ //
134
+ // One peer had generalised the opposite way — "the disposition is a property
135
+ // of where the bundle was cut" — from a host whose own runner sets
136
+ // OPENWOP_CONFORMANCE_ROOT when it finds a sibling checkout. True of that
137
+ // host, false of the artifact. The distinction only survives if something
138
+ // holds the artifact to it.
139
+ //
140
+ // The thing that would break it is a change that looks HELPFUL: adding
141
+ // `spec` to `files` so "the corpus tests run for consumers too". That would
142
+ // silently give npm consumers V1_DIR, the 28 would execute instead of
143
+ // flipping, and every host's numbers would shift with no failure anywhere.
144
+ it('the published package ships no spec/ — so V1_DIR is null for npm consumers', () => {
145
+ const pkg = JSON.parse(readFileSync(join(SCENARIOS, '../../package.json'), 'utf8')) as { files: string[] };
146
+ expect(
147
+ pkg.files.filter((f) => f === 'spec' || f.startsWith('spec/')),
148
+ 'adding spec/ to `files` would give npm consumers a V1_DIR, so the spec-coherence rows would execute '
149
+ + 'instead of reporting `inapplicable` — changing every host bundle with no test going red',
150
+ ).toEqual([]);
151
+ // schemas/ IS shipped, and is what selects the `published` layout. If this
152
+ // ever stops being true the layout resolves to neither branch.
153
+ expect(pkg.files, 'schemas/ is what makes resolveLayout() pick `published`').toContain('schemas');
154
+ });
155
+ });