Skip to content

Commit 72a95e6

Browse files
norandomclaude
andcommitted
docs(step): guide, real plan for recording.rs, handover 39
docs/steps.md describes step plan. A real plan on recording.rs: 191 faults, 91 noticed, 100 not, as in R89. The plan now tells a function in which no fault could be planted apart from one whose faults all go unnoticed. Design Amendment 2 records task group 3 as built. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5ac36ab commit 72a95e6

8 files changed

Lines changed: 791 additions & 11 deletions

File tree

‎.kiro/handover.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ active implementation queue.
88

99
Start with the [task 34 handover](task_34_handover.md).
1010

11-
0. **Start here:** [task 38 handover](task_38_handover.md). Task group 2 of `gradual-refactoring-steps` is
11+
0. **Start here:** [task 39 handover](task_39_handover.md). Task group 3 of `gradual-refactoring-steps` is
12+
done (`step plan` exists); next is group 4, pins and the step check.
13+
0. Earlier: [task 38 handover](task_38_handover.md). Task group 2 of `gradual-refactoring-steps` is
1214
done; next is group 3 (declaration, functions, `step plan`).
1315
0. Earlier: [task 37 handover](task_37_handover.md). Task group 1 of `gradual-refactoring-steps` is
1416
done (R91, proceed); next is group 2, the outcome store keyed by the tests.

‎.kiro/specs/gradual-refactoring-steps/design.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,19 @@ script stays under `docs/experiments/` as the record of R88.
394394
receipt gains `sites_not_selected` and `mutants_not_selected` when they are used.
395395
- **Prototype gate:** the three points listed above as not yet shown are shown; status `proceed`.
396396

397+
### Amendment 2, 2026-11-11 (task group 3): as built
398+
399+
- **Declaration.** No `root` (Amendment 1). Fields as in the example, plus `setup` and `build`; a key of
400+
`run` that the declaration sets itself is an error.
401+
- **Function names.** A function takes the `name` field of its node or of the node it is bound to; one
402+
without either is counted with the function around it.
403+
- **Callers.** A call is a name token directly before an opening parenthesis (design: "callee name"). No
404+
pack field is needed for it.
405+
- **`step plan`** takes a run configuration (`--config`), not a declaration, because a plan is made before
406+
a step is declared. Receipt `step-plan-v1`.
407+
- **Binary.** `main.rs` was at its ceiling; its path helpers moved to `cli_paths.rs` and its ceilings were
408+
lowered to the measured size.
409+
397410
## Contradictions and disposition
398411

399412
| Conflict | Authority | Disposition |

‎.kiro/specs/gradual-refactoring-steps/tasks.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,19 @@ Rules for every task group (owner rules of 2026-11-07 and 2026-11-10):
6363
agnostic-annotation-driver.
6464
- _Requirements: 9.1_
6565

66-
- [ ] 3. Declaration, functions and plan
67-
- [ ] 3.1 Read and validate the step declaration
66+
- [x] 3. Declaration, functions and plan
67+
- [x] 3.1 Read and validate the step declaration
6868
- `step/declaration.rs` and the `step` command group with its exit codes. Unknown fields, a base that is
6969
not an ancestor, an output path outside the repository: bad input.
7070
- _Boundary: Declaration, CommandLine_
7171
- _Requirements: 1.1, 1.3, 1.4, 4.2, 8.1_
72-
- [ ] 3.2 Functions: which changed, which call them, which fault belongs where
72+
- [x] 3.2 Functions: which changed, which call them, which fault belongs where
7373
- `step/functions.rs` from the pack's function boundaries: changed by token sequence, callers in scope by
7474
callee name, faults assigned by position; calls and state writes that leave a function.
7575
- The name scan that keeps language names out of the driver covers `native/src/step/` too.
7676
- _Boundary: Functions_
7777
- _Requirements: 1.5, 4.1, 5.2, 5.10_
78-
- [ ] 3.3 `step plan`
78+
- [x] 3.3 `step plan`
7979
- Per function: noticed and unnoticed faults, writes outside the frame, tokens; ranked; functions with no
8080
noticed fault marked and their outward calls listed. Runs in copies only.
8181
- Done when an integration test on a fixture repository checks the table and that the repository is

