Skip to content

πŸ› fix(crux): cmdlog next_seq advances past terminal unfinished and orphaned commands - #17411

Closed
hivecommons-hive[bot] wants to merge 1 commit into
v5from
scanner/fix-17410
Closed

hivecommons-hive[bot] wants to merge 1 commit into
v5from
scanner/fix-17410

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Why

#17399 made cmdlog Read hold NextSeq back before the first record whose status is "unfinished", so a follower re-receives a command until it is terminal. That pin had no release condition in two cases:

  1. A terminal record whose status is "unfinished": Ended with no exit code (and the runs service mapping runstate.StatusUnfinished) writes an ended line with that status. The record is final, yet Read pinned on it forever.
  2. A started line orphaned by a runner crash: Open resumed the seq counter but never closed open seqs, so the record stayed unfinished for the rest of the run.

Either way the follower never advanced, re-receiving the same page forever; with more than limit later records, More was true while NextSeq did not move, so a for page.More loop spun hot against the endpoint.

What

  • Read pins on rec.EndedAt == nil (no ended line yet) instead of the status; Status stays as written. The intent of πŸ› fix(crux): cmdlog next_seq never skips an unfinished command's ended lineΒ #17399 is kept: a command unfinished when first seen is still re-received until its ended line arrives.
  • Open appends an ended line (unfinished, no exit code, reason "runner restarted before the command ended", duration from the started line) for every started seq with no ended line.
  • Doc comments on Read and api.CommandPage updated; changelog fragment added.
  • Tests: ended-but-unfinished record followed by a completed one advances NextSeq; More with an un-ended first record still clamps to since_seq; Open closes an orphaned started line.

Closes #17410
Refs #17399

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

…phaned commands

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 9, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 9, 2026
@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 9, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive hivecommons-hive Bot closed this Nov 9, 2026
@hivecommons-hive
hivecommons-hive Bot deleted the scanner/fix-17410 branch November 9, 2026 16:35
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Closed by the scanner: #17410 was filed as help-wanted (claim refused as "filed for outside help"), so this fix PR was withdrawn and its branch deleted to leave the issue open for whoever picks it up. The approach it took is recorded in the issue body's "Suggested fix" section.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/M Denotes a PR that changes 30-99 lines, ignoring generated files. stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] crux cmdlog: next_seq pins forever on an ended-but-unfinished or orphaned command; follower stalls and may spin on More

0 participants