oracle-gaps: owns in an options object built elsewhere (variable or spread) is read as empty, giving a clean 0-gap headline
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 45/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- eslint, javascript
- 領域
- testing-qa, tooling
研究方向
Start in oracle-gaps/owners.mjs, where readOwns returns declares true with empty entries for non-literal or spread options. Reuse the existing constant-case refusal message as the model for the new refusal, and check how the eslint-plugin-oracles rule is wired. Read the sibling issue #69 and decisions P6 and P8 first. Done when each generated owns form is either read correctly or refused, and the lint rule reports the same problem.
由索引模型根據 Issue 內容生成。
描述
Reported from an adopter session, which found it while reviewing #70. Checked at c58b0c2 with readOwns (oracle-gaps/owners.mjs) and end to end. This is a sibling of #69.
Problem. When an oracleProperty call's options aren't an object literal, or the literal is a spread with no owns key, readOwns returns declares: true, entries: [], problem: null. The run then reports a clean headline for code that no oracle owns.
Each case below shows what readOwns returns, as declares / entries / problem:
const opts = { owns: ['src/x.ts#a'] }; oracleProperty(opts)gives true / [] / null.const base = { owns: [...] }; oracleProperty({ ...base, id: 'x' })gives true / [] / null.
The other indirect forms already refuse: owns: OWNS, { owns }, a spread array, as const, satisfies, a parenthesized array, and a ${} template.
End to end, with a spread base in the ws-b repro: "4 mutants, 2 killed, 0 gaps, 2 unowned (warnings)", then "done completed, 0 gaps". The author sees a clean headline, and the oracle has judged nothing. That's worse than the forms that refuse.
Authority. P8 in the decisions register says an unknown source is never silent. P6 says ownership is read from the owns entries on oracleProperty.
Proposal.
- When the options of an
oraclePropertycall aren't an object literal, or the literal has a spread and no ownownskey, refuse with the same problem as the constant case: "its owns list is not written in the oracleProperty call, so the gap report cannot read what it owns". Include a fix line. - Add a matching eslint-plugin-oracles rule, so the problem shows up at lint time.
- In the oracle, add generated owns forms (inline, constant, spread base, options variable) to the owners oracle. Each form must either be read correctly or refused, never read as empty.
This issue was written by Isaac.
- 主要語言
- JavaScript
- 星號
- 5
- 分支
- 1
- 平均合併
- 8 小時 31 分鐘
- 30 天內合併 PR
- 60
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TanStack/oracles 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 64/100
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 35/100
維護者通常 1 天內回覆
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
channels:edit check:passed
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 84/100
swc-project/swc-next-issues#490 ·