Skip to content

feat(hr-what-next): list open lines a later done line already resolves - #355

Merged
bompus merged 2 commits into
mainfrom
ledger-resolved-later-20261018
Oct 18, 2026
Merged

bompus merged 2 commits into
mainfrom
ledger-resolved-later-20261018

Conversation

@bompus

@bompus bompus commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

check-open-work.mjs now lists open or deferred ledger lines that a later done line probably resolves, in a new group "possibly resolved by a later done line".

Why. Until now one ledger line closed another only for offer IDs. An item waiting on a pull request, thread or commit stayed open when the result was written as a new done line, unless GitHub already showed the pull request merged (and then only with gh). Nothing compared the ledger's own lines. The chief-of-staff ledger-health script (scripts/ledger-health.ts, check 1) made this check for one plan; this moves the portable part here.

What it does. An open or deferred line is listed when its recheck: date has passed and a later - [x] line names the same pull request, issue (a bare number counts as --repo's), commit, mcp: thread id or offer ID of three or more parts. A token that more than 8 ledger lines name is too common to tie two lines together. The group reads only the plan text, so it also runs on a plan that fails its lint. Like "possibly finished" and "re-check due" it is a subset of open and does not change the exit code. Offer IDs also appear in "unanswered offers", which looks only at open [ ] lines without a recorded answer; the two groups answer different questions, so both can list a line.

Not changed. The other plan checkers (check-reconciliation.mjs, panel-plan.mjs) do not compare ledger lines with each other, so nothing else needed to move.

Proof. Three new tests in skills/hr-what-next/test/check-open-work.test.mjs fail on the old script (3 fail, 45 pass) and pass with the change (48 pass): the five token kinds, the four non-matches (an earlier done line, a future date, a common token, a different item) and a plan that fails its lint. Local runs, all exit 0: oxfmt@0.70.0 --check ., oxlint@1.85.0 . (one existing warning), node --test test/*.test.mjs (182 pass), bun test test/ (no failures), npm run check:package -- --bun, bun test skills/ (368 pass). SKILL.md and the changelog entry describe the group. No release, tag or publish.


Summary by cubic

Extends the hr-what-next open-work check with a "possibly resolved by a later done line" group, listing open or deferred items whose recheck: date has passed when a later done line names the same pull request, issue, commit, mcp: thread id, or offer ID — the result was probably logged as a new line instead of closing the old one.

Details

  • A bare PR number counts as --repo's, offer IDs need three or more parts, and a token named by more than 8 lines is too common to match.
  • Commits of only digits or only letters match after the word "commit" or "sha" so dates and counts are not mistaken for shas.
  • The group reads only the plan text, so it runs on a plan that fails its lint, and is a subset of open that does not change the exit code.

Written for commit db4216c. Summary will update on new commits.

View guided diff Turn on auto-fix

The open-work check now lists open or deferred items whose recheck date has passed
and that share a pull request, issue, commit, thread id or offer ID with a later
done line, since the result was probably logged as a new line.
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1d599ec6-048b-45e0-8053-fd32f48f79da
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] Adds a new check category to the work-tracking tool.

The PR appears safe to merge, with a non-blocking gap in matching valid commit references.

Findings

  1. P2 Some valid commits never match ▶
Fix with agent prompt
### Issue 1
skills/hr-what-next/scripts/check-open-work.mjs:539
The new checks silently discard valid commit references containing only letters or only digits. For example, an overdue open line naming commit `1234567` will not match a later done line naming that same commit, so the user misses the reminder. The existing `COMMIT` pattern accepts these references. Remove the extra character checks and add tests for both cases.

```suggestion
    found.add(`commit:${sha.slice(0, 7)}`);
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Adds a plan-only group for overdue open or deferred items that share a reference with a later done line.

  • Open-work reports flag overdue items matched by later done lines.

Reviews (1) · Last reviewed commit: "feat(hr-what-next): list open lines a la..." · Reviewed by Greptile

Comment thread skills/hr-what-next/scripts/check-open-work.mjs
@bompus
bompus merged commit db4216c into main Oct 18, 2026
4 checks passed
@bompus
bompus deleted the ledger-resolved-later-20261018 branch October 18, 2026 01:08
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