Skip to content

docs(agents): the ladder's common case climbs one rung, it does not skip - #845

Merged
lilyshen0722 merged 2 commits into
mainfrom
fix/ladder-common-case-comment
Aug 5, 2026
Merged

lilyshen0722 merged 2 commits into
mainfrom
fix/ladder-common-case-comment

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Two comments in the reachability check claimed the fast path (pin == tip) is
the normal case. It isn't — and the measurement contradicting it was already in
the same function, thirty lines above the claim.

A submodule pin sits behind its branch tip except in the moments right after
a bump, so pin == tip misses and the steady state is exactly one --deepen=64
rung. #840 is the live proof: its CI verdict string reads is an ancestor, not
is the tip, so the fast path did not fire and the ladder carried the verdict.

No behaviour change. The ladder already did the right thing and the
exit-0-is-terminal test still holds. What was wrong is the premise filed
alongside it:

  • checkPinReachable — "the common case never climbs" → stops at the first rung
    that finds a path; at rest that is one rung, ~900ms, ~1MB
  • the COST table — at-rest row now marked as the normal one instead of listed
    under the exceptional case
  • the matching test docblock, which repeated the claim as "never fetches
    anything"

It matters because the ladder is load-bearing rather than defensive: "never
climbs" is the kind of premise a later change optimizes against, deleting the
rung that is carrying every verdict.

Caught by @sprint-review, who reproduced the CI shape and read the exit status
rather than the comment.

🤖 Generated with Claude Code

lilyshen0722 and others added 2 commits August 5, 2026 12:51
Two comments claimed the fast path is the normal one. It isn't, and the
measurement contradicting it was already in the same function, thirty lines
above the claim:

  // Measured on the real post-merge state in CI shape (pin one hop back...)
  //   depth-1            is-ancestor → 1  (wrong)
  //   after --deepen=64  is-ancestor → 0  (correct)
  ...
  // cheap — the common case never climbs.

A submodule pin sits BEHIND its branch tip except in the moments right after a
bump, so `pin == tip` misses and the steady state is exactly one rung. #840 is
the live proof: its CI verdict string reads `is an ancestor`, not `is the tip`.

Nothing about the behaviour changes — the ladder already did the right thing,
and the exit-0-is-terminal test still holds. What was wrong is the premise
filed alongside it. "Cheap" here means stops at the first rung that finds a
path, never does nothing; ~900ms and ~1MB every run. That distinction matters
because the ladder is load-bearing rather than defensive, and "never climbs" is
the kind of thing a later change optimizes against — deleting the rung that is
actually carrying every verdict.

Also relabels the COST table so the at-rest row is marked as the normal one
rather than listed second under the exceptional case.

Caught by @sprint-review, who reproduced the CI shape and read the exit status
rather than the comment.

Co-Authored-By: Claude Opus 5 <[email protected]>
Follow-up to this branch's own fix, which was still imprecise. It said the
fast path fires "right after a bump". #840 is the counterexample, and it is
the PR this whole sprint is about: it bumps the pin to `70bd82b8` while
openclaw main sits at `38f717bc6`, so it is a brand-new bump whose fast path
still misses.

The condition is narrower — after a bump made TO the tip, and only until the
branch next moves. Fixed in the COST table and at the fast-path call site,
which carried the same loose phrasing.

Also logs the whole thing as AX audit entry #14, because the shape is new to
that log. Every other entry there is a claim that decayed — true when written,
false later, no diff to show it. This one was false on arrival and carries its
own refutation thirty lines up, which is precisely why it survived: a reader
who reaches the claim has already read the data and takes the sentence as the
summary they are holding rather than as a contradiction of it. Proximity hid
it, not distance. And it passes every check the repo has, since the behaviour
was always correct and nothing compares two comments to each other.

Precise wording from @ux-lead.

Co-Authored-By: Claude Opus 5 <[email protected]>
@lilyshen0722
lilyshen0722 merged commit f587d5a into main Aug 5, 2026
11 checks passed
@lilyshen0722
lilyshen0722 deleted the fix/ladder-common-case-comment branch August 5, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant