Skip to content

Commit 97c9f86

Browse files
tcoratgerclaude
andauthored
docs(lstar): tidy docstring summaries in slot, checkpoint, state (#1145)
Reword the justification-candidate summary as a noun phrase per the noun-phrase summary rule, collapse the checkpoint advance docstring to a single accurate summary while keeping the forward-only invariant, and drop the self-contradicting first-person phrasing in the justified-slot range comment. Docs-only, no behavior change. just check passes. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ec63d1c commit 97c9f86

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/lean_spec/spec/forks/lstar/containers/checkpoint.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ class Checkpoint(Container):
2222

2323
def advance_to(self, candidate: "Checkpoint") -> "Checkpoint":
2424
"""
25-
Return the later of two checkpoints, keeping this one on a slot tie.
26-
27-
Forward-only progression for justified and finalized checkpoints.
25+
The later of two checkpoints, keeping this one on a slot tie.
2826
2927
The candidate replaces this checkpoint only when its slot is strictly higher.
28+
This enforces forward-only progression for justified and finalized checkpoints.
3029
"""
3130
return candidate if candidate.slot > self.slot else self
3231

src/lean_spec/spec/forks/lstar/containers/state.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def is_slot_justified(self, finalized_slot: Slot, target_slot: Slot) -> Boolean:
5858

5959
# Check the tracked bitfield for the slot's status.
6060
#
61-
# We assume the slot is within the tracked range.
61+
# The slot is expected within the tracked range.
6262
#
6363
# If the caller asks for a slot too far in the future, it indicates a logic error.
6464
# Surface it as a domain rejection so the uniform rejection funnel catches it,

src/lean_spec/spec/forks/lstar/slot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def justified_index_after(self, finalized_slot: "Slot") -> int | None:
2727

2828
def is_justifiable_after(self, finalized_slot: "Slot") -> bool:
2929
"""
30-
Checks if this slot is a valid candidate for justification after a given finalized slot.
30+
Whether this slot is a valid justification candidate after a given finalized slot.
3131
3232
According to the 3SF-mini specification, a slot is justifiable if its
3333
distance (delta) from the last finalized slot is:

0 commit comments

Comments
 (0)