‎.kiro/task_39_handover.md‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Task handover 39: task group 3 of gradual-refactoring-steps (declaration, functions, step plan)
2+
3+
Written 2026-11-11, about 18:30 (Europe/Berlin). Predecessor: `.kiro/task_38_handover.md`.
4+
5+
## What was done
6+
7+
| Task | Commit | Result |
8+
| --- | --- | --- |
9+
| 3.1 declaration | `9e1fc28` | `native/src/step/declaration.rs`: read, validate, run configuration, revisions |
10+
| 3.2 functions | `0448cc0` | `native/src/step/functions.rs`: changed by token sequence, callers by name, faults per function; name scan covers `src/step` |
11+
| 3.3 `step plan` | `5ac36ab` and this commit | `lesscode-core step plan`; command group in `step/mod.rs`; `docs/steps.md` |
12+
13+
374 tests pass; format, lints and budgets clean. `kiro-cli check`: 0 errors, 0 warnings. Design Amendment 2
14+
records what was built differently.
15+
16+
Real plan on `native/src/recording.rs` (tests of `tests/recording.rs` only): 191 faults, 91 noticed, 100
17+
not, 13.8 minutes with three copies; a second run from the store is immediate. Receipt:
18+
`docs/experiments/gradual-steps/gate2/plan-recording.json`. The totals equal the whole-file run of R89.
19+
20+
## Next: task group 4 (pins and the step check)
21+
22+
- 4.1 `step pin`: composite copy (base code, test paths of the step revision) and `run --only N`; the
23+
three outcomes were shown by hand in R91. Needs: copy base with `revisions::copy_tree`, overlay the test
24+
paths from the step revision, a base fault run to number the faults.
25+
- 4.2 `step check` checks 1 to 4 (declaration and revisions, files outside the scope, pins and change in
26+
one commit, tests on base and step). `revisions.rs` still needs `log` with names of changed files.
27+
- 4.3 fault runs limited to changed functions and callers, comparison, size, frame.
28+
- 4.4 verdict and evidence; hashes of committed blobs (design Amendment 1).
29+
30+
## Notes
31+
32+
- `main.rs` ceilings were lowered to its measured size after its path helpers moved to `cli_paths.rs`;
33+
`lib.rs` is at its unit ceiling. New code goes under `native/src/step/`.
34+
- `run_run` is called as a library function by `step plan` and writes its receipt to
35+
`<work>/plan-run.json`.
36+
- The Python pack counts a call that is a statement of its own as a state write.
37+
- Work directories under `D:\BuildArtifacts\lesscode` (t11, t12, t13, t33, steps, step1, budget-case,
38+
figure-check) can be deleted; t12\whole is the copy used for the plan.
39+
- Model spend recorded: about 32.9 of 40 USD. Slice B is closed. No container of this project exists.
40+
41+
## CI
42+
43+
Filled in once the run for this commit has finished.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"language": "rust",
3+
"source_root": "D:/BuildArtifacts/lesscode/t12/whole",
4+
"files": [
5+
"native/src/recording.rs"
6+
],
7+
"test_paths": [
8+
"native/tests/"
9+
],
10+
"test": [
11+
"cargo",
12+
"nextest",
13+
"run",
14+
"--locked",
15+
"--manifest-path",
16+
"native/Cargo.toml",
17+
"--test",
18+
"recording",
19+
"--no-fail-fast"
20+
],
21+
"env": {
22+
"CARGO_TARGET_DIR": "target"
23+
},
24+
"exclusions": [
25+
"target"
26+
],
27+
"timeout_floor_s": 180,
28+
"timeout_ceiling_s": 900,
29+
"invalid_output_patterns": [
30+
"could not compile",
31+
"error[E"
32+
],
33+
"error_output_patterns": [
34+
"memory allocation of",
35+
"found invalid metadata files",
36+
"paging file is too small"
37+
],
38+
"runner_evidence_patterns": [
39+
"Starting ",
40+
"Summary ["
41+
],
42+
"workers": 3
43+
}

0 commit comments

Comments
 (0)