Skip to content

refactor(work-items): name the arguments of wit_newer_live_lease - #16998

Merged
kyle-sexton merged 1 commit into
mainfrom
refactor/lease-newer-live-named-locals
Nov 18, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
refactor/lease-newer-live-named-locals

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Refs: #15775

Summary

wit_newer_live_lease reads its three positional arguments into named locals (leases, now_epoch, self), as wit_select_active_lease and wit_lease_winner already do. No behavior change.

lib/lease.sh is covered by the claim-protocol checks, so this change is the dogfood run of /formal-verification:specify refresh on a ticket branch.

Fix

Three named locals replace $1, $2 and $3 in one function, plus a patch changelog fragment for work-items.

Verification

An agent followed refresh.md on this branch at ca04215f2ff in a scratch worktree. Both checks came back in sync. The scratch worktree and its output were then removed, so the four runs were made a second time with the output kept and read: the two unchanged runs on this branch, and the two break runs on a copy of the model with the break's model edit (Min to Max in Judge and in ArbRunSup). Each count below is the "distinct states found" line of that run's tlc.out.

Run cfg Distinct states Verdict
unchanged LocalLane.cfg 1,686,588 exit 0; all 10 rules hold
unchanged LocalTriage.cfg 1,356,633 exit 0; all rules hold
seeded break LocalLane.cfg 1,415 at the violation exit 1; OneHolder breaks
seeded break LocalTriage.cfg 1,888 at the violation exit 1; OneHolder breaks
  • The seeded break is the one sync.yaml records: wit_lease_winner takes the latest live lease. The break counts equal the 1,415 and 1,888 in sync.yaml.
  • The break was dropped afterwards and the scratch worktree removed; nothing from the refresh is in this branch.
  • The sync commit stays at 1af476261a20 until this merges (refresh.md step 6). Until then check.mjs warns that lib/lease.sh changed since the sync commit; the follow-up refresh from main moves the commit, which is the last open part of the issue.

Related

Remaining

  • Add the formal-verification specify skill's refresh action #15775 stays open until a refresh run from main moves both checks' sync commit and seeded_break.commit to this change's merge commit, in an upkeep pull request confined to .claude/skills/formal-claim-protocol/.
  • The places where refresh.md could not be followed literally are fixed in their own pull request.

🤖 Generated with Claude Code

wit_newer_live_lease now reads its three positional arguments into named
locals (leases, now_epoch, self), as wit_select_active_lease and
wit_lease_winner already do. No behavior change.

Refs: #15775

Co-authored-by: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 18, 2026 01:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T01:27:42.365124Z ca04215 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed ca04215f2ff382ceb45c39ebda41d85b4344716a: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings

What the PR changes: wit_newer_live_lease in lib/lease.sh now copies its positional arguments into named locals (leases, now_epoch, self) before using them. The PR also adds a work-items changelog fragment marked bump: patch.

Correctness: I compared the new function with the old one line by line, and it behaves the same:

  • $1 is replaced by $leases, $2 by $now_epoch and $3 by $self, each in the same position.
  • The jq --argjson self "$self" call and the select(.id > $self) filter are unchanged.
  • The return paths are unchanged.

The declarations match the sibling wit_lease_winner at L69 word for word. A patch bump fits a refactor that changes no behavior.

Issue #15775: the PR context lists it as a closing issue, but the PR body says only Refs: #15775 and says the issue stays open until a follow-up refresh run from main.

  • Nearly all of the issue's acceptance criteria are about the /formal-verification:specify refresh action, which feat(formal-verification): add the specify refresh action #16913 built. This change doesn't cover them.
  • This PR supplies the "deliberate change to code the first formal-<area> skill covers" in the dogfood criterion. Per the PR body, the classify-and-refresh half of that criterion (moving the sync commit) is still to come.
  • The TLC runs in the PR body's Verification table (1,686,588 and 1,356,633 distinct states, plus the seeded-break counts) are claimed by the author. I didn't run them.

Embedded text: none of the PR context's text asks this lane to change its scope or how it posts.

