@things-factory/figure-service 10.1.31 → 10.1.33

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": "@things-factory/figure-service",
3
- "version": "10.1.31",
3
+ "version": "10.1.33",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "@things-factory:registry": "https://registry.npmjs.org"
@@ -26,12 +26,12 @@
26
26
  "@hatiolab/figure-model": "^0.1.27",
27
27
  "@operato/typeorm-history": "^10.0.0",
28
28
  "@things-factory/ai-client-base": "^10.1.31",
29
- "@things-factory/auth-base": "^10.1.31",
29
+ "@things-factory/auth-base": "^10.1.33",
30
30
  "@things-factory/env": "^10.1.20",
31
- "@things-factory/shell": "^10.1.31",
31
+ "@things-factory/shell": "^10.1.33",
32
32
  "graphql-scalars": "^1.22.4",
33
33
  "graphql-upload": "^15.0.2",
34
34
  "koa-router": "^7.4.0"
35
35
  },
36
- "gitHead": "5213e6f9913b40ea2618a2111d9884b792dbaa01"
36
+ "gitHead": "7fb7b6587846b5ff6ee7a4983652d9561b4d6b2c"
37
37
  }
@@ -84,6 +84,34 @@ describe('release gate — the base box', () => {
84
84
  expect(inspection.blocked).toBe(true)
85
85
  })
86
86
 
87
+ /*
88
+ The gate hands the screen what the format said, and for blocking violations it was handing only
89
+ the sentence: `why` and `how` exist on GateFinding, the release panel renders both, and the query
90
+ asks for them, but nothing filled them. Across the 47 sample figures, 99 blocking findings had
91
+ 2 with all three -- the author saw "'beacon' overflows the box on y" and had to guess whether to
92
+ grow the box or move the part.
93
+
94
+ The format owns both (figure-model 0.1.29). This checks the gate carries them rather than writing
95
+ its own, which is the same discipline the sizing findings already follow.
96
+ */
97
+ it('carries the reason and the remedy the format wrote', () => {
98
+ const over = { ...sound, parts: [{ ...sound.parts[0], transform: { position: { x: 0, y: -20, z: 0 }, size: { x: 100, y: 100, z: 100 } } }] }
99
+ const finding = inspect(over).findings.find(f => f.code === 'part-outside-base')
100
+
101
+ expect(finding?.message).toMatch(/mm/)
102
+ expect(finding?.why).toBeTruthy()
103
+ /* 화면의 칸 이름으로 부른다 — 저작자는 `base.y` 를 본 적이 없고 Y 라고 적힌 칸을 본다. */
104
+ expect(finding?.how).toMatch(/기준 상자의 Y/)
105
+ })
106
+
107
+ it('carries them for the placement face too', () => {
108
+ const floating = { ...sound, parts: [{ ...sound.parts[0], transform: { position: { x: 0, y: 100, z: 0 }, size: { x: 100, y: 100, z: 100 } } }] }
109
+ const finding = inspect(floating).findings.find(f => f.code === 'parts-off-placement-face')
110
+
111
+ expect(finding?.why).toBeTruthy()
112
+ expect(finding?.how).toBeTruthy()
113
+ })
114
+
87
115
  it('still only reports the violations that are about taste', () => {
88
116
  /*
89
117
  Slack in the box is a declaration, not a defect — clearance in front of a conveyor, the pitch
@@ -171,6 +171,16 @@ export function inspectSource(sourceJson?: string | null, releasedJson?: string
171
171
  findings.push({
172
172
  code: violation.code,
173
173
  message: violation.message,
174
+ /*
175
+ 왜·어떻게는 형식이 만든 것을 그대로 옮긴다. 여기서 서버가 다시 쓰면 두 벌이 되고 곧 어긋난다 —
176
+ 크기 반응 판정이 이미 그 규율이다(아래 `report.findings`).
177
+
178
+ 이 두 줄이 없던 동안 발행 화면은 막는 위반에 문장 하나만 보여 줬다. 표본 47 개를 게이트에 넣어
179
+ 보니 막는 판정 99 건 중 왜·어떻게를 가진 것이 2 건이었고, 나머지 97 건은 저작자가 상자를 키울지
180
+ 부품을 옮길지 알 길이 없었다(2026-09-19, figure-model 0.1.29 가 그 값을 싣기 시작했다).
181
+ */
182
+ why: violation.why,
183
+ how: violation.how,
174
184
  /* 어느 위반이 막나는 형식이 안다 — 여기 목록을 또 들면 둘이 갈린다(ADR-0044 결정 ②). */
175
185
  blocking: blocksRelease(violation.code)
176
186
  })