@skillstech/thunderlang 1.5.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
@@ -1,3 +1,40 @@
1
+ # 1.6.1
2
+
3
+ - **Fix: Thunder write wrote names the code does not have.** A word that is no name in the function or file
4
+ (`"amount is big"`, `"total is at least 75"` when the input is `amount`) was written as a new name
5
+ (`if amount == big:`) and passed the proof; code with such a name (`amount >= total`) was written too. Both are now
6
+ refused, naming the function's inputs (`its inputs are "amount", "coupon"`). The function's own names, the file's
7
+ names, the language's built-ins (`len`, `Math`, …), names an earlier edit in the list added, and a new local the
8
+ step itself sets (`total = amount * 2`) are all still accepted. Reported by Skills Tech Talk.
9
+
10
+ # 1.6.0
11
+
12
+ - **Thunder write in Thunder's words.** `thunder write <file> --edit` (step edits: inputs, questions, Stops, steps,
13
+ answers, renames, in TypeScript, JavaScript, Python, and Go) now takes conditions, values, and steps the way Thunder
14
+ reads them: `"amount is at least 75 and not member"`, `"the length of value is below 2"`, `"name is nothing"`,
15
+ `Give …`, `Set … to …`, `Stop with "…"`. Each language gets its own form (`name is None`, `name == null`,
16
+ `name == nil`), and names are the code's own names said as words, matched in the function first, never from a
17
+ comment or docstring. Code is still accepted. A word with no fixed meaning in the language is refused, not guessed.
18
+ - **New in step edits:** `setValue` takes `toValue` (a name or expression, e.g. route a new input into a step);
19
+ steps inside `except` / `catch` and `finally` can be edited; `--edits <list.json|->` reads a list of edits; and the
20
+ MCP server offers `intent_write` (files and edits in, patch, new files, and proof out; nothing written to disk).
21
+ - **Fixes found by measuring on real code** (Flask, Click, Requests, httpx, rich, humanize, toolz): an `elif` whose
22
+ comparison changed got a second colon; removing a function's only step left an empty Python body (now `pass`); a
23
+ hex number (`0xFFFFFFFF`) was written as `4294967296xFFFFFFFF` (hex, octal, binary, and `1_000` now keep their
24
+ form, in step edits and rule edits); a word was matched to a name in a docstring; in a list of edits, a later
25
+ edit's line could land on a step an earlier edit inserted (lines now always mean the original file's lines); and
26
+ several edits to one function were checked against stale steps; a comment between a question and its first step
27
+ was taken as part of the question (it was dropped and the colon lost); and a step added before a decorated function
28
+ went between the decorator and the function. Each has a test. On 9,326 generated edits across Flask, Requests,
29
+ Click, httpx, and rich, every one of the 8,942 written files now parses (11 did not before).
30
+ - **Measured:** `scripts/write-bench.mjs` runs change requests with hidden tests (the test must fail on the original
31
+ code and pass on the written code); `scripts/write-sweep.mjs --verify` checks every written file with the
32
+ language's own parser. Results in docs/thunder-write.md.
33
+
34
+ **Upgrade note.** No command, flag, exit code, or JSON shape was removed. A Python condition such as `x is 5` (or
35
+ `member is true`) given to `--edit` is now read as Thunder's "is" (equals), not Python's identity test; `x is None`
36
+ is unchanged. `thunder write --edit` accepts `--edits <file>`.
37
+
1
38
  # 1.5.0
2
39
 
3
40
  - **Thunder Trace reads tables, settings, and packages.** `thunder trace` now links SQL to the repository that