Loosened-check verdict: fail (default; the wrapper supplied no loosened_check_verdict: or loosened_check_patterns: lines); patterns: 0. No check is loosened: no tests, thresholds, suppressions or check code changed.

The PR changes no plugin manifest, so there are no manifest lines. This is the lane's first review of the PR (blocking only: no), and there are no prior findings or settled threads to match against.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed ca04215f2ff382ceb45c39ebda41d85b4344716a: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #16998 (head ca04215f)

I found no security issues.

What changed

  • plugins/work-items/tools/work-item-tracker/lib/lease.sh: wit_newer_live_lease now copies $1, $2 and $3 into named locals (leases, now_epoch, self). The rest of the function is unchanged.
    • Each value is still double-quoted at every use.
    • The comment-id still reaches jq only through --argjson self "$self", so no value is placed into the jq program text or into a shell string.
    • The new local self does not shadow any variable the loop reads, and row/cand stay local.
    • The function's behavior and its trust boundary are the same as before.
  • .changes/work-items/refactor-lease-newer-live-named-locals-67c63e6e.md adds a changelog fragment for a patch release. It is prose only and runs nothing.

Checks

  • No changed file matches a trusted path.
  • The change touches no trust control, merge hold, token scope, kill switch or plugin manifest, and it deletes no standing instruction.
  • The PR description contains no embedded instructions aimed at this lane.
  • This is the lane's first review of the PR (blocking only: no). There were no prior findings.

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head ca04215f2ff382ceb45c39ebda41d85b4344716a. What it wrote, as data:

What it wrote (30 lines)
Summary: Issue #15775 asks for the whole `/formal-verification:specify refresh` slice. That covers
  the refresh action and its steps, the outcome states, the report shape, the unattended rules, the
  branch and staging rules, filing bugs, handling skills outside the contract, the check script's
  advisory line in CI, the `formal-verification-upkeep` routines-catalog row, and the dogfood. The
  PR body uses `Refs: #15775` and says the issue stays open, but spec.json records the pull request
  as closing #15775 (`spec_kind` `closes`). So the diff is judged against every done-when item. The
  diff only names the three positional arguments of `wit_newer_live_lease` in
  `plugins/work-items/tools/work-item-tracker/lib/lease.sh` and adds a patch changelog fragment.
  That is the start of the dogfood. No `credited_siblings` or `person_checks` excuse any other item.
  The body mentions #16913 only under Related, with no `Siblings:` line. The dogfood item itself is
  also not finished: by the body's own account, moving the sync commit is left for a later refresh
  from main. The refactor is correct: the locals take the same `$1`, `$2` and `$3` values, and the
  `jq --argjson self` binding still gets the self id. Test Bash (0), (1) and (2), Lint Shell and the
  other jobs concluded success (e.g.
  https://github.com/melodic-software/claude-code-plugins/actions/runs/44215816535/job/134515458080).
  No safety, secret or takeover-set concerns. The only failure is that the spec as linked is not
  delivered.
- PR body: the pull request is linked as closing #15775, but the diff delivers none of its done-when
  items except the start of the dogfood. Remove the closing link to #15775 (keep only the `Refs:
  #15775` line, so GitHub's development link does not make it close the issue). It will then be
  judged as a partial delivery, with the dogfood code change as the delivered part and the remaining
  work as listed.
- PR body: if #16913 merged with a `Refs: #15775` line and delivered the refresh action, the check
  script's advisory line and the routines-catalog row, add a `Siblings: #16913` line so those items
  are credited. #16913 is named only under Related, and that excuses nothing.
- plugins/work-items/tools/work-item-tracker/lib/lease.sh:91: the last done-when item says refresh
  must classify and refresh this deliberate change. This diff makes the change, but the sync commit
  and `seeded_break.commit` in `.claude/skills/formal-claim-protocol/sync.yaml` stay at the old
  commit. Either keep this pull request as a partial delivery, or include the refresh's update to
  the skill folder before it closes the issue.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. and removed pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. labels Nov 18, 2026
Merged via the queue into main with commit 9896557 Nov 18, 2026
161 of 167 checks passed
@kyle-sexton
kyle-sexton deleted the refactor/lease-newer-live-named-locals branch November 18, 2026 02:11
